DEVEL15-util-cleanup-20071031
authorSimon Wilkinson <sxw@inf.ed.ac.uk>
Wed, 31 Oct 2007 12:36:18 +0000 (12:36 +0000)
committerDerrick Brashear <shadow@dementia.org>
Wed, 31 Oct 2007 12:36:18 +0000 (12:36 +0000)
kill the warnings in src/util

(cherry picked from commit 3e1646fed23cb58a7220e622aeb8afd519bb9840)

src/util/afsutil.h
src/util/afsutil_prototypes.h
src/util/assert.c
src/util/netutils.c
src/util/serverLog.c
src/util/softsig.c
src/util/strlcat.c
src/util/sys.c

index 3d07415..3a03613 100644 (file)
@@ -40,7 +40,7 @@ extern int serverLogSyslogFacility;
 extern char *serverLogSyslogTag;
 #endif
 extern void vFSLog(const char *format, va_list args);
-extern void SetLogThreadNumProgram(int (*func) () );
+extern void SetLogThreadNumProgram(int (*func) (void) );
 
 /*@printflike@*/ extern void FSLog(const char *format, ...);
 #define ViceLog(level, str)  if ((level) <= LogLevel) (FSLog str)
index 2848da3..3bcbace 100644 (file)
@@ -160,7 +160,7 @@ extern void ResetDebug_Signal(int signo);
 extern void SetupLogSignals(void);
 extern int OpenLog(const char *fileName);
 extern int ReOpenLog(const char *fileName);
-extern int LogThreadNum();
+extern int LogThreadNum(void);
 
 /* snprintf.c */
 
index d953eaf..f269d19 100644 (file)
@@ -38,7 +38,7 @@ AssertionFailed(char *file, int line)
     time_t when;
 
     time(&when);
-    afs_ctime(&when, tdate, 25);
+    (void)afs_ctime(&when, tdate, 25);
     fprintf(stderr, "%s: Assertion failed! file %s, line %d.\n", tdate, file,
            line);
     fflush(stderr);
index ab17344..63d2995 100644 (file)
@@ -51,6 +51,9 @@ RCSID
 #define INADDR_LOOPBACK (afs_uint32)0x7f000001
 #endif
 
+int ParseNetInfoFile_int(afs_uint32 *, afs_uint32 *, afs_uint32 *,
+                         int, char reason[], const char *,
+                         int);
 /* 
  * The line parameter is a pointer to a buffer containing a string of 
  * bytes of the form 
index 62bc1da..2b3b8d3 100644 (file)
@@ -69,7 +69,7 @@ dummyThreadNum(void)
 {
     return -1;
 }
-static int (*threadNumProgram) () = dummyThreadNum;
+static int (*threadNumProgram) (void) = dummyThreadNum;
 
 static int serverLogFD = -1;
 
@@ -87,7 +87,7 @@ int printLocks = 0;
 static char ourName[MAXPATHLEN];
 
 void
-SetLogThreadNumProgram(int (*func) () )
+SetLogThreadNumProgram(int (*func) (void) )
 {
     threadNumProgram = func;
 }
@@ -333,9 +333,6 @@ int
 ReOpenLog(const char *fileName)
 {
     int isfifo = 0;
-#if !defined(AFS_PTHREAD_ENV)
-    int tempfd;
-#endif
 #if !defined(AFS_NT40_ENV)
     struct stat statbuf;
 #endif
index ac7ae1c..98c04cf 100644 (file)
@@ -15,6 +15,7 @@
 #define _POSIX_PTHREAD_SEMANTICS
 #include <afs/param.h>
 #include <assert.h>
+#include <stdlib.h>
 #include <stdio.h>
 #ifndef  AFS_NT40_ENV
 #include <signal.h>
index 238e33e..f9de844 100644 (file)
@@ -23,6 +23,7 @@ RCSID
 #ifndef HAVE_STRLCAT
 
 #include <sys/types.h>
+#include <string.h>
 
 /*
  * Appends src to string dst of size siz (unlike strncat, siz is the
index 1930fba..40f18d8 100644 (file)
@@ -18,7 +18,7 @@ RCSID
 #include "AFS_component_version_number.c"
 
 int
-main()
+main(int argc, char **argv)
 {
     printf("%s\n", SYS_NAME);
     return 0;