This is the mail archive of the
gdb-cvs@sourceware.org
mailing list for the GDB project.
src/gdb ChangeLog charset.c
- From: palves at sourceware dot org
- To: gdb-cvs at sourceware dot org
- Date: 7 Mar 2013 19:10:49 -0000
- Subject: src/gdb ChangeLog charset.c
CVSROOT: /cvs/src
Module name: src
Changes by: palves@sourceware.org 2013-03-07 19:10:49
Modified files:
gdb : ChangeLog charset.c
Log message:
charset.c: fix -Wpointer-sign
$ make WERROR_CFLAGS="-Wpointer-sign -Werror" charset.o 2>&1 1>/dev/null
../../src/gdb/charset.c: In function â??wchar_iterateâ??:
../../src/gdb/charset.c:665:13: error: pointer targets in assignment differ in signedness [-Werror=pointer-sign]
../../src/gdb/charset.c:691:13: error: pointer targets in assignment differ in signedness [-Werror=pointer-sign]
../../src/gdb/charset.c:706:12: error: pointer targets in assignment differ in signedness [-Werror=pointer-sign]
The encoding conversion code works with gdb_byte arrays as the generic
buffers that hold strings of any encoding/width. Changing the type of
this field to gdb_byte* removes the need for one cast, and makes
everything work with the same types. That's good -- WRT to strings,
"char *" is (almost) consistently throughout GDB only used for
ascii-ish strings.
gdb/
2013-03-07 Pedro Alves <palves@redhat.com>
* charset.c (struct wchar_iterator) <input>: Change type to 'const
gdb_byte *'.
(make_wchar_iterator): Remove cast to char*.
(wchar_iterate): Change type of local.
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/ChangeLog.diff?cvsroot=src&r1=1.15221&r2=1.15222
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/charset.c.diff?cvsroot=src&r1=1.53&r2=1.54