This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
[RFC] GDBserver compiler warnings patch
- From: Manoj Iyer <manjo at austin dot ibm dot com>
- To: gdb-patches at sources dot redhat dot com
- Date: Wed, 1 Jun 2005 12:39:21 -0500 (CDT)
- Subject: [RFC] GDBserver compiler warnings patch
2005-06-01 Manoj Iyer <manjo@austin.ibm.com>
* gdbreplay.c: Added #include <sys/types.h>.
(remote_open): Change type of 'tmp' from int to socklen_t.
* remote-utils.c: Added #include <sys/types.h>.
(remote_open): Change type of 'tmp' from int to socklen_t.
* server.c: Change type of 'sig' from unsigned char to char.
--------------------------------------------------------------------
diff -Naurp old/src/gdb/gdbserver/gdbreplay.c new/src/gdb/gdbserver/gdbreplay.c
--- old/src/gdb/gdbserver/gdbreplay.c 2004-03-12 12:51:21.000000000 -0800
+++ new/src/gdb/gdbserver/gdbreplay.c 2005-06-01 11:24:52.792975800 -0700
@@ -23,6 +23,7 @@
#include <stdio.h>
#include <sys/file.h>
#include <netinet/in.h>
+#include <sys/types.h>
#include <sys/socket.h>
#include <netdb.h>
#include <netinet/tcp.h>
@@ -105,7 +106,7 @@ remote_open (char *name)
char *port_str;
int port;
struct sockaddr_in sockaddr;
- int tmp;
+ socklen_t tmp;
int tmp_desc;
port_str = strchr (name, ':');
diff -Naurp old/src/gdb/gdbserver/remote-utils.c new/src/gdb/gdbserver/remote-utils.c
--- old/src/gdb/gdbserver/remote-utils.c 2005-05-12 05:14:23.000000000 -0700
+++ new/src/gdb/gdbserver/remote-utils.c 2005-06-01 11:17:39.946018968 -0700
@@ -27,6 +27,7 @@
#include <sys/ioctl.h>
#include <sys/file.h>
#include <netinet/in.h>
+#include <sys/types.h>
#include <sys/socket.h>
#include <netdb.h>
#include <netinet/tcp.h>
@@ -122,7 +123,7 @@ remote_open (char *name)
char *port_str;
int port;
struct sockaddr_in sockaddr;
- int tmp;
+ socklen_t tmp;
int tmp_desc;
port_str = strchr (name, ':');
diff -Naurp old/src/gdb/gdbserver/server.c new/src/gdb/gdbserver/server.c
--- old/src/gdb/gdbserver/server.c 2005-05-12 05:14:23.000000000 -0700
+++ new/src/gdb/gdbserver/server.c 2005-06-01 11:21:52.040032192 -0700
@@ -379,7 +379,7 @@ main (int argc, char *argv[])
setjmp (toplevel);
while (getpkt (own_buf) > 0)
{
- unsigned char sig;
+ char sig;
i = 0;
ch = own_buf[i++];
switch (ch)
-----
manjo
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ Cogito ergo sum +
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++