This is the mail archive of the gdb-cvs@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

src/gdb ChangeLog c-lang.c expprint.c utils.c ...


CVSROOT:	/cvs/src
Module name:	src
Changes by:	palves@sourceware.org	2013-03-07 19:24:33

Modified files:
	gdb            : ChangeLog c-lang.c expprint.c utils.c 
	                 valprint.c varobj.c 

Log message:
	Fix -Wpointer-sign around strings/encoding conversions.
	
	Trimmed for brevity:
	
	$ make WERROR_CFLAGS="-Wpointer-sign -Werror" c-lang.o expprint.o utils.o valprint.o varobj.o -k 2>&1 1>/dev/null
	../../src/gdb/c-lang.c: In function â??parse_one_stringâ??:
	../../src/gdb/c-lang.c:540:8: error: pointer targets in passing argument 3 of â??convert_between_encodingsâ?? differ in signedness [-Werror=pointer-sign]
	In file included from ../../src/gdb/c-lang.c:30:0:
	../../src/gdb/charset.h:64:6: note: expected â??const gdb_byte *â?? but argument is of type â??char *â??
	
	../../src/gdb/expprint.c: In function â??print_subexp_standardâ??:
	../../src/gdb/expprint.c:205:2: error: pointer targets in passing argument 3 of â??current_language->la_printstrâ?? differ in signedness [-Werror=pointer-sign]
	../../src/gdb/expprint.c:205:2: note: expected â??const gdb_byte *â?? but argument is of type â??char *â??
	
	cc1: all warnings being treated as errors
	make: *** [expprint.o] Error 1
	../../src/gdb/utils.c: In function â??host_char_to_targetâ??:
	../../src/gdb/utils.c:1474:9: error: pointer targets in passing argument 3 of â??convert_between_encodingsâ?? differ in signedness [-Werror=pointer-sign]
	
	../../src/gdb/varobj.c: In function â??value_get_print_valueâ??:
	../../src/gdb/varobj.c:2934:8: error: pointer targets in return differ in signedness [-Werror=pointer-sign]
	../../src/gdb/varobj.c:2968:12: error: pointer targets in assignment differ in signedness [-Werror=pointer-sign]
	../../src/gdb/varobj.c:2971:3: error: pointer targets in return differ in signedness [-Werror=pointer-sign]
	cc1: all warnings being treated as errors
	make: *** [varobj.o] Error 1
	
	As with the previous patch, the encoding conversion code works with
	gdb_byte arrays as the generic buffers that hold strings of any
	encoding/width.  This patch adds casts where appropriate.
	
	gdb/
	2013-03-07  Pedro Alves  <palves@redhat.com>
	
	* c-lang.c (parse_one_string): Cast argument to gdb_byte *.
	* expprint.c (print_subexp_standard): Likewise.
	* utils.c (host_char_to_target): Likewise.
	* valprint.c (generic_emit_char, generic_printstr): Likewise.
	* varobj.c (value_get_print_value): Change type of local to char*.
	Cast it gdb_byte * in call to language printer.

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/ChangeLog.diff?cvsroot=src&r1=1.15222&r2=1.15223
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/c-lang.c.diff?cvsroot=src&r1=1.105&r2=1.106
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/expprint.c.diff?cvsroot=src&r1=1.66&r2=1.67
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/utils.c.diff?cvsroot=src&r1=1.293&r2=1.294
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/valprint.c.diff?cvsroot=src&r1=1.134&r2=1.135
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/varobj.c.diff?cvsroot=src&r1=1.204&r2=1.205


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]