rx-warning-cleanup-and-afsconfig-20010605
authorNathan Neulinger <nneul@umr.edu>
Tue, 5 Jun 2001 15:32:46 +0000 (15:32 +0000)
committerDerrick Brashear <shadow@dementia.org>
Tue, 5 Jun 2001 15:32:46 +0000 (15:32 +0000)
clean up previous rxtrace patch and clean up other warnings

src/rx/rx_trace.c
src/rx/rx_user.c
src/rx/rxdebug.c

index 1a5241f..40f43d4 100644 (file)
 #ifdef RXDEBUG
 
 #include <afs/param.h>
+#include <afsconfig.h>
+#ifdef HAVE_STRING_H
 #include <string.h>
+#endif
+#ifdef HAVE_STRINGS_H
+#include <strings.h>
+#endif
 #ifdef AFS_NT40_ENV
 #include <fcntl.h>
 #include <io.h>
index d656006..7d9f603 100644 (file)
@@ -10,6 +10,7 @@
 /* rx_user.c contains routines specific to the user space UNIX implementation of rx */
 
 # include <afs/param.h>
+# include <afsconfig.h>
 # include <sys/types.h>
 # include <errno.h>
 # include <signal.h>
 #endif
 #include <afs/afs_args.h>
 #include <afs/afsutil.h>
+#ifdef HAVE_STRINGS_H
+#include <strings.h>
+#endif
+#ifdef HAVE_STRING_H
+#include <string.h>
+#endif
 
 #ifndef        IPPORT_USERRESERVED
 /* If in.h doesn't define this, define it anyway.  Unfortunately, defining
@@ -45,8 +52,8 @@
 # include "rx.h"
 # include "rx_globals.h"
 
-
 extern void rxi_Delay();
+extern void rxi_MorePackets();
 
 #ifdef AFS_PTHREAD_ENV
 #include <assert.h>
@@ -86,12 +93,12 @@ pthread_mutex_t rx_if_mutex;
  */
 osi_socket rxi_GetUDPSocket(u_short port)
 {
-    int binds, code;
+    int binds, code=0;
     osi_socket socketFd = OSI_NULLSOCKET;
     struct sockaddr_in taddr;
     char *name = "rxi_GetUDPSocket: ";
     extern int rxi_Listen(osi_socket sock);
-    int greedy;
+    int greedy=0;
 
 #if !defined(AFS_NT40_ENV) && !defined(AFS_DJGPP_ENV)
     if (ntohs(port) >= IPPORT_RESERVED && ntohs(port) < IPPORT_USERRESERVED) {
@@ -348,7 +355,7 @@ void rx_GetIFInfo()
 #ifndef AFS_DJGPP_ENV
     struct ifconf   ifc;
     struct ifreq    ifs[ADDRSPERSITE];
-    struct ifreq ifreq, *ifr;
+    struct ifreq *ifr;
 #ifdef AFS_AIX41_ENV
     char buf[BUFSIZ], *cp, *cplim;
 #endif
index 1cd7ffd..1ec3eb2 100644 (file)
@@ -18,7 +18,9 @@
 #include <netdb.h>
 #include <netinet/in.h>
 #include <sys/time.h>
+#include <unistd.h>
 #endif
+#include <string.h>
 #include <sys/stat.h>
 #include <afs/stds.h>
 #include <afs/cmd.h>
@@ -60,7 +62,7 @@ register char *aname;
     return ts->s_port; /* returns it in network byte order */
 }
 
-MainCommand(as, arock)
+int MainCommand(as, arock)
 char *arock;
 struct cmd_syndesc *as;
 {
@@ -491,7 +493,7 @@ struct cmd_syndesc *as;
 #ifndef AFS_NT40_ENV
 #include "AFS_component_version_number.c"
 #endif
-main(argc, argv)
+int main(argc, argv)
 int argc;
 char **argv;
 {