[OpenAFS-devel] patch to fix a ton of warnings and a few bugs that should be errors...

Nathan Neulinger nneul@umr.edu
Sat, 02 Dec 2000 17:56:45 -0600


This is a multi-part message in MIME format.
--------------0F9EDC40BF210856659E1161
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

Couple issues:
	ptserver needs work... it's using a lot of afs_int32's as places to
stick pointers... Why not use reasonable pointers to the appropriate
structures? I've cast most of them appropriately to get rid of the
warnings, but a ptserver-wide fix of the data types is probably a good
idea.

	in some of the linux stuff - there were a couple instances of struct
vcache * where it should have been struct vnode * as near as I could
tell. These have been fixed.

This code in afs_pioctl.c:PSetCPrefs

    if ( sin->num_servers < 0 )
        return EINVAL;

warns about range of data type causing comparison to always be 0. Should
that be "< 1" instead? Or, if it's unsigned, no sense in having the
check.

In afs/VNOPS/afs_vnop_readdir.c there was a #ifdef defined()... 

The AFS_RPC_INLINE_T stuff with xdr_rx.c doesn't match up with the
headers. You have a section that figures it out in xdr_rx.c, but the
headers say afs_int32... Didn't feel like messing with this one.

There are more warnings on the linux one with Afscall_icl or something
that I didn't mess with. 

I've tested this compile on both linux 2.2.x and solaris 5.7, however,
the work on eliminating warnings is primarily for the linux compile. 

I haven't done anything with it, but there are a lot of

if (x)
dothis;

in the code... It would be better as:

if (x) dothis;
or
if (x)
    dothis;
or
if (x) {
    dothis;
}

It might be worthwhile to suggest and document a coding style on
openafs.org. 

-- Nathan

------------------------------------------------------------
Nathan Neulinger                       EMail:  nneul@umr.edu
University of Missouri - Rolla         Phone: (573) 341-4841
CIS - Systems Programming                Fax: (573) 341-4216
--------------0F9EDC40BF210856659E1161
Content-Type: text/plain; charset=us-ascii;
 name="warnings.diff"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
 filename="warnings.diff"

Index: afs/afs_call.c
===================================================================
RCS file: /cvs/openafs/src/afs/afs_call.c,v
retrieving revision 1.2
diff -u -r1.2 afs_call.c
--- afs/afs_call.c	2000/11/04 10:03:09	1.2
+++ afs/afs_call.c	2000/12/02 22:33:57
@@ -1114,7 +1114,7 @@
 {
     extern short afs_brsDaemons;
     extern afs_int32 afs_CheckServerDaemonStarted;
-    extern struct osi_WaitHandle AFS_WaitHandler, AFS_CSWaitHandler;
+    extern struct afs_osi_WaitHandle AFS_WaitHandler, AFS_CSWaitHandler;
     extern struct osi_file *afs_cacheInodep;
 
     AFS_STATCNT(afs_shutdown);
Index: afs/afs_daemons.c
===================================================================
RCS file: /cvs/openafs/src/afs/afs_daemons.c,v
retrieving revision 1.3
diff -u -r1.3 afs_daemons.c
--- afs/afs_daemons.c	2000/11/05 01:16:17	1.3
+++ afs/afs_daemons.c	2000/12/02 22:33:58
@@ -353,7 +353,7 @@
 #ifdef AFS_LINUX22_ENV
     code = gop_lookupname((char *)ab->parm[0], AFS_UIOSYS, 1,  (struct vnode **) 0, &dp);
     if (dp)
-	tvn = (struct vcache*)dp->d_inode;
+	tvn = (struct vnode*)dp->d_inode;
 #else
     code = gop_lookupname((char *)ab->parm[0], AFS_UIOSYS, 1,  (struct vnode **) 0, (struct vnode **)&tvn);
 #endif
Index: afs/afs_pioctl.c
===================================================================
RCS file: /cvs/openafs/src/afs/afs_pioctl.c,v
retrieving revision 1.4
diff -u -r1.4 afs_pioctl.c
--- afs/afs_pioctl.c	2000/12/02 17:52:58	1.4
+++ afs/afs_pioctl.c	2000/12/02 22:33:59
@@ -792,7 +792,7 @@
 #ifdef AFS_LINUX22_ENV
 	code = gop_lookupname(path, AFS_UIOUSER, follow,  (struct vnode **) 0, &dp);
 	if (!code)
-	    vp = (struct vcache *)dp->d_inode;
+	    vp = (struct vnode *)dp->d_inode;
 #else
 	code = gop_lookupname(path, AFS_UIOUSER, follow,  (struct vnode **) 0, &vp);
 #endif /* AFS_LINUX22_ENV */
@@ -2753,7 +2753,7 @@
       /* Note that it doesn't have a cell yet...     */
       if (!matches) {
 	 afs_uint32 temp = sp->host.s_addr;
-	 srvr = afs_GetServer(&temp, 1, NULL, (vlonly ? AFS_VLPORT : AFS_FSPORT), 
+	 srvr = afs_GetServer(&temp, 1, 0, (vlonly ? AFS_VLPORT : AFS_FSPORT), 
 			      WRITE_LOCK, (afsUUID *)0,0);
 	 srvr->addr->sa_iprank = sp->rank + afs_randomMod15();
 	 afs_PutServer(srvr, WRITE_LOCK);
Index: afs/afs_server.c
===================================================================
RCS file: /cvs/openafs/src/afs/afs_server.c,v
retrieving revision 1.3
diff -u -r1.3 afs_server.c
--- afs/afs_server.c	2000/11/06 04:17:06	1.3
+++ afs/afs_server.c	2000/12/02 22:33:59
@@ -702,7 +702,7 @@
    clients.  This is probably OK, but I don't want to see too much of it.
 */
 
-#define	ranstage(x)	(x)= (afs_uint32) (3141592621*((afs_uint32)x)+1)
+#define	ranstage(x)	(x)= (afs_uint32) (3141592621U*((afs_uint32)x)+1)
 extern afs_int32 rxi_getaddr();
 
 unsigned int afs_random()
Index: afs/LINUX/osi_alloc.c
===================================================================
RCS file: /cvs/openafs/src/afs/LINUX/osi_alloc.c,v
retrieving revision 1.4
diff -u -r1.4 osi_alloc.c
--- afs/LINUX/osi_alloc.c	2000/12/01 17:30:42	1.4
+++ afs/LINUX/osi_alloc.c	2000/12/02 22:33:59
@@ -199,14 +199,14 @@
 {
     /* initiate our pool of osi_linux_mem structs */
     al_mem_pool = afs_atomlist_create(sizeof(struct osi_linux_mem),
-                                  sizeof(long)*1024, vmalloc, local_free);
+                                  sizeof(long)*1024, (void*)vmalloc, local_free);
     if (!al_mem_pool) {
         printf("afs_osi_Alloc: Error in initialization(atomlist_create)\n");
         return 0;
     }
 
     /* initialize the hash table to hold references to alloc'ed chunks */
-    lh_mem_htab = afs_lhash_create(hash_equal, vmalloc, local_free);
+    lh_mem_htab = afs_lhash_create(hash_equal, (void*)vmalloc, local_free);
     if (!lh_mem_htab) {
         printf("afs_osi_Alloc: Error in initialization(lhash_create)\n");
         return 0;
Index: afs/LINUX/osi_groups.c
===================================================================
RCS file: /cvs/openafs/src/afs/LINUX/osi_groups.c,v
retrieving revision 1.2
diff -u -r1.2 osi_groups.c
--- afs/LINUX/osi_groups.c	2000/11/04 10:03:24	1.2
+++ afs/LINUX/osi_groups.c	2000/12/02 22:34:00
@@ -101,7 +101,7 @@
 {
     int code;
     cred_t *cr = crref();
-    int junk;
+    afs_uint32 junk;
     int old_pag;
 
     lock_kernel();
Index: afs/LINUX/osi_sleep.c
===================================================================
RCS file: /cvs/openafs/src/afs/LINUX/osi_sleep.c,v
retrieving revision 1.3
diff -u -r1.3 osi_sleep.c
--- afs/LINUX/osi_sleep.c	2000/11/05 20:01:25	1.3
+++ afs/LINUX/osi_sleep.c	2000/12/02 22:34:00
@@ -16,9 +16,10 @@
 
 #if defined(AFS_GLOBAL_SUNLOCK)
 static int osi_TimedSleep(char *event, afs_int32 ams, int aintok);
+#endif
+
 void afs_osi_Wakeup(char *event);
 void afs_osi_Sleep(char *event);
-#endif
 
 static char waitV;
 
Index: afs/UKERNEL/osi_vfsops.c
===================================================================
RCS file: /cvs/openafs/src/afs/UKERNEL/osi_vfsops.c,v
retrieving revision 1.2
diff -u -r1.2 osi_vfsops.c
--- afs/UKERNEL/osi_vfsops.c	2000/11/04 10:03:29	1.2
+++ afs/UKERNEL/osi_vfsops.c	2000/12/02 22:34:00
@@ -49,7 +49,7 @@
     afs_globalVFS = afsp;
     afsp->vfs_bsize = 8192;
     afsp->vfs_fsid.val[0] = AFS_VFSMAGIC; /* magic */
-    afsp->vfs_fsid.val[1] = AFS_VFSFSID; 
+    afsp->vfs_fsid.val[1] = (afs_int32) AFS_VFSFSID; 
 
     return 0;
 }
@@ -113,7 +113,7 @@
 	abp->f_type = 0;
 	abp->f_bsize = afsp->vfs_bsize;
 	abp->f_fsid.val[0] = AFS_VFSMAGIC; /* magic */
-	abp->f_fsid.val[1] = AFS_VFSFSID;
+	abp->f_fsid.val[1] = (afs_int32) AFS_VFSFSID;
 	return 0;
 }
 
Index: afs/UKERNEL/sysincludes.h
===================================================================
RCS file: /cvs/openafs/src/afs/UKERNEL/sysincludes.h,v
retrieving revision 1.3
diff -u -r1.3 sysincludes.h
--- afs/UKERNEL/sysincludes.h	2000/12/01 23:11:06	1.3
+++ afs/UKERNEL/sysincludes.h	2000/12/02 22:34:00
@@ -197,10 +197,16 @@
 #define EXCL			usr_EXCL
 #define NONEXCL			usr_NONEXCL
 #define uio_rw			usr_uio_rw
+#ifdef ino_t
+#undef ino_t
+#endif
 #define ino_t			usr_ino_t
 #define offset_t		usr_offset_t
 #define getpid()		usr_getpid()
 #define setpag(A,B,C,D)		usr_setpag((A),(B),(C),(D))
+#ifdef pid_t
+#undef pid_t
+#endif
 #define pid_t			int
 
 enum usr_vcexcl { usr_NONEXCL, usr_EXCL };
Index: afs/VNOPS/afs_vnop_readdir.c
===================================================================
RCS file: /cvs/openafs/src/afs/VNOPS/afs_vnop_readdir.c,v
retrieving revision 1.2
diff -u -r1.2 afs_vnop_readdir.c
--- afs/VNOPS/afs_vnop_readdir.c	2000/11/04 10:03:31	1.2
+++ afs/VNOPS/afs_vnop_readdir.c	2000/12/02 22:34:00
@@ -637,7 +637,7 @@
 		}
 #else /* AFS_HPUX_ENV */
 		code = afs_readdir_move(ode, avc, auio, o_slen,
-#ifdef defined(AFS_SUN5_ENV)
+#if defined(AFS_SUN5_ENV)
 		                        len, origOffset);
 #else
 					auio->afsio_resid, origOffset);
Index: auth/cellconfig.c
===================================================================
RCS file: /cvs/openafs/src/auth/cellconfig.c,v
retrieving revision 1.2
diff -u -r1.2 cellconfig.c
--- auth/cellconfig.c	2000/11/04 10:03:55	1.2
+++ auth/cellconfig.c	2000/12/02 22:34:01
@@ -40,6 +40,9 @@
 
 static ParseHostLine();
 static ParseCellLine();
+static afsconf_OpenInternal();
+static afsconf_CloseInternal();
+static afsconf_Reopen();
 
 static struct afsconf_servPair serviceTable [] = {
     "afs",	7000,
@@ -195,7 +198,7 @@
 #ifdef AFS_NT40_ENV
     return _utime(tbuffer, NULL);
 #else
-    gettimeofday(&tvp[0], (char *) 0);
+    gettimeofday(&tvp[0], NULL);
     tvp[1] = tvp[0];
     return utimes(tbuffer, tvp);
 #endif  /* AFS_NT40_ENV */
Index: ftpd43+/ftpd.c
===================================================================
RCS file: /cvs/openafs/src/ftpd43+/ftpd.c,v
retrieving revision 1.2
diff -u -r1.2 ftpd.c
--- ftpd43+/ftpd.c	2000/11/05 01:50:30	1.2
+++ ftpd43+/ftpd.c	2000/12/02 22:34:02
@@ -61,6 +61,7 @@
 #include <netdb.h>
 #include <errno.h>
 #include <string.h>
+#include <unistd.h>
 #include <time.h>
 #if defined(AIX)
 #include <sys/syslog.h>
Index: ftpd43+/getusershell.c
===================================================================
RCS file: /cvs/openafs/src/ftpd43+/getusershell.c,v
retrieving revision 1.1
diff -u -r1.1 getusershell.c
--- ftpd43+/getusershell.c	2000/11/04 02:27:00	1.1
+++ ftpd43+/getusershell.c	2000/12/02 22:34:02
@@ -35,7 +35,7 @@
 
 static char **shells, *strings;
 static char **curshell = NULL;
-extern char **initshells();
+static char **initshells();
 
 /*
  * Get a list of shells from SHELLS, if it exists.
@@ -65,12 +65,6 @@
 	curshell = NULL;
 }
 
-setusershell()
-{
-
-	curshell = initshells();
-}
-
 static char **
 initshells()
 {
@@ -118,3 +112,9 @@
 	(void)fclose(fp);
 	return (shells);
 }
+
+setusershell()
+{
+	curshell = initshells();
+}
+
Index: ftpd43+/glob.c
===================================================================
RCS file: /cvs/openafs/src/ftpd43+/glob.c,v
retrieving revision 1.1
diff -u -r1.1 glob.c
--- ftpd43+/glob.c	2000/11/04 02:27:01	1.1
+++ ftpd43+/glob.c	2000/12/02 22:34:02
@@ -94,6 +94,9 @@
 int gethdir(char *);
 
 
+static addpath();
+static rscan();
+
 #ifdef notdef
 static addpath(char);
 static rscan(register char **, int (*)(char));
Index: inetd/inetd.c
===================================================================
RCS file: /cvs/openafs/src/inetd/inetd.c,v
retrieving revision 1.1
diff -u -r1.1 inetd.c
--- inetd/inetd.c	2000/11/04 02:27:10	1.1
+++ inetd/inetd.c	2000/12/02 22:34:03
@@ -1029,7 +1029,7 @@
 		fprintf(stderr, "Unable to get time of day\n");
 		return (0L);
 	}
-	return (htonl((afs_int32)tv.tv_sec + 2208988800));
+	return (htonl((afs_int32)tv.tv_sec + 2208988800U));
 }
 
 /* ARGSUSED */
Index: kauth/admin_tools.c
===================================================================
RCS file: /cvs/openafs/src/kauth/admin_tools.c,v
retrieving revision 1.2
diff -u -r1.2 admin_tools.c
--- kauth/admin_tools.c	2000/11/04 10:04:36	1.2
+++ kauth/admin_tools.c	2000/12/02 22:34:03
@@ -169,7 +169,7 @@
     if ((!ka_KeyIsZero((char *) &tentry.key, sizeof(tentry.key))) && 
 	(showkey)) {
 	printf ("  key (%d):", tentry.key_version);
-	ka_PrintBytes (&tentry.key, sizeof(tentry.key));
+	ka_PrintBytes ((char *)&tentry.key, sizeof(tentry.key));
     }
     else {
 	if (tentry.keyCheckSum == 0) 
@@ -704,7 +704,7 @@
 
     printf ("Converting %s in realm '%s' yields key='",
 	    as->parms[0].items->data, realm);
-    ka_PrintBytes (&key, sizeof(key));
+    ka_PrintBytes ((char *)&key, sizeof(key));
     printf ("'.\n");
 
     return 0;
@@ -745,7 +745,7 @@
       ka_StringToKey (as->parms[1].items->data, realm, &key);
     } 
     else if (as->parms[2].items) {
-      if (ka_ReadBytes (as->parms[2].items->data, &key, sizeof(key)) != 8) {
+      if (ka_ReadBytes (as->parms[2].items->data, (char *)&key, sizeof(key)) != 8) {
 	printf ("Key must be 8 bytes: '%s' was too long\n",
 			 as->parms[2].items->data);
 	return KABADCMD;
@@ -890,7 +890,7 @@
     }
     if (verbose) {
 	printf ("SessionKey: ");
-	ka_PrintBytes (&token.sessionKey, sizeof(token.sessionKey));
+	ka_PrintBytes ((char *)&token.sessionKey, sizeof(token.sessionKey));
 	printf ("\nTicket (kvno = %d, len = %d): ", token.kvno, 
 		token.ticketLen);
 	ka_PrintBytes (token.ticket, token.ticketLen);
@@ -982,7 +982,7 @@
     ubik_ClientDestroy(lpbkConn);
     if (code) goto abort;
     printf ("Key: ");
-    ka_PrintBytes (&key, sizeof(key));
+    ka_PrintBytes ((char *)&key, sizeof(key));
     printf ("\n");
     return code;
 }
@@ -999,7 +999,7 @@
     else {
 	int i;
 	printf ("Key: ");
-	ka_PrintBytes (&key, sizeof(key));
+	ka_PrintBytes ((char *)&key, sizeof(key));
 	printf (" (");
 	for (i=0; i<sizeof(key); i++) {
 	    printf ("%0.2x", ((char *)&key)[i] & 0xff);
@@ -1174,7 +1174,7 @@
     return 0;
 }
 
-void MyAfterProc(
+int MyAfterProc(
   struct cmd_syndesc *as)
 {
     if (!strcmp(as->name,"help")) return;
@@ -1187,7 +1187,7 @@
         conn = 0;
     }
 
-    return;
+    return 0;
 }
 
 int   init = 0, noauth;
Index: kauth/kalocalcell.c
===================================================================
RCS file: /cvs/openafs/src/kauth/kalocalcell.c,v
retrieving revision 1.2
diff -u -r1.2 kalocalcell.c
--- kauth/kalocalcell.c	2000/11/04 10:04:37	1.2
+++ kauth/kalocalcell.c	2000/12/02 22:34:04
@@ -62,7 +62,7 @@
 static struct afsconf_dir *conf = 0;
 static char cell_name[MAXCELLCHARS];
 
-int ka_CellConfig (char *dir)
+int ka_CellConfig (char const *dir)
 {
     int code;
 #ifdef UKERNEL
Index: kauth/kaprocs.c
===================================================================
RCS file: /cvs/openafs/src/kauth/kaprocs.c,v
retrieving revision 1.2
diff -u -r1.2 kaprocs.c
--- kauth/kaprocs.c	2000/11/04 10:04:38	1.2
+++ kauth/kaprocs.c	2000/12/02 22:34:05
@@ -142,7 +142,7 @@
 				     &key, 0, 0);
 		if (code == 0) {
 		    des_init_random_number_generator (&key);
-		    ka_ConvertBytes (buf, sizeof(buf), &key, sizeof(key));
+		    ka_ConvertBytes (buf, sizeof(buf), (char *) &key, sizeof(key));
 		    es_Report ("New Admin key is %s\n", buf);
 		} else {
 		    es_Report ("in get_time: set_password failed because: %d\n", code);
@@ -159,7 +159,7 @@
 		des_fixup_key_parity (&key);
 		code = set_password (tt, KA_TGS_NAME, lrealm, &key, 0, 0);
 		if (code == 0) {
-		    ka_ConvertBytes (buf, sizeof(buf), &key, sizeof(key));
+		    ka_ConvertBytes (buf, sizeof(buf), (char *) &key, sizeof(key));
 		    es_Report ("New TGS key is %s\n", buf);
 		} else {
 		    es_Report ("in get_time: set_password failed because: %s\n", error_message (code));
@@ -720,7 +720,7 @@
   if (!bcmp(password, &(tentry->key), sizeof(EncryptionKey)))
       return KAREUSED;
 
-  code = ka_KeyCheckSum (password, &newsum);
+  code = ka_KeyCheckSum ((char *)password, &newsum);
   if (code)
      return code;
 
@@ -759,7 +759,7 @@
       /* do nothing, no limits */ ;
     }
     else {
-     code = ka_KeyCheckSum (&(tentry.key), &newsum);
+     code = ka_KeyCheckSum ((char *)&(tentry.key), &newsum);
      if (code)
        return code;
      for (i=npwSums-1; i ; i--) 
@@ -1551,7 +1551,7 @@
 	(callerIsAdmin && enc_level == rxkad_crypt))
 	bcopy (&tentry.key, &aentry->key, sizeof(struct ktc_encryptionKey));
     else bzero (&aentry->key, sizeof(aentry->key));
-    code = ka_KeyCheckSum (&tentry.key, &aentry->keyCheckSum);
+    code = ka_KeyCheckSum ((char *)&tentry.key, &aentry->keyCheckSum);
     if (!tentry.pwsums[0] && npwSums > 1 && !tentry.pwsums[1]) {
 	aentry->reserved3 = 0x12340000;
     } else {
Index: kauth/kautils.p.h
===================================================================
RCS file: /cvs/openafs/src/kauth/kautils.p.h,v
retrieving revision 1.2
diff -u -r1.2 kautils.p.h
--- kauth/kautils.p.h	2000/11/04 10:04:40	1.2
+++ kauth/kautils.p.h	2000/12/02 22:34:06
@@ -188,7 +188,7 @@
 );
 
 extern int ka_CellConfig (
-  char *dir
+  char const *dir
 );
 
 extern char *ka_LocalCell (
Index: kauth/rebuild.c
===================================================================
RCS file: /cvs/openafs/src/kauth/rebuild.c,v
retrieving revision 1.2
diff -u -r1.2 rebuild.c
--- kauth/rebuild.c	2000/11/04 10:04:42	1.2
+++ kauth/rebuild.c	2000/12/02 22:34:08
@@ -176,7 +176,7 @@
   printf("   Key Version = %d\n", entry->key_version);
 
   printf("   Key = ");
-  ka_PrintBytes (&entry->key, sizeof(entry->key));
+  ka_PrintBytes ((char *)&entry->key, sizeof(entry->key));
   printf("\n");
 
   /* What about asServer structs and such and misc_ath_bytes */
@@ -229,7 +229,7 @@
 
   fprintf(out, "create    -name %s", EntryName(entryp));
 
-  ka_ConvertBytes (key, sizeof(key), &entryp->key, sizeof(entryp->key));
+  ka_ConvertBytes (key, sizeof(key), (char *)&entryp->key, sizeof(entryp->key));
   fprintf(out, " -initial_password foo\n", key);
 
   strcpy(flags,"");
Index: lwp/lwp.c
===================================================================
RCS file: /cvs/openafs/src/lwp/lwp.c,v
retrieving revision 1.2
diff -u -r1.2 lwp.c
--- lwp/lwp.c	2000/11/04 10:05:10	1.2
+++ lwp/lwp.c	2000/12/02 22:34:09
@@ -914,7 +914,7 @@
     temp -> misc = NULL;	/* currently unused */
     temp -> next = NULL;
     temp -> prev = NULL;
-    temp -> lwp_rused = NULL;
+    temp -> lwp_rused = 0;
     temp -> level = 1;		/* non-preemptable */
 }
 
Index: pam/afs_auth.c
===================================================================
RCS file: /cvs/openafs/src/pam/afs_auth.c,v
retrieving revision 1.2
diff -u -r1.2 afs_auth.c
--- pam/afs_auth.c	2000/11/04 10:05:18	1.2
+++ pam/afs_auth.c	2000/12/02 22:34:09
@@ -95,14 +95,14 @@
     pam_afs_syslog(LOG_DEBUG, PAMAFS_OPTIONS, nowarn, use_first_pass, try_first_pass);
 
     /* Try to get the user-interaction info, if available. */
-    errcode = pam_get_item(pamh, PAM_CONV, (void **) &pam_convp);
+    errcode = pam_get_item(pamh, PAM_CONV, (const void **) &pam_convp);
     if (errcode != PAM_SUCCESS) {
 	pam_afs_syslog(LOG_WARNING, PAMAFS_NO_USER_INT);
 	pam_convp = NULL;
     }
 
     /* Who are we trying to authenticate here? */
-    if ((errcode = pam_get_user(pamh, &user, "login: ")) != PAM_SUCCESS) {
+    if ((errcode = pam_get_user(pamh, (const char **) &user, "login: ")) != PAM_SUCCESS) {
 	pam_afs_syslog(LOG_ERR, PAMAFS_NOUSER, errcode);
 	RET(PAM_USER_UNKNOWN);
     }
@@ -137,7 +137,7 @@
 	RET(PAM_AUTH_ERR);
     }
 #endif
-    errcode = pam_get_item(pamh, PAM_AUTHTOK, (void **) &password);
+    errcode = pam_get_item(pamh, PAM_AUTHTOK, (const void **) &password);
     if (errcode != PAM_SUCCESS || password == NULL) {
 	if (use_first_pass) {
 	    pam_afs_syslog(LOG_ERR, PAMAFS_PASSWD_REQ, user);
Index: pam/afs_pam_msg.c
===================================================================
RCS file: /cvs/openafs/src/pam/afs_pam_msg.c,v
retrieving revision 1.2
diff -u -r1.2 afs_pam_msg.c
--- pam/afs_pam_msg.c	2000/11/04 10:05:19	1.2
+++ pam/afs_pam_msg.c	2000/12/02 22:34:09
@@ -36,7 +36,7 @@
 
     mesg.msg_style = error ? PAM_ERROR_MSG : PAM_TEXT_INFO;
     mesg.msg = buf;
-    errcode = (*(pam_convp->conv))(1, &mesgp, &resp, pam_convp->appdata_ptr);
+    errcode = (*(pam_convp->conv))(1, (const struct pam_message **) &mesgp, &resp, pam_convp->appdata_ptr);
     if (resp) {
 	if (resp->resp) free(resp->resp);
 	free(resp);
@@ -71,7 +71,7 @@
     mesg.msg_style = echo ? PAM_PROMPT_ECHO_ON : PAM_PROMPT_ECHO_OFF;
     mesg.msg = buf;
 
-    errcode = (*(pam_convp->conv))(1, &mesgp, &resp, pam_convp->appdata_ptr);
+    errcode = (*(pam_convp->conv))(1, (const struct pam_message **) &mesgp, &resp, pam_convp->appdata_ptr);
     if (resp) {
 	*response = resp->resp;
 
Index: pam/afs_setcred.c
===================================================================
RCS file: /cvs/openafs/src/pam/afs_setcred.c,v
retrieving revision 1.2
diff -u -r1.2 afs_setcred.c
--- pam/afs_setcred.c	2000/11/04 10:05:19	1.2
+++ pam/afs_setcred.c	2000/12/02 22:34:09
@@ -90,14 +90,14 @@
 
     pam_afs_syslog(LOG_DEBUG, PAMAFS_OPTIONS, nowarn, use_first_pass, try_first_pass);
     /* Try to get the user-interaction info, if available. */
-    errcode = pam_get_item(pamh, PAM_CONV, (void **) &pam_convp);
+    errcode = pam_get_item(pamh, PAM_CONV, (const void **) &pam_convp);
     if (errcode != PAM_SUCCESS) {
 	pam_afs_syslog(LOG_DEBUG, PAMAFS_NO_USER_INT);
 	pam_convp = NULL;
     }
 
     /* Who are we trying to authenticate here? */
-    if ((errcode = pam_get_user(pamh, &user, "AFS username:")) != PAM_SUCCESS) {
+    if ((errcode = pam_get_user(pamh, (const char **) &user, "AFS username:")) != PAM_SUCCESS) {
         pam_afs_syslog(LOG_ERR, PAMAFS_NOUSER, errcode);
         RET(PAM_USER_UNKNOWN);
     }
Index: pam/test_pam.c
===================================================================
RCS file: /cvs/openafs/src/pam/test_pam.c,v
retrieving revision 1.2
diff -u -r1.2 test_pam.c
--- pam/test_pam.c	2000/11/04 10:05:19	1.2
+++ pam/test_pam.c	2000/12/02 22:34:09
@@ -15,7 +15,7 @@
 #include <unistd.h>
 
 
-static int my_conv(int num_msg, struct pam_message **msg,
+static int my_conv(int num_msg, const struct pam_message **msg,
 		   struct pam_response **response, void *appdata_ptr);
 
 
@@ -26,15 +26,15 @@
 
 
 static const char *service = "afstest";
-static const char *new_envstring = "GOTHEREVIATESTPAM=1";
-static const char *new_homestring = "HOME=/tmp";
+static char *new_envstring = "GOTHEREVIATESTPAM=1";
+static char *new_homestring = "HOME=/tmp";
 
 #ifdef AFS_LINUX20_ENV
 #define getpassphrase getpass
 #endif
 
 
-void main(int argc, char *argv[])
+int main(int argc, char *argv[])
 {
     int authenticated = 0;
     int retcode;
@@ -93,10 +93,10 @@
 }
 
 
-static int my_conv(int num_msg, struct pam_message **msg,
+static int my_conv(int num_msg, const struct pam_message **msg,
 		   struct pam_response **response, void *appdata_ptr)
 {
-    struct pam_message *m;
+    struct pam_message const *m;
     struct pam_response *r;
     char *p;
 
Index: ptserver/db_verify.c
===================================================================
RCS file: /cvs/openafs/src/ptserver/db_verify.c,v
retrieving revision 1.2
diff -u -r1.2 db_verify.c
--- ptserver/db_verify.c	2000/11/04 10:05:23	1.2
+++ ptserver/db_verify.c	2000/12/02 22:34:09
@@ -35,7 +35,7 @@
 
 struct prheader cheader;
 int    fd;
-char *pr_dbaseName;
+char const *pr_dbaseName;
 char *whoami = "db_verify";
 #define UBIK_HEADERSIZE 64
 
@@ -95,7 +95,7 @@
     }
     /* Check and see if database exists and is approximately OK. */
     if (ntohl(cheader.headerSize) != sizeof(cheader) ||
-	ntohl(cheader.eofPtr) == NULL) {
+	ntohl(cheader.eofPtr) == 0) {
 	if (code) return code;
 	com_err (whoami, PRDBBAD, "header is bad");
 	return PRDBBAD;
Index: ptserver/ptprocs.c
===================================================================
RCS file: /cvs/openafs/src/ptserver/ptprocs.c,v
retrieving revision 1.2
diff -u -r1.2 ptprocs.c
--- ptserver/ptprocs.c	2000/11/04 10:05:24	1.2
+++ ptserver/ptprocs.c	2000/12/02 22:34:10
@@ -45,6 +45,7 @@
 afs_int32 listElements(), listOwned(), isAMemberOf(), idToName();
 
 static stolower();
+extern int IDCmp();
 
 /* When abort, reset initd so that the header is read in on next call.
  * Abort the transarction and return the code.
@@ -593,7 +594,7 @@
     /* Delete each continuation block as a separate transaction so that no one
      * transaction become to large to complete. */
     nptr = tentry.next;
-    while (nptr != NULL) {
+    while (nptr != (afs_int32) NULL) {
 	struct contentry centry;
 	int i;
 
@@ -636,7 +637,7 @@
      * transaction, we start a new transaction every 50 entries. */
     count = 0;
     nptr = tentry.owned;
-    while (nptr != NULL) {
+    while (nptr != (afs_int32) NULL) {
 	struct prentry nentry;
 
 	code = pr_ReadEntry (tt, 0, nptr, &nentry);
@@ -1650,7 +1651,6 @@
     afs_int32 hostid;
     int size = 0, i, code;
     int added = 0;
-    extern afs_int32 IDCmp();
  
     while (host = (host & wild)) {
 	wild = htonl ( ntohl(wild) << 8) ;
Index: ptserver/pts.c
===================================================================
RCS file: /cvs/openafs/src/ptserver/pts.c,v
retrieving revision 1.2
diff -u -r1.2 pts.c
--- ptserver/pts.c	2000/11/04 10:05:24	1.2
+++ ptserver/pts.c	2000/12/02 22:34:10
@@ -78,13 +78,15 @@
     return code;
 }
 
-void CleanUp (as)
+int CleanUp (as)
   register struct cmd_syndesc *as;
 {
     if (!strcmp(as->name,"help")) return;
     /* Need to shutdown the ubik_client & other connections */
     pr_End();
     rx_Finalize();
+
+	return 0;
 }
 
 CreateGroup (as)
Index: ptserver/ptserver.c
===================================================================
RCS file: /cvs/openafs/src/ptserver/ptserver.c,v
retrieving revision 1.2
diff -u -r1.2 ptserver.c
--- ptserver/ptserver.c	2000/11/04 10:05:25	1.2
+++ ptserver/ptserver.c	2000/12/02 22:34:10
@@ -59,7 +59,7 @@
     return afsconf_SuperUser(prdir, call, (char *)0);
 }
 
-void main (argc, argv)
+int main (argc, argv)
   int argc;
   char **argv;
 {
Index: ptserver/ptutils.c
===================================================================
RCS file: /cvs/openafs/src/ptserver/ptutils.c,v
retrieving revision 1.2
diff -u -r1.2 ptutils.c
--- ptserver/ptutils.c	2000/11/04 10:05:25	1.2
+++ ptserver/ptutils.c	2000/12/02 22:34:10
@@ -33,6 +33,7 @@
 extern struct afsconf_dir *prdir;
 extern int pr_noAuth;
 
+extern int IDCmp();
 extern afs_int32 AddToEntry();
 static char *whoami = "ptserver";
 
@@ -444,7 +445,7 @@
     }
     hloc = 0;
     nptr = tentry.next;
-    while (nptr != NULL) {
+    while (nptr != 0) {
 	code = pr_ReadCoEntry(at,0,nptr,&centry);
 	if (code != 0) return code;
 	if ((centry.id != bid) || !(centry.flags & PRCONT)) return PRDBBAD;
@@ -526,7 +527,7 @@
 	if (code) return code;
     }
     nptr = tentry->next;
-    while (nptr != NULL) {
+    while (nptr != (afs_int32) NULL) {
 	code = pr_ReadCoEntry(at,0,nptr,&centry);
 	if (code != 0) return PRDBFAIL;
 	for (i=0;i<COSIZE;i++) {
@@ -638,7 +639,7 @@
     }
     last = 0;
     nptr = entry->next;
-    while (nptr != NULL) {
+    while (nptr != (afs_int32) NULL) {
  	code = pr_ReadCoEntry(tt,0,nptr,&nentry);
 	if (code != 0) return code;
 	last = nptr;
@@ -693,7 +694,7 @@
     bzero(&aentry,sizeof(aentry));
     aentry.flags |= PRCONT;
     aentry.id = entry->id;
-    aentry.next = NULL;
+    aentry.next = 0;
     aentry.entries[0] = aid;
     code = pr_WriteCoEntry(tt,0,nptr,&aentry);
     if (code != 0) return code;
@@ -739,7 +740,6 @@
     afs_int32 nptr;
     int size;
     int count = 0;
-    extern afs_int32 IDCmp();
 
     size = 0;
     alist->prlist_val = 0;
@@ -752,7 +752,7 @@
 	if (code) return code;
     }
 
-    for (nptr = tentry->next; nptr != NULL; nptr = centry.next) {
+    for (nptr = tentry->next; nptr != 0; nptr = centry.next) {
 	/* look through cont entries */
 	code = pr_ReadCoEntry(at,0,nptr,&centry);
 	if (code != 0) return code;
@@ -795,7 +795,6 @@
     afs_int32 nptr;
     afs_int32 size;
     int count = 0;
-    extern afs_int32 IDCmp();
 
     size = 0;
     alist->prlist_val = 0;
@@ -808,7 +807,7 @@
     }
 
     nptr = tentry->next;
-    while (nptr != NULL) {
+    while (nptr != (afs_uint32) NULL) {
 	/* look through cont entries */
 	code = pr_ReadCoEntry(at,0,nptr,&centry);
 	if (code != 0) return code;
@@ -831,7 +830,7 @@
 
     if (!code) {
 	    nptr = tentry2->next;
-	    while (nptr != NULL) {
+	    while (nptr != (afs_uint32) NULL) {
 		/* look through cont entries */
 		code = pr_ReadCoEntry(at,0,nptr,&centry);
 		if (code != 0) break;
@@ -869,7 +868,6 @@
     struct prentry tentry;
     int size;
     int count = 0;
-    extern afs_int32 IDCmp();
 
     size = 0;
     alist->prlist_val = 0;
@@ -970,7 +968,7 @@
     }
     if ((ntohl(cheader.version) == PRDBVERSION) &&
 	ntohl(cheader.headerSize) == sizeof(cheader) &&
-	ntohl(cheader.eofPtr) != NULL &&
+	ntohl(cheader.eofPtr) != (afs_uint32) NULL &&
 	FindByID(tt,ANONYMOUSID) != 0){
 	/* database exists, so we don't have to build it */
 	code = ubik_EndTrans(tt);
@@ -1016,7 +1014,7 @@
      */
     if ((ntohl(cheader.version) == PRDBVERSION) &&
 	ntohl(cheader.headerSize) == sizeof(cheader) &&
-	ntohl(cheader.eofPtr) != NULL &&
+	ntohl(cheader.eofPtr) != (afs_uint32) NULL &&
 	FindByID(tt,ANONYMOUSID) != 0){
 	/* database exists, so we don't have to build it */
 	code = ubik_EndTrans(tt);
Index: ptserver/testpt.c
===================================================================
RCS file: /cvs/openafs/src/ptserver/testpt.c,v
retrieving revision 1.2
diff -u -r1.2 testpt.c
--- ptserver/testpt.c	2000/11/04 10:05:26	1.2
+++ ptserver/testpt.c	2000/12/02 22:34:11
@@ -837,7 +837,7 @@
 static char tmp_cell_file[128] = "";
 static char tmp_noauth_file[128] = "";
 
-static afs_int32 MyAfterProc (as, arock)
+static int MyAfterProc (as, arock)
   struct cmd_syndesc *as;
   char *arock;
 {   afs_int32  code;
@@ -848,7 +848,7 @@
     return 0;
 }
 
-static afs_int32 MyBeforeProc (as, arock)
+static int MyBeforeProc (as, arock)
   struct cmd_syndesc *as;
   char *arock;
 {   afs_int32  code;
Index: ptserver/utils.c
===================================================================
RCS file: /cvs/openafs/src/ptserver/utils.c,v
retrieving revision 1.2
diff -u -r1.2 utils.c
--- ptserver/utils.c	2000/11/04 10:05:26	1.2
+++ ptserver/utils.c	2000/12/02 22:34:11
@@ -287,7 +287,7 @@
     if (code != 0) return 0;
     if (aid == tentry.id) return entry;
     entry = tentry.nextID;
-    while (entry != NULL) {
+    while (entry != 0) {
 	bzero(&tentry,sizeof(tentry));
 	code = pr_ReadEntry(at,0,entry,&tentry);
 	if (code != 0) return 0;
@@ -317,7 +317,7 @@
     if (code != 0) return 0;
     if ((strncmp(aname,tentryp->name,PR_MAXNAMELEN)) == 0) return entry;
     entry = tentryp->nextName;
-    while (entry != NULL) {
+    while (entry != 0) {
 	bzero(tentryp, sizeof(struct prentry));
 	code = pr_ReadEntry(at,0,entry, tentryp);
 	if (code != 0) return 0;
@@ -410,7 +410,7 @@
     return PRSUCCESS;
 }
 
-afs_int32 IDCmp(a,b)
+int IDCmp(a,b)
 afs_int32 *a;
 afs_int32 *b;
 {
@@ -437,18 +437,18 @@
     bzero(&tentry,sizeof(tentry));
     bzero(&bentry,sizeof(bentry));
     trail = 0;
-    if (current == NULL) return PRSUCCESS; /* already gone */
+    if (current == 0) return PRSUCCESS; /* already gone */
     code = pr_ReadEntry(tt,0,current,&tentry);
     if (code) return PRDBFAIL;
     while (aid != tentry.id) {
 	trail = current;
 	current = tentry.nextID;
-	if (current == NULL) break;
+	if (current == 0) break;
 	code = pr_ReadEntry(tt,0,current,&tentry);
 	if (code) return PRDBFAIL;
     }
-    if (current == NULL) return PRSUCCESS;  /* we didn't find him, so he's already gone */
-    if (trail == NULL) {
+    if (current == 0) return PRSUCCESS;  /* we didn't find him, so he's already gone */
+    if (trail == 0) {
 	/* it's the first entry! */
 	cheader.idHash[i] = htonl(tentry.nextID);
 	code = pr_Write(tt,0,72+HASHSIZE*4+i*4,(char *)&cheader.idHash[i],sizeof(cheader.idHash[i]));
@@ -504,18 +504,18 @@
     bzero(&tentry,sizeof(tentry));
     bzero(&bentry,sizeof(bentry));
     trail = 0;
-    if (current == NULL) return PRSUCCESS;  /* already gone */
+    if (current == 0) return PRSUCCESS;  /* already gone */
     code = pr_ReadEntry(tt,0,current,&tentry);
     if (code) return PRDBFAIL;
     while (strcmp(aname,tentry.name)) {
 	trail = current;
 	current = tentry.nextName;
-	if (current == NULL) break;
+	if (current == 0) break;
 	code = pr_ReadEntry(tt,0,current,&tentry);
 	if (code) return PRDBFAIL;
     }
-    if (current == NULL) return PRSUCCESS;  /* we didn't find him, already gone */
-    if (trail == NULL) {
+    if (current == 0) return PRSUCCESS;  /* we didn't find him, already gone */
+    if (trail == 0) {
 	/* it's the first entry! */
 	cheader.nameHash[i] = htonl(tentry.nextName);
 	code = pr_Write(tt,0,72+i*4,(char *)&cheader.nameHash[i],sizeof(cheader.nameHash[i]));
@@ -609,7 +609,7 @@
     le =  &thisEntry;
     lastLoc = 0;
     nptr = thisEntry.owned;
-    while (nptr != NULL) {
+    while (nptr != 0) {
 	if (nptr == lastLoc) te = le;
 	else {
 	    if (&thisEntry == le) te = &thatEntry;
@@ -690,7 +690,7 @@
     nptr = ntohl(cheader.orphan);
     bzero(&bentry,sizeof(bentry));
     loc = 0;
-    while (nptr != NULL) {
+    while (nptr != 0) {
 	code = pr_ReadEntry(at,0,nptr,&tentry);
 	if (code != 0) return PRDBFAIL;
 	if (gid == tentry.id) {
Index: rsh/rcmd.c
===================================================================
RCS file: /cvs/openafs/src/rsh/rcmd.c,v
retrieving revision 1.1
diff -u -r1.1 rcmd.c
--- rsh/rcmd.c	2000/11/04 02:28:52	1.1
+++ rsh/rcmd.c	2000/12/02 22:34:11
@@ -374,7 +374,8 @@
 	FILE *hostf;
 	char fhost[MAXHOSTNAMELEN];
 	int first = 1;
-	register char *sp, *p;
+	register char const *sp;
+	register char *p;
 	int baselen = -1;
 	int suid, sgid;
 	int group_list_size= -1;
@@ -596,7 +597,7 @@
 			nodomain = 1;
 			return(0);
 		}
-		ldomain[MAXHOSTNAMELEN] = NULL;
+		ldomain[MAXHOSTNAMELEN] = '\0';
 		if ((domainp = index(ldomain, '.')) == (char *)NULL) {
 			nodomain = 1;
 			return(0);
Index: rx/rx_globals.h
===================================================================
RCS file: /cvs/openafs/src/rx/rx_globals.h,v
retrieving revision 1.2
diff -u -r1.2 rx_globals.h
--- rx/rx_globals.h	2000/11/04 10:05:31	1.2
+++ rx/rx_globals.h	2000/12/02 22:34:11
@@ -274,7 +274,6 @@
 struct rx_call *rxi_NewCall();
 void rxi_FreeCall();
 struct rx_call *rxi_FindCall();
-void rx_ListenerProc();
 int rxi_ReadPacket();
 struct rx_packet *rxi_ReceivePacket();
 struct rx_packet *rxi_ReceiveDataPacket();
Index: rx/rx_lwp.c
===================================================================
RCS file: /cvs/openafs/src/rx/rx_lwp.c,v
retrieving revision 1.2
diff -u -r1.2 rx_lwp.c
--- rx/rx_lwp.c	2000/11/04 10:05:32	1.2
+++ rx/rx_lwp.c	2000/12/02 22:34:11
@@ -54,7 +54,7 @@
 }
 
 PROCESS rx_listenerPid;	/* LWP process id of socket listener process */
-void rx_ListenerProc();
+static void rx_ListenerProc();
 
 /*
  * Delay the current thread the specified number of seconds.
@@ -250,7 +250,7 @@
 /* This is the listener process request loop. The listener process loop
  * becomes a server thread when rxi_ListenerProc returns, and stays
  * server thread until rxi_ServerProc returns. */
-static void rx_ListenerProc()
+static void rx_ListenerProc(void *dummy)
 {
     int threadID;
     int sock;
Index: rx/rx_pthread.c
===================================================================
RCS file: /cvs/openafs/src/rx/rx_pthread.c,v
retrieving revision 1.2
diff -u -r1.2 rx_pthread.c
--- rx/rx_pthread.c	2000/11/04 10:05:33	1.2
+++ rx/rx_pthread.c	2000/12/02 22:34:11
@@ -49,6 +49,8 @@
  */
 static int rx_pthread_event_rescheduled = 0;
 
+static void *rx_ListenerProc(void *);
+
 /*
  * We supply an event handling thread for Rx's event processing.
  * The condition variable is used to wakeup the thread whenever a new
@@ -245,7 +247,7 @@
 /* This is the listener process request loop. The listener process loop
  * becomes a server thread when rxi_ListenerProc returns, and stays
  * server thread until rxi_ServerProc returns. */
-static void rx_ListenerProc(void *argp)
+static void *rx_ListenerProc(void *argp)
 {
     int threadID;
     int sock = (int) argp;
Index: rxgen/rpc_parse.c
===================================================================
RCS file: /cvs/openafs/src/rxgen/rpc_parse.c,v
retrieving revision 1.1
diff -u -r1.1 rpc_parse.c
--- rxgen/rpc_parse.c	2000/11/04 02:29:21	1.1
+++ rxgen/rpc_parse.c	2000/12/02 22:34:12
@@ -96,6 +96,7 @@
 static unsigned_dec();
 static def_package();
 static def_prefix();
+static def_statindex();
 static def_startingopcode();
 static def_split();
 static customize_struct();
Index: rxkad/rxkad_server.c
===================================================================
RCS file: /cvs/openafs/src/rxkad/rxkad_server.c,v
retrieving revision 1.2
diff -u -r1.2 rxkad_server.c
--- rxkad/rxkad_server.c	2000/11/04 10:05:44	1.2
+++ rxkad/rxkad_server.c	2000/12/02 22:34:12
@@ -76,7 +76,7 @@
 static void init_random_int32 ()
 {   struct timeval key;
 
-    gettimeofday (&key, (char *) 0);
+    gettimeofday (&key, NULL);
     LOCK_RM
     fc_keysched (&key, random_int32_schedule);
     UNLOCK_RM
Index: sys/rmtsysc.c
===================================================================
RCS file: /cvs/openafs/src/sys/rmtsysc.c,v
retrieving revision 1.3
diff -u -r1.3 rmtsysc.c
--- sys/rmtsysc.c	2000/11/05 01:50:47	1.3
+++ sys/rmtsysc.c	2000/12/02 22:34:12
@@ -144,7 +144,8 @@
 {
     struct rx_connection *conn;
     clientcred creds;
-    afs_int32 errorcode, errornumber, newpag, ngroups, j, groups[NGROUPS_MAX];
+    afs_int32 errorcode, errornumber, newpag, ngroups, j;
+	afs_uint32 groups[NGROUPS_MAX];
 
     if (!(conn = rx_connection(&errorcode, "setpag"))) {
 	/* Remote call can't be performed for some reason.
@@ -309,7 +310,7 @@
 
 static afs_int32 SetClientCreds(creds, groups)
 struct clientcred *creds;
-afs_int32 *groups;
+gid_t *groups;
 {
     afs_int32 ngroups;
 
Index: ubik/ubikclient.c
===================================================================
RCS file: /cvs/openafs/src/ubik/ubikclient.c,v
retrieving revision 1.2
diff -u -r1.2 ubikclient.c
--- ubik/ubikclient.c	2000/11/04 10:05:54	1.2
+++ ubik/ubikclient.c	2000/12/02 22:34:12
@@ -132,7 +132,7 @@
  * use time and pid to try to get some initial randomness.
  */
 #if !defined(UKERNEL)
-#define	ranstage(x)	(x)= (afs_uint32) (3141592621*((afs_uint32)x)+1)
+#define	ranstage(x)	(x)= (afs_uint32) (3141592621U*((afs_uint32)x)+1)
 
 unsigned int afs_random(void)
 {
Index: usd/usd_file.c
===================================================================
RCS file: /cvs/openafs/src/usd/usd_file.c,v
retrieving revision 1.2
diff -u -r1.2 usd_file.c
--- usd/usd_file.c	2000/11/04 10:05:57	1.2
+++ usd/usd_file.c	2000/12/02 22:34:12
@@ -64,8 +64,8 @@
 static int usd_FileRead(
   usd_handle_t usd,
   char *buf,
-  u_int nbytes,
-  u_int *xferdP)
+  afs_uint32 nbytes,
+  afs_uint32 *xferdP)
 {
     int fd = (int)(usd->handle);
     int got;
@@ -84,8 +84,8 @@
 static int usd_FileWrite(
   usd_handle_t usd,
   char *buf,
-  u_int nbytes,
-  u_int *xferdP)
+  afs_uint32 nbytes,
+  afs_uint32 *xferdP)
 {
     int fd = (int)(usd->handle);
     int sent;
Index: viced/viced.c
===================================================================
RCS file: /cvs/openafs/src/viced/viced.c,v
retrieving revision 1.2
diff -u -r1.2 viced.c
--- viced/viced.c	2000/11/04 10:06:17	1.2
+++ viced/viced.c	2000/12/02 22:34:15
@@ -87,7 +87,7 @@
 static void	ClearXStatValues(), NewParms(), PrintCounters();
 static void     ResetCheckDescriptors(void), ResetCheckSignal(void);
 static int	CheckSignal();
-static int	FiveMinuteCheckLWP(), HostCheckLWP();
+static void	*FiveMinuteCheckLWP(), *HostCheckLWP();
 extern	int     GetKeysFromToken();
 extern struct rx_securityClass *rxnull_NewServerSecurityObject();
 extern int RXAFS_ExecuteRequest();
@@ -624,7 +624,7 @@
 
 
 /* This LWP does things roughly every 5 minutes */
-static FiveMinuteCheckLWP()
+static void *FiveMinuteCheckLWP()
 
 {
     static int msg  = 0;
@@ -663,7 +663,7 @@
  * other 5 minute activities because it may be delayed by timeouts when
  * it probes the workstations
  */
-static HostCheckLWP()
+static void *HostCheckLWP()
 
 {
     ViceLog(1, ("Starting Host check process\n"));
Index: vlserver/cnvldb.c
===================================================================
RCS file: /cvs/openafs/src/vlserver/cnvldb.c,v
retrieving revision 1.2
diff -u -r1.2 cnvldb.c
--- vlserver/cnvldb.c	2000/11/04 10:06:18	1.2
+++ vlserver/cnvldb.c	2000/12/02 22:34:15
@@ -56,7 +56,7 @@
 int fromvers = 0, tovers = 0, showversion = 0;
 afs_uint32 mhaddr;
 afs_int32 dbsize;
-char *pathname = NULL;
+char const *pathname = NULL;
 const char *dbPath;
 
 static handleit(as) 
Index: vlserver/vlserver.c
===================================================================
RCS file: /cvs/openafs/src/vlserver/vlserver.c,v
retrieving revision 1.2
diff -u -r1.2 vlserver.c
--- vlserver/vlserver.c	2000/11/04 10:06:20	1.2
+++ vlserver/vlserver.c	2000/12/02 22:34:15
@@ -53,12 +53,12 @@
 extern afs_int32 ubik_lastYesTime;
 extern afs_int32 ubik_nBuffers;
 
-static	CheckSignal();
+static CheckSignal();
 int LogLevel = 0;
 int smallMem = 0;
 int rxJumbograms = 1;  /* default is to send and receive jumbo grams */
 
-CheckSignal_Signal()       {IOMGR_SoftSig(CheckSignal, 0);}
+static void CheckSignal_Signal()       {IOMGR_SoftSig(CheckSignal, 0);}
 
 static CheckSignal()
 {
Index: vol/fssync.c
===================================================================
RCS file: /cvs/openafs/src/vol/fssync.c,v
retrieving revision 1.2
diff -u -r1.2 fssync.c
--- vol/fssync.c	2000/11/04 10:06:22	1.2
+++ vol/fssync.c	2000/12/02 22:34:15
@@ -105,7 +105,7 @@
 
 /* Forward declarations */
 static int getport();
-static void FSYNC_sync();
+static void *FSYNC_sync();
 static void FSYNC_newconnection();
 static void FSYNC_com();
 static void FSYNC_Drop();
@@ -238,7 +238,7 @@
     return sd;
 }
 
-static void FSYNC_sync() {
+static void *FSYNC_sync() {
     struct sockaddr_in addr;
     int on = 1;
     extern VInit;
Index: vol/ihandle.c
===================================================================
RCS file: /cvs/openafs/src/vol/ihandle.c,v
retrieving revision 1.2
diff -u -r1.2 ihandle.c
--- vol/ihandle.c	2000/11/04 10:06:22	1.2
+++ vol/ihandle.c	2000/12/02 22:34:16
@@ -446,7 +446,7 @@
 }
 
 /* Open a file for buffered I/O */
-StreamHandle_t *stream_open(char *filename, char *mode)
+StreamHandle_t *stream_open(char const *filename, char *mode)
 {
     FD_t fd;
 
Index: vol/ihandle.h
===================================================================
RCS file: /cvs/openafs/src/vol/ihandle.h,v
retrieving revision 1.2
diff -u -r1.2 ihandle.h
--- vol/ihandle.h	2000/11/04 10:06:22	1.2
+++ vol/ihandle.h	2000/12/02 22:34:16
@@ -258,7 +258,7 @@
 extern int fd_close(FdHandle_t *fdP);
 extern int fd_reallyclose(FdHandle_t *fdP);
 extern StreamHandle_t *stream_fdopen(FD_t fd);
-extern StreamHandle_t *stream_open(char *file, char *mode);
+extern StreamHandle_t *stream_open(char const *file, char *mode);
 extern int stream_read(void *ptr, int size, int nitems,
 		       StreamHandle_t *streamP);
 extern int stream_write(void *ptr, int size, int nitems,
Index: vol/vol-salvage.c
===================================================================
RCS file: /cvs/openafs/src/vol/vol-salvage.c,v
retrieving revision 1.2
diff -u -r1.2 vol-salvage.c
--- vol/vol-salvage.c	2000/11/04 10:06:26	1.2
+++ vol/vol-salvage.c	2000/12/02 22:34:17
@@ -430,7 +430,7 @@
 			    int RW, int check, int *deleteMe);
 void showlog(void);
 int UseTheForceLuke(char *path);
-
+static int IsVnodeOrphaned(VnodeId vnode);
 
 
 /* Uniquifier stored in the Inode */
Index: vol/volume.c
===================================================================
RCS file: /cvs/openafs/src/vol/volume.c,v
retrieving revision 1.2
diff -u -r1.2 volume.c
--- vol/volume.c	2000/11/04 10:06:28	1.2
+++ vol/volume.c	2000/12/02 22:34:17
@@ -98,7 +98,7 @@
 #include <sys/time.h>
 #endif /* ITIMER_REAL */
 #endif /* AFS_NT40_ENV */
-#if defined(AFS_SUN5_ENV) || defined(AFS_NT40_ENV)
+#if defined(AFS_SUN5_ENV) || defined(AFS_NT40_ENV) || defined(AFS_LINUX20_ENV)
 #include <string.h>
 #else
 #include <strings.h>
Index: vol/vutil.c
===================================================================
RCS file: /cvs/openafs/src/vol/vutil.c,v
retrieving revision 1.2
diff -u -r1.2 vutil.c
--- vol/vutil.c	2000/11/04 10:06:29	1.2
+++ vol/vutil.c	2000/12/02 22:34:17
@@ -56,7 +56,7 @@
 #ifdef	AFS_AIX_ENV
 #include <sys/lockf.h>
 #endif
-#if defined(AFS_SUN5_ENV) || defined(AFS_NT40_ENV)
+#if defined(AFS_SUN5_ENV) || defined(AFS_NT40_ENV) || defined(AFS_LINUX20_ENV)
 #include <string.h>
 #else
 #include <strings.h>
Index: volser/dumpstuff.c
===================================================================
RCS file: /cvs/openafs/src/volser/dumpstuff.c,v
retrieving revision 1.2
diff -u -r1.2 dumpstuff.c
--- volser/dumpstuff.c	2000/11/04 10:06:32	1.2
+++ volser/dumpstuff.c	2000/12/02 22:34:18
@@ -673,7 +673,7 @@
     if (!code) code = DumpString(iodp, 'n',V_name(vp));
     dumpTimes[0] = fromtime;
     dumpTimes[1] = V_backupDate(vp);	/* Until the time the clone was made */
-    if (!code) code = DumpArrayInt32(iodp, 't', (unsigned int *)dumpTimes, 2);
+    if (!code) code = DumpArrayInt32(iodp, 't', (afs_uint32 *)dumpTimes, 2);
     return code;
 }
 
@@ -811,7 +811,7 @@
     register Volume *vp;
     struct iod iod;
     register struct iod *iodp = &iod;
-    int *b1=0, *b2=0;
+    afs_int32 *b1=0, *b2=0;
     int s1=0, s2=0, delo=0, tdelo;
     int tag;
 
@@ -913,7 +913,7 @@
     while (tag == D_VNODE) {
         int haveStuff = 0;
 	bzero(buf, sizeof (buf));
-	if (!ReadInt32(iodp, (unsigned int *)&vnodeNumber))
+	if (!ReadInt32(iodp, (afs_uint32 *)&vnodeNumber))
 	    break;
 
 	ReadInt32(iodp, &vnode->uniquifier);
@@ -946,7 +946,7 @@
 		    ReadInt32(iodp, &vnode->owner);
 		    break;
 	        case 'g':
-		    ReadInt32(iodp, (unsigned int *)&vnode->group);
+		    ReadInt32(iodp, (afs_uint32 *)&vnode->group);
 		    break;
 		case 'b': {
 		    unsigned short modeBits;
@@ -1101,7 +1101,7 @@
     register tag;
     afs_uint32 beginMagic;
     if (iod_getc(iodp) != D_DUMPHEADER || !ReadInt32(iodp, &beginMagic)
-       || !ReadInt32(iodp, (unsigned int *)&hp->version)
+       || !ReadInt32(iodp, (afs_uint32 *)&hp->version)
        || beginMagic != DUMPBEGINMAGIC
        ) return 0;
     hp->volumeId = 0;
@@ -1122,7 +1122,7 @@
 		    return 0;
 		hp->nDumpTimes = (arrayLength >> 1);
 		for (i = 0; i<hp->nDumpTimes; i++)
-		    if (!ReadInt32(iodp, (unsigned int *)&hp->dumpTimes[i].from) || !ReadInt32(iodp, (unsigned int *)&hp->dumpTimes[i].to))
+		    if (!ReadInt32(iodp, (afs_uint32 *)&hp->dumpTimes[i].from) || !ReadInt32(iodp, (afs_uint32 *)&hp->dumpTimes[i].to))
 		        return 0;
 		break;
 	}

--------------0F9EDC40BF210856659E1161--