]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
STABLE12-gcc-warnings-cleanup-20030701
authorPeter Breitenlohner <peb@mppmu.mpg.de>
Wed, 2 Jul 2003 01:44:37 +0000 (01:44 +0000)
committerDerrick Brashear <shadow@dementia.org>
Wed, 2 Jul 2003 01:44:37 +0000 (01:44 +0000)
FIXES 1650

gcc warnings cleanup; add headers, fix castings

(cherry picked from commit 88e2d8e292e687d3193dcaff62ffd5f2ab4f72ad)

src/afsd/afsd.c
src/bozo/bos_util.c
src/sys/rmtsysc.c
src/uss/uss_common.h
src/util/potpourri.h
src/venus/kdump.c
src/venus/test/owntest.c
src/venus/up.c
src/vlserver/cnvldb.c

index a9ec41dbc38214f3c93dfcd1457f20af086c028d..cdf9bfa768344d78cc739dcd68065e97ebbace54 100644 (file)
@@ -2088,7 +2088,7 @@ long param1, param2, param3, param4, param5, param6, param7;
     eparm[2] = param6;
     eparm[3] = param7;
 
-    param4 = eparm;
+    param4 = (long) eparm;
 #endif
 
     error = syscall(AFS_SYSCALL, AFSCALL_CALL, param1, param2, param3, param4, param5, param6, param7);
index 17152aa519d084555e03d1df4a8aa413ab60fd52..951626e4a62073f03bb0a86c0a083b27a6f2589c 100644 (file)
@@ -187,7 +187,7 @@ main(int argc, char **argv)
                printf("kvno %4d: key is '%s' '", tkeys.key[i].kvno, tbuffer);
                strcpy(x,(char *)tbuffer);
                for(count=0;count<8;count++)
-                   printf("\\%03o",(unsigned char *)x[count]);
+                   printf("\\%03o", x[count]);
                printf("'\n");
            }
        }
index ba003f24ad8bef53c0da66910682ffda88e5e496..0ad1f2e816053cf478269c4f3c4b11740d1ba5c6 100644 (file)
@@ -33,6 +33,9 @@ RCSID("$Header$");
 #ifdef HAVE_STRING_H
 #include <string.h>
 #endif
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
 #include <rx/xdr.h>
 #include "rmtsys.h"
 
index aeb8201ea6228469bd1bfc9515b074b5c2773827..7477e61e9ff81dec4a04b41b46a071774d6cc1ff 100644 (file)
 #include <stdio.h>             /*I/O stuff*/
 #include <afs/afsutil.h>
 #include <errno.h>
+#ifdef HAVE_STRING_H
+#include <string.h>
+#else
+#ifdef HAVE_STRINGS_H
+#include <strings.h>
+#endif
+#endif
+
 
 /*
  * --------------------- Exported definitions ---------------------
index 3d7bb86853e57db859234acf16de25aab20ab6ea..9849e3ecd6bde5a82e5afd8fa0681869ab41e7c8 100644 (file)
@@ -92,6 +92,7 @@ Abstract:     Contains miscellaneous general-purpose macros.
        BEWARE:  avoid quotes in the assertion!!
        Also beware: you cannot make the NOASSERT case a null macro, because of side effects */
 
+#undef assert
 #ifndef NOASSERT
 #define assert(ex) {if (!(ex)){fprintf(stderr,"Assertion failed: file %s, line %d\n", __FILE__, __LINE__);fprintf(stderr, "\t%s\n", # ex); abort();}}
 #else
index debfd8c21c33dbe8902ac0e316b3494dd53c9cab..be62147c75c629d7eff94b70826f81af0a94750a 100644 (file)
@@ -53,7 +53,7 @@ struct ntfs_inode_info{};
 #define u16 unsigned short
 #include <features.h>
 #if __GLIBC_MINOR__ >= 2
-#define _SYS_TYPES_H
+#define _SYS_TYPES_H 1
 #endif
 #define __KERNEL__
 #endif
index f894c7c4fe4a8bfa80b21c48dd67ceb2c99b69b7..0a9c44a348345242d0a08cdc775d8345c3104f21 100644 (file)
@@ -45,8 +45,8 @@ char **argv; {
         perror("chmod back to RW");
         return 1;
     }
-    gettimeofday(&tv[0], (char *) 0);
-    gettimeofday(&tv[1], (char *) 0);
+    gettimeofday(&tv[0], (void *) 0);
+    gettimeofday(&tv[1], (void *) 0);
     tv[0].tv_sec -= 10000;
     tv[0].tv_usec = 0;
     tv[1].tv_sec -= 20000;
index 275c5e7e25ee1bf3adee704407f37018fd3222f0..aeade8f005c0108b49a02aa2c3e8984302ec17be 100644 (file)
@@ -18,6 +18,13 @@ RCSID("$Header$");
 #define false 0
 
 #include <errno.h>
+#ifdef HAVE_STRING_H
+#include <string.h>
+#else
+#ifdef HAVE_STRINGS_H
+#include <strings.h>
+#endif
+#endif
 #ifdef AFS_AIX32_ENV
 #include <signal.h>
 #undef _NONSTD_TYPES
@@ -44,13 +51,6 @@ RCSID("$Header$");
 #include <netinet/in.h>
 #endif
 #include <afs/venus.h>
-#ifdef HAVE_STRING_H
-#include <string.h>
-#else
-#ifdef HAVE_STRINGS_H
-#include <strings.h>
-#endif
-#endif
 
 /* ************************************************************* */
 
index 9f55872497f6f13c65326bc1f01938a10308cf98..991a1419e167a3515d92bd9ee3d3538a56d2d043 100644 (file)
@@ -17,6 +17,13 @@ RCSID("$Header$");
 #include <errno.h>
 #include <stdio.h>
 #include <sys/file.h>
+#ifdef HAVE_STRING_H
+#include <string.h>
+#else
+#ifdef HAVE_STRINGS_H
+#include <strings.h>
+#endif
+#endif
 #include "cnvldb.h"  /* CHANGEME! */
 #include <netinet/in.h>
 #include <afs/venus.h>
@@ -25,13 +32,6 @@ RCSID("$Header$");
 #include <afs/fileutil.h>
 
 #include "vlserver.h"
-#ifdef HAVE_STRING_H
-#include <string.h>
-#else
-#ifdef HAVE_STRINGS_H
-#include <strings.h>
-#endif
-#endif
 
 #define MAXSIZE 2048 /* most I'll get back from PIOCTL */
 #define        BADSERVERID     255     /* XXX */