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 remote-mips.c


CVSROOT:	/cvs/src
Module name:	src
Changes by:	palves@sourceware.org	2013-04-19 15:28:42

Modified files:
	gdb            : ChangeLog remote-mips.c 

Log message:
	-Wpointer-sign: remote-mips.c.
	
	remote-mips.c has a bunch of -Wpointer-sign warnings:
	
	../../src/gdb/remote-mips.c: In function âmips_receive_packetâ:
	../../src/gdb/remote-mips.c:1128:7: error: pointer targets in passing argument 2 of âmips_cksumâ differ in signedness [-Werror=pointer-sign]
	../../src/gdb/remote-mips.c:830:1: note: expected âconst unsigned char *â but argument is of type âchar *â
	../../src/gdb/remote-mips.c:1135:7: error: pointer targets in passing argument 2 of âmips_cksumâ differ in signedness [-Werror=pointer-sign]
	../../src/gdb/remote-mips.c:830:1: note: expected âconst unsigned char *â but argument is of type âchar *â
	../../src/gdb/remote-mips.c: In function âmips_load_srecâ:
	../../src/gdb/remote-mips.c:2830:12: error: pointer targets in passing argument 4 of âmips_make_srecâ differ in signedness [-Werror=pointer-sign]
	../../src/gdb/remote-mips.c:134:12: note: expected âunsigned char *â but argument is of type âchar *â
	../../src/gdb/remote-mips.c: In function âpmon_zerosetâ:
	../../src/gdb/remote-mips.c:3030:3: error: pointer targets in passing argument 4 of âpmon_makeb64â differ in signedness [-Werror=pointer-sign]
	../../src/gdb/remote-mips.c:2977:1: note: expected âint *â but argument is of type âunsigned int *â
	../../src/gdb/remote-mips.c: In function âpmon_make_fastrecâ:
	../../src/gdb/remote-mips.c:3124:6: error: pointer targets in passing argument 3 of âpmon_zerosetâ differ in signedness [-Werror=pointer-sign]
	../../src/gdb/remote-mips.c:3025:1: note: expected âint *â but argument is of type âunsigned int *â
	../../src/gdb/remote-mips.c:3126:4: error: pointer targets in passing argument 4 of âpmon_makeb64â differ in signedness [-Werror=pointer-sign]
	../../src/gdb/remote-mips.c:2977:1: note: expected âint *â but argument is of type âunsigned int *â
	../../src/gdb/remote-mips.c:3148:3: error: pointer targets in passing argument 3 of âpmon_zerosetâ differ in signedness [-Werror=pointer-sign]
	../../src/gdb/remote-mips.c:3025:1: note: expected âint *â but argument is of type âunsigned int *â
	../../src/gdb/remote-mips.c:3153:3: error: pointer targets in passing argument 3 of âpmon_zerosetâ differ in signedness [-Werror=pointer-sign]
	../../src/gdb/remote-mips.c:3025:1: note: expected âint *â but argument is of type âunsigned int *â
	../../src/gdb/remote-mips.c:3154:8: error: pointer targets in passing argument 4 of âpmon_makeb64â differ in signedness [-Werror=pointer-sign]
	../../src/gdb/remote-mips.c:2977:1: note: expected âint *â but argument is of type âunsigned int *â
	../../src/gdb/remote-mips.c: In function âpmon_load_fastâ:
	../../src/gdb/remote-mips.c:3423:2: error: pointer targets in passing argument 4 of âpmon_makeb64â differ in signedness [-Werror=pointer-sign]
	../../src/gdb/remote-mips.c:2977:1: note: expected âint *â but argument is of type âunsigned int *â
	../../src/gdb/remote-mips.c:3457:4: error: pointer targets in passing argument 3 of âpmon_checksetâ differ in signedness [-Werror=pointer-sign]
	../../src/gdb/remote-mips.c:3051:1: note: expected âint *â but argument is of type âunsigned int *â
	../../src/gdb/remote-mips.c:3484:8: error: pointer targets in passing argument 3 of âpmon_zerosetâ differ in signedness [-Werror=pointer-sign]
	../../src/gdb/remote-mips.c:3025:1: note: expected âint *â but argument is of type âunsigned int *â
	../../src/gdb/remote-mips.c:3489:3: error: pointer targets in passing argument 3 of âpmon_checksetâ differ in signedness [-Werror=pointer-sign]
	../../src/gdb/remote-mips.c:3051:1: note: expected âint *â but argument is of type âunsigned int *â
	
	The mips packet payload is ASCII, so it makes sense for
	mips_send_packet and mips_receive_packet to expose 'char *'-based
	interfaces, as currently they do.  But, mips packets have a binary
	header, so if you look at e.g., mips_receive_packet's implementation,
	you'll see "unsigned char" buffers in use.  I find it the most natural
	to make the payload pointer passed to mips_cksum 'char *' too.
	
	The other changes are straightforward adjustments -- a checksum is
	naturally unsigned, and there's one point where we're reading a bfd section.
	
	gdb/
	2013-04-19  Pedro Alves  <palves@redhat.com>
	
	* remote-mips.c (mips_cksum): Rename 'data' parameter to 'datastr'
	and change its type to 'const char *'.  Adjust.
	(mips_send_packet): Add cast to 'char *', and remove cast to
	'unsigned char *'.
	(mips_receive_packet): Remove cast to 'unsigned char *'.
	(mips_load_srec): Use bfd_byte.
	(pmon_makeb64, pmon_zeroset): Make 'chksum' parameter unsigned.
	(pmon_checkset): Make 'value' parameter unsigned.

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/ChangeLog.diff?cvsroot=src&r1=1.15447&r2=1.15448
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/remote-mips.c.diff?cvsroot=src&r1=1.140&r2=1.141


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