aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gdb/ChangeLog5
-rw-r--r--gdb/ser-tcp.c5
2 files changed, 9 insertions, 1 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 178ee2b..e795950 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,10 @@
2013-04-19 Pedro Alves <palves@redhat.com>
+ * ser-tcp.c (net_read_prim): Cast second argument to recv to
+ 'void *'.
+
+2013-04-19 Pedro Alves <palves@redhat.com>
+
* monitor.c (monitor_write_memory, monitor_write_memory_bytes):
Change type of 'myaddr' parameter to gdb_byte pointer.
(monitor_write_memory_longlongs): Likewise. Cast 'myaddr' pointer
diff --git a/gdb/ser-tcp.c b/gdb/ser-tcp.c
index e4fbf26..75c8b76 100644
--- a/gdb/ser-tcp.c
+++ b/gdb/ser-tcp.c
@@ -338,7 +338,10 @@ net_close (struct serial *scb)
int
net_read_prim (struct serial *scb, size_t count)
{
- return recv (scb->fd, scb->buf, count, 0);
+ /* Need to cast to silence -Wpointer-sign on MinGW, as Winsock's
+ 'recv' takes 'char *' as second argument, while 'scb->buf' is
+ 'unsigned char *'. */
+ return recv (scb->fd, (void *) scb->buf, count, 0);
}
int