GNU Binutils with patches for OS216
Revisión | c49e7f76afc4507257d66f1c72fabd83c2d6ef18 (tree) |
---|---|
Tiempo | 2013-04-20 02:48:10 |
Autor | Pedro Alves <palves@redh...> |
Commiter | Pedro Alves |
Make GDB -Wpointer-sign clean on MinGW too.
This is the remaining issue impeding GDB to build with "-Wpointer-sign
-Werror" with Fedora 17's i686-w64-mingw32 cross toolchain.
../../src/gdb/ser-tcp.c: In function 'net_read_prim':
../../src/gdb/ser-tcp.c:341:3: error: pointer targets in passing argument 2 of 'recv' differ in signedness [-Werror=pointer-sign]
In file included from ../../src/gdb/serial.h:23:0,
/usr/i686-w64-mingw32/sys-root/mingw/include/winsock2.h:983:34: note: expected 'char *' but argument is of type 'unsigned char *'
gdb/
2013-04-19 Pedro Alves <palves@redhat.com>
* ser-tcp.c (net_read_prim): Cast second argument to recv to
'void *'.
@@ -1,5 +1,10 @@ | ||
1 | 1 | 2013-04-19 Pedro Alves <palves@redhat.com> |
2 | 2 | |
3 | + * ser-tcp.c (net_read_prim): Cast second argument to recv to | |
4 | + 'void *'. | |
5 | + | |
6 | +2013-04-19 Pedro Alves <palves@redhat.com> | |
7 | + | |
3 | 8 | * monitor.c (monitor_write_memory, monitor_write_memory_bytes): |
4 | 9 | Change type of 'myaddr' parameter to gdb_byte pointer. |
5 | 10 | (monitor_write_memory_longlongs): Likewise. Cast 'myaddr' pointer |
@@ -338,7 +338,10 @@ net_close (struct serial *scb) | ||
338 | 338 | int |
339 | 339 | net_read_prim (struct serial *scb, size_t count) |
340 | 340 | { |
341 | - return recv (scb->fd, scb->buf, count, 0); | |
341 | + /* Need to cast to silence -Wpointer-sign on MinGW, as Winsock's | |
342 | + 'recv' takes 'char *' as second argument, while 'scb->buf' is | |
343 | + 'unsigned char *'. */ | |
344 | + return recv (scb->fd, (void *) scb->buf, count, 0); | |
342 | 345 | } |
343 | 346 | |
344 | 347 | int |