util-warning-cleanup-20011005
authorNathan Neulinger <nneul@umr.edu>
Fri, 5 Oct 2001 22:24:41 +0000 (22:24 +0000)
committerDerrick Brashear <shadow@dementia.org>
Fri, 5 Oct 2001 22:24:41 +0000 (22:24 +0000)
add headers, parens, and braces
ifdef notdef unused routines

src/util/assert.c
src/util/casestrcpy.c
src/util/fileutil.c
src/util/kreltime.c
src/util/ktime.c
src/util/uuid.c

index 6363e67..ca35cc2 100644 (file)
@@ -10,6 +10,7 @@
 /* ReallyAbort:  called from assert. May/85 */
 #include <afsconfig.h>
 #include <afs/param.h>
+#include <stdlib.h>
 
 RCSID("$Header$");
 
index 7f7dbdf..ae44a1d 100644 (file)
 
 RCSID("$Header$");
 
+#ifdef HAVE_STRING_H
+#include <string.h>
+#else
+#ifdef HAVE_STRINGS_H
+#include <strings.h>
+#endif
+#endif
 #include <ctype.h>
 #include <stddef.h>
 #include <stdarg.h>
index 1f0cb1c..d17cf76 100644 (file)
@@ -24,13 +24,24 @@ RCSID("$Header$");
 #include <windows.h>
 #include <io.h>
 #include "errmap_nt.h"
-#else
+#endif
+
+#ifdef HAVE_UNISTD_H
 #include <unistd.h>
 #endif
+#ifdef HAVE_STRING_H
 #include <string.h>
+#else
+#ifdef HAVE_STRINGS_H
+#include <strings.h>
+#endif
+#endif
 #include <sys/types.h>
 #include <dirent.h>
 #include <sys/stat.h>
+#ifdef HAVE_FCNTL_H
+#include <fcntl.h>
+#endif
 #include "fileutil.h"
 
 
index 2e95321..60ee5a3 100644 (file)
@@ -18,11 +18,13 @@ RCSID("$Header$");
 #include "ktime.h"
 #include <time.h>
 #include <ctype.h>
-#if defined(AFS_SUN5_ENV) || defined(AFS_NT40_ENV)
+#ifdef HAVE_STRING_H
 #include <string.h>
 #else
+#ifdef HAVE_STRINGS_H
 #include <strings.h>
 #endif
+#endif
 #include "afsutil.h"
 
 
@@ -39,10 +41,10 @@ static struct parseseqS
     char ps_keychar;
     afs_int32 ps_maxValue;
 } parseseq[] = {
-    KTIMEDATE_YEAR, 'y', MAX_YEAR_VALUE,       /* no max. value */
-    KTIMEDATE_MONTH, 'm', MAX_MONTH_VALUE,     /* months max. 12 */
-    KTIMEDATE_DAY, 'd',        MAX_DAY_VALUE,          /* days max. 31 */
-    0, 0, 0,
+    { KTIMEDATE_YEAR, 'y', MAX_YEAR_VALUE, },          /* no max. value */
+    { KTIMEDATE_MONTH, 'm', MAX_MONTH_VALUE, },                /* months max. 12 */
+    { KTIMEDATE_DAY, 'd',      MAX_DAY_VALUE, },       /* days max. 31 */
+    { 0, 0, 0, }
 };
 
 /* Encodings to and from relative dates. The caller is responsible for
index b2b2207..663a383 100644 (file)
@@ -19,11 +19,14 @@ RCSID("$Header$");
 #ifdef AFS_NT40_ENV
 #include <malloc.h>
 #endif
-#if defined(AFS_SUN5_ENV) || defined(AFS_NT40_ENV)
+#ifdef HAVE_STRING_H
 #include <string.h>
 #else
+#ifdef HAVE_STRINGS_H
 #include <strings.h>
 #endif
+#endif
+#include <stdlib.h>
 #include "afsutil.h"
 
 #include "ktime.h"
@@ -50,6 +53,7 @@ static char *day[] = {
 };
 
 /* free token list returned by parseLine */
+#ifdef undef
 static LocalFreeTokens(alist)
     register struct token *alist; {
     register struct token *nlist;
@@ -60,6 +64,7 @@ static LocalFreeTokens(alist)
     }
     return 0;
 }
+#endif
 
 static space(x)
 int x; {
@@ -71,7 +76,7 @@ static LocalParseLine(aline, alist)
     char *aline;
     struct token **alist; {
     char tbuffer[256];
-    register char *tptr;
+    register char *tptr = NULL;
     int inToken;
     struct token *first, *last;
     register struct token *ttok;
@@ -121,26 +126,26 @@ static struct ptemp {
     char *key;
     afs_int32 value;
 } ptkeys [] = {
-    "sun", 0x10000,
-    "mon", 0x10001,
-    "tue", 0x10002,
-    "wed", 0x10003,
-    "thu", 0x10004,
-    "fri", 0x10005,
-    "sat", 0x10006,
-    "sunday", 0x10000,
-    "monday", 0x10001,
-    "tuesday", 0x10002,
-    "wednesday", 0x10003,
-    "thursday", 0x10004,
-    "thur", 0x10004,
-    "friday", 0x10005,
-    "saturday", 0x10006,
-    "am", 0x20000,
-    "pm", 0x20001,
-    "a.m.", 0x20000,
-    "p.m.", 0x20001,
-    0, 0,
+    { "sun", 0x10000, },
+    { "mon", 0x10001, },
+    { "tue", 0x10002, },
+    { "wed", 0x10003, },
+    { "thu", 0x10004, },
+    { "fri", 0x10005, },
+    { "sat", 0x10006, },
+    { "sunday", 0x10000, },
+    { "monday", 0x10001, },
+    { "tuesday", 0x10002, },
+    { "wednesday", 0x10003, },
+    { "thursday", 0x10004, },
+    { "thur", 0x10004, },
+    { "friday", 0x10005, },
+    { "saturday", 0x10006, },
+    { "am", 0x20000, },
+    { "pm", 0x20001, },
+    { "a.m.", 0x20000, },
+    { "p.m.", 0x20001, },
+    { 0, 0, }
 };
 
 /* ktime_DateOf
@@ -395,6 +400,7 @@ struct ktime *aktime; {
 
 
 /* compare date in both formats, and return as in strcmp */
+#ifdef undef
 static KTimeCmp(aktime, atm)
 register struct ktime *aktime;
 register struct tm *atm; {
@@ -418,6 +424,7 @@ register struct tm *atm; {
     }
     return 0;
 }
+#endif
 
 /* compare date in both formats, and return as in strcmp */
 static KDateCmp(akdate, atm)
index 79b99f2..f4629c3 100644 (file)
@@ -37,6 +37,17 @@ RCSID("$Header$");
 #include <sys/time.h>
 #endif /* ITIMER_REAL */
 #include <net/if.h>
+#ifdef HAVE_STRING_H
+#include <string.h>
+#else
+#ifdef HAVE_STRINGS_H
+#include <strings.h>
+#endif
+#endif
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#include <stdlib.h>
 #endif
 #include <sys/stat.h>
 #include <fcntl.h>