Attached is a diff against CVS that cleans up some warnings, including
fixing the signed vs unsigned char directory hash problem on powerpc.

I would like to get this to the point that I can turn on '-Werror'..
there are still a few issues in utilities and functions that are defined
but not used.
Index: Makeconf
===================================================================
RCS file: /coda-src/coda/Makeconf,v
retrieving revision 4.45
diff -u -r4.45 Makeconf
--- Makeconf    4 Mar 2003 19:55:14 -0000       4.45
+++ Makeconf    23 Sep 2004 16:18:15 -0000
@@ -47,8 +47,10 @@
 ##############################
 
 DEPFLAG   := -MD
-CFLAGS   := -Wall $(DEPFLAG) $(MACHINE_FLAGS) $(INCLFLAGS) $(CFLAGS)
-CXXFLAGS  := -Wall $(DEPFLAG) $(MACHINE_FLAGS) $(INCLFLAGS) $(CXXFLAGS)
+CFLAGS   := -Wall -fno-strict-aliasing $(DEPFLAG) \
+               $(MACHINE_FLAGS) $(INCLFLAGS) $(CFLAGS)
+CXXFLAGS  := -Wall -fno-strict-aliasing $(DEPFLAG) \
+               $(MACHINE_FLAGS) $(INCLFLAGS) $(CXXFLAGS)
 
 RP2FLAGS  = -e  -I . -I $(srcdir) 
 
Index: coda-src/auth2/tokenfile.c
===================================================================
RCS file: /coda-src/coda/coda-src/auth2/tokenfile.c,v
retrieving revision 4.10
diff -u -r4.10 tokenfile.c
--- coda-src/auth2/tokenfile.c  17 Aug 2004 20:20:26 -0000      4.10
+++ coda-src/auth2/tokenfile.c  23 Sep 2004 16:18:15 -0000
@@ -68,7 +68,8 @@
                        EncryptedSecretToken sToken)
 {
     FILE *f;
-    char *buf = NULL, c;
+    char *buf = NULL;
+    signed char c;
     int len;
 
     f = fopen(filename, "r");
Index: coda-src/dir/dirbody.c
===================================================================
RCS file: /coda-src/coda/coda-src/dir/dirbody.c,v
retrieving revision 4.29
diff -u -r4.29 dirbody.c
--- coda-src/dir/dirbody.c      12 Sep 2004 04:48:25 -0000      4.29
+++ coda-src/dir/dirbody.c      23 Sep 2004 16:18:16 -0000
@@ -1016,7 +1016,7 @@
 /* Hash a string to a number between 0 and NHASH. */
 int DIR_Hash (const char *string)
 {
-    char tc;
+    signed char tc;
     int hval, tval;
 
     hval = 0;
Index: coda-src/lka/testlka.c
===================================================================
RCS file: /coda-src/coda/coda-src/lka/testlka.c,v
retrieving revision 1.6
diff -u -r1.6 testlka.c
--- coda-src/lka/testlka.c      8 Apr 2004 19:09:32 -0000       1.6
+++ coda-src/lka/testlka.c      23 Sep 2004 16:18:16 -0000
@@ -46,7 +46,7 @@
   char container[30], shaprintbuf[2*SHA_DIGEST_LENGTH+1]; 
   
   strcpy(container, "/tmp/testlka.XXXXXX");
-  mktemp(container);
+  mkstemp(container);
 
   switch (argc) {
   case 2:
Index: coda-src/repair/repair.cc
===================================================================
RCS file: /coda-src/coda/coda-src/repair/repair.cc,v
retrieving revision 4.43
diff -u -r4.43 repair.cc
--- coda-src/repair/repair.cc   19 Aug 2004 14:09:14 -0000      4.43
+++ coda-src/repair/repair.cc   23 Sep 2004 16:18:16 -0000
@@ -442,7 +442,7 @@
     vioc.out = space;
     vioc.out_size = DEF_BUF;
     strcpy(filename, "/tmp/listlocal.XXXXXX");
-    mktemp(filename);
+    mkstemp(filename);
     vioc.in = buf;
     sprintf(buf, "%d %s", REP_CMD_LIST, filename);
     vioc.in_size = (short) strlen(vioc.in) + 1;
Index: coda-src/venus/fso_cfscalls0.cc
===================================================================
RCS file: /coda-src/coda/coda-src/venus/fso_cfscalls0.cc,v
retrieving revision 4.90
diff -u -r4.90 fso_cfscalls0.cc
--- coda-src/venus/fso_cfscalls0.cc     10 Sep 2004 04:24:54 -0000      4.90
+++ coda-src/venus/fso_cfscalls0.cc     23 Sep 2004 16:18:16 -0000
@@ -1469,7 +1469,7 @@
 
 /* MUST be called from within transaction! */
 void fsobj::LocalSetAttr(Date_t Mtime, unsigned long NewLength,
-                         Date_t NewDate, uid_t NewOwner,
+                         Date_t NewDate, cuid_t NewOwner,
                           unsigned short NewMode)
 {
     /* Update local state. */
Index: coda-src/venus/vol_vcb.cc
===================================================================
RCS file: /coda-src/coda/coda-src/venus/vol_vcb.cc,v
retrieving revision 4.26
diff -u -r4.26 vol_vcb.cc
--- coda-src/venus/vol_vcb.cc   7 May 2004 18:19:17 -0000       4.26
+++ coda-src/venus/vol_vcb.cc   23 Sep 2004 16:18:16 -0000
@@ -168,7 +168,7 @@
             * case of VFlags, that would be a real waste of space (which is
             * going over the wire).
             */
-           char VFlags[MAX_PIGGY_VALIDATIONS];
+           signed char VFlags[MAX_PIGGY_VALIDATIONS];
            RPC2_BoundedBS VFlagBS;
            VFlagBS.MaxSeqLen = 0;
            VFlagBS.SeqLen = 0;
@@ -274,7 +274,7 @@
                    } else {
                        /* "and" in results from other servers. note VFlagBS.SeqBody 
== VFlags. */
                        for (int j = 0; j < nVols; j++) {
-                           if ((VFlags[j] == -1) || ((char) 
VFlagvar_bufs[i].SeqBody[j] == -1))
+                           if ((VFlags[j] == -1) || ((signed 
char)VFlagvar_bufs[i].SeqBody[j] == -1))
                                VFlags[j] = -1;
                            else 
                                VFlags[j] &= VFlagvar_bufs[i].SeqBody[j];
Index: coda-src/venus/vproc.h
===================================================================
RCS file: /coda-src/coda/coda-src/venus/vproc.h,v
retrieving revision 4.47
diff -u -r4.47 vproc.h
--- coda-src/venus/vproc.h      27 Jul 2004 20:28:14 -0000      4.47
+++ coda-src/venus/vproc.h      23 Sep 2004 16:18:16 -0000
@@ -352,9 +352,9 @@
 #define VA_IGNORE_RDEV         ((cdev_t)-1)
 #define VA_IGNORE_STORAGE      ((u_quad_t) -1)
 #define VA_IGNORE_MODE         ((u_short)-1)
-#define VA_IGNORE_UID          ((uid_t) -1)
+#define VA_IGNORE_UID          ((cuid_t) -1)
 #define VA_IGNORE_TIME2                ((long) -1)
-#define VA_IGNORE_GID          ((gid_t) -1)
+#define VA_IGNORE_GID          ((cgid_t) -1)
 #define VA_IGNORE_SIZE         ((u_quad_t)-1) 
 #define VA_IGNORE_TIME1                ((time_t)-1)
 #define VA_IGNORE_FLAGS                ((u_long)-1)
Index: coda-src/vice/codaproc.cc
===================================================================
RCS file: /coda-src/coda/coda-src/vice/codaproc.cc,v
retrieving revision 4.73
diff -u -r4.73 codaproc.cc
--- coda-src/vice/codaproc.cc   7 May 2004 18:17:57 -0000       4.73
+++ coda-src/vice/codaproc.cc   23 Sep 2004 16:18:16 -0000
@@ -2576,7 +2576,7 @@
 
        /* check the version stamp in our slot in the vector */
        index = i * count + ix;
-       if (VSBS->SeqLen < ((index+1) * sizeof(RPC2_Unsigned))) {
+       if ((unsigned)VSBS->SeqLen < ((index+1) * sizeof(RPC2_Unsigned))) {
            SLog(9, "ValidateVolumes: short input");
            goto InvalidVolume;
        }
Index: coda-src/vol/vldb.h
===================================================================
RCS file: /coda-src/coda/coda-src/vol/vldb.h,v
retrieving revision 4.7
diff -u -r4.7 vldb.h
--- coda-src/vol/vldb.h 23 May 2003 18:27:33 -0000      4.7
+++ coda-src/vol/vldb.h 23 Sep 2004 16:18:16 -0000
@@ -68,8 +68,8 @@
 /* Header takes up entry #0.  0 is not a legit hash code */
 
 struct vldbHeader {
-    long magic;                        /* *NETORDER* Magic number */
-    long hashSize;             /* *NETORDER* Size to use for hash calculation (see 
HashString) */
+    uint32_t magic;                    /* *NETORDER* Magic number */
+    uint32_t hashSize;         /* *NETORDER* Size to use for hash calculation (see 
HashString) */
 };
 
 #define VLDB_MAGIC 0xABCD4321
Index: lib-src/kernel-includes/coda.h
===================================================================
RCS file: /coda-src/coda/lib-src/kernel-includes/coda.h,v
retrieving revision 1.60
diff -u -r1.60 coda.h
--- lib-src/kernel-includes/coda.h      18 Dec 2003 21:30:26 -0000      1.60
+++ lib-src/kernel-includes/coda.h      23 Sep 2004 16:18:16 -0000
@@ -140,8 +140,8 @@
 typedef unsigned int      u_int32_t;
 #endif
 
-typedef int32_t cuid_t;
-typedef int32_t cgid_t;
+typedef u_int32_t cuid_t;
+typedef u_int32_t cgid_t;
 
 /*
  * Cfs constants
@@ -770,8 +770,8 @@
 #define PIOCPARM_MASK 0x0000ffff
 struct ViceIoctl {
         caddr_t in, out;        /* Data to be transferred in, or out */
-        short in_size;          /* Size of input buffer <= 2K */
-        short out_size;         /* Maximum size of output buffer, <= 2K */
+        u_int16_t in_size;          /* Size of input buffer <= 2K */
+        u_int16_t out_size;         /* Maximum size of output buffer, <= 2K */
 };
 
 struct PioctlData {

Reply via email to