[OpenAFS-devel] [PATCH] flexelint: prototype changes

Joe Buehler jbuehler@hekimian.com
Fri, 21 Nov 2003 15:01:34 -0500


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

This patch makes various corrections to global prototypes.

There is one place of note in fs.c where typedefs for afs_int32
and afs_uint32 conflict with afs/stds.h.  I just added a note
to that effect.

Prototypes in cm.h are incorrect for Windows NT.  I don't know whether
the return type involved changes from platform to platform -- they
come from .xg files.

Some prototypes are commented out or #ifdef'd to match the code
that uses them.

Some global variables conflict between modules and have been made static.
The bufferBlock variable was of two completely different types...

In stds.h, I changed the declaration of afs_intmax_t to reflect the fact that
the Windows platform supports 64 bit integers.  This may be incorrect semantically,
but I believe it is needed for the %llx format to match afs_intmax_t arguments
(for printing of inodes mainly, I think).

There were two different declarations for the rxkad_stats structure -- I synced
them up.
-- 
Joe Buehler


--------------030807050708020901010905
Content-Type: text/plain;
 name="temp.patch.prototype-fixes"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
 filename="temp.patch.prototype-fixes"

--- ./src/WINNT/afsapplib/fastlist.cpp.~1~	2000-11-06 10:49:00.000000000 -0500
+++ ./src/WINNT/afsapplib/fastlist.cpp	2003-11-20 14:01:02.000000000 -0500
@@ -229,7 +229,7 @@
 void FastList_OnSize (HWND hList);
 void FastList_OnPaint (HWND hList);
 void FastList_OnPaintItem (LPFASTLIST pfl, LPFASTLISTDRAWITEM pdi);
-void FastList_OnPaintItem_DrawImage (LPFASTLIST pfl, LPFASTLISTDRAWITEM pdi, int iImage, LONG xImage, LONG yImage, BOOL fHLines);
+BOOL FastList_OnPaintItem_DrawImage (LPFASTLIST pfl, LPFASTLISTDRAWITEM pdi, HIMAGELIST hil, int iImage, LONG xImage, LONG yImage, BOOL fHLines);
 void FastList_OnPaintItem_GetItemColors (LPFASTLIST pfl, LPFASTLISTDRAWITEM pdi, COLORREF *pclrFore, COLORREF *pclrBack);
 void FastList_OnPaintItem_TreeLines (LPFASTLIST pfl, LPFASTLISTDRAWITEM pdi, DWORD dwLines, RECT *prLines);
 void FastList_OnPaintItem_Large (LPFASTLIST pfl, LPFASTLISTDRAWITEM pdi);
--- ./src/WINNT/afsd/cm.h.~1~	2003-06-19 12:43:15.000000000 -0400
+++ ./src/WINNT/afsd/cm.h	2003-11-20 10:28:54.000000000 -0500
@@ -17,11 +17,12 @@
 #endif /* DJGPP */
 
 /* from .xg file */
-long VL_GetEntryByID(struct rx_connection *, long, long, struct vldbentry *);
-long VL_GetEntryByNameO(struct rx_connection *, char *, struct vldbentry *);
-long VL_ProbeServer(struct rx_connection *);
-long VL_GetEntryBYIDN(struct rx_connection *, long, long, struct nvldbentry *);
-long VL_GetEntryByNameN(struct rx_connection *, char *, struct nvldbentry *);
+/* FIXME: these were "long" but Windows NT wants "int" */
+int VL_GetEntryByID(struct rx_connection *, long, long, struct vldbentry *);
+int VL_GetEntryByNameO(struct rx_connection *, char *, struct vldbentry *);
+int VL_ProbeServer(struct rx_connection *);
+int VL_GetEntryBYIDN(struct rx_connection *, long, long, struct nvldbentry *);
+int VL_GetEntryByNameN(struct rx_connection *, char *, struct nvldbentry *);
 
 /* from .xg file */
 extern StartRXAFS_FetchData (struct rx_call *,
--- ./src/WINNT/afsd/cm_buf.c.~1~	2003-08-25 14:24:22.000000000 -0400
+++ ./src/WINNT/afsd/cm_buf.c	2003-11-19 16:54:32.000000000 -0500
@@ -22,7 +22,7 @@
 
 #include "afsd.h"
 
-void afsi_log();
+extern void afsi_log(char *pattern, ...);
 
 /* This module implements the buffer package used by the local transaction
  * system (cm).  It is initialized by calling cm_Init, which calls buf_Init;
--- ./src/WINNT/afsd/cm_callback.c.~1~	2003-08-25 14:24:22.000000000 -0400
+++ ./src/WINNT/afsd/cm_callback.c	2003-11-20 13:25:40.000000000 -0500
@@ -25,6 +25,8 @@
 
 #include "afsd.h"
 
+/*extern void afsi_log(char *pattern, ...);*/
+
 /* read/write lock for all global storage in this module */
 osi_rwlock_t cm_callbackLock;
 
--- ./src/WINNT/afsd/cm_dcache.c.~1~	2002-01-08 15:44:37.000000000 -0500
+++ ./src/WINNT/afsd/cm_dcache.c	2003-11-20 13:25:33.000000000 -0500
@@ -22,6 +22,10 @@
 
 #include "afsd.h"
 
+#ifdef DEBUG
+extern void afsi_log(char *pattern, ...);
+#endif
+
 osi_mutex_t cm_bufGetMutex;
 #ifdef AFS_FREELANCE_CLIENT
 extern osi_mutex_t cm_Freelance_Lock;
--- ./src/WINNT/afsd/cm_dns.c.~1~	2001-10-09 00:56:00.000000000 -0400
+++ ./src/WINNT/afsd/cm_dns.c	2003-11-20 14:29:30.000000000 -0500
@@ -19,6 +19,8 @@
 #include <lwp.h>
 #include <afs/afsint.h>
 
+/*extern void afsi_log(char *pattern, ...);*/
+
 extern int errno;
 static char dns_addr[30];
 #ifdef DJGPP
--- ./src/WINNT/afsd/cm_rpc.c.~1~	2003-03-14 14:47:35.000000000 -0500
+++ ./src/WINNT/afsd/cm_rpc.c	2003-11-19 16:54:44.000000000 -0500
@@ -37,7 +37,7 @@
  * can match them up.  A list of session keys, searched by UUID, is maintained.
  */
 
-extern void afsi_log();
+extern void afsi_log(char *pattern, ...);
 
 typedef struct tokenEvent {
 	afs_uuid_t uuid;
--- ./src/WINNT/afsd/cm_scache.c.~1~	2002-01-08 15:44:37.000000000 -0500
+++ ./src/WINNT/afsd/cm_scache.c	2003-11-20 13:25:24.000000000 -0500
@@ -22,6 +22,8 @@
 
 #include "afsd.h"
 
+/*extern void afsi_log(char *pattern, ...);*/
+
 extern osi_hyper_t hzero;
 
 /* hash table stuff */
--- ./src/WINNT/afsd/fs.c.~1~	2001-11-10 17:31:09.000000000 -0500
+++ ./src/WINNT/afsd/fs.c	2003-11-20 14:24:25.000000000 -0500
@@ -23,10 +23,9 @@
 #include <osi.h>
 #include <afsint.h>
 
+/* FIXME: this disagrees with afs/stds.h on AFS_64BIT_ENV platforms */
 typedef long afs_int32;
 typedef unsigned long afs_uint32;
-typedef short afs_int16;
-typedef unsigned short afs_uint16;
 
 #include "fs.h"
 #include "fs_utils.h"
--- ./src/WINNT/afsd/smb.c.~1~	2003-08-25 14:24:22.000000000 -0400
+++ ./src/WINNT/afsd/smb.c	2003-11-20 13:33:57.000000000 -0500
@@ -57,7 +57,7 @@
 
 unsigned int sessionGen = 0;
 
-void afsi_log();
+extern void afsi_log(char *pattern, ...);
 
 osi_hyper_t hzero = {0, 0};
 osi_hyper_t hones = {0xFFFFFFFF, -1};
--- ./src/WINNT/afsd/smb.c.~1~	2003-08-25 14:24:22.000000000 -0400
+++ ./src/WINNT/afsd/smb.c	2003-11-20 13:33:57.000000000 -0500
@@ -157,8 +157,8 @@
 void smb_DispatchPacket(smb_vc_t *vcp, smb_packet_t *inp, smb_packet_t *outp,
 	NCB *ncbp, raw_write_cont_t *rwcp);
 void smb_NetbiosInit();
-extern char cm_HostName[];
 #ifdef DJGPP
+extern char cm_HostName[];
 extern char cm_confDir[];
 #endif
 
--- ./src/WINNT/afsd/smb.h.~1~	2001-11-21 01:44:28.000000000 -0500
+++ ./src/WINNT/afsd/smb.h	2003-11-19 16:52:05.000000000 -0500
@@ -296,7 +296,7 @@
 	void *lockp;
 } smb_waitingLock_t;
 
-smb_waitingLock_t *smb_allWaitingLocks;
+extern smb_waitingLock_t *smb_allWaitingLocks;
 
 typedef long (smb_proc_t)(smb_vc_t *vcp, smb_packet_t *inp, smb_packet_t *outp);
 
--- ./src/WINNT/afssvrcfg/services_page.cpp.~1~	2000-11-04 05:01:54.000000000 -0500
+++ ./src/WINNT/afssvrcfg/services_page.cpp	2003-11-20 14:11:50.000000000 -0500
@@ -70,7 +70,7 @@
 static void EnableScMachine(BOOL bEnable = TRUE);
 static void OnScMachineChange();
 static void CheckEnableBak();
-static void PrepareToConfig(CONFIG_STATE& state, BOOL bRunning, BOOL bOn);
+static BOOL PrepareToConfig(CONFIG_STATE& state, BOOL bRunning, BOOL bOn, UINT uiCtrlID);
 static BOOL PrepareToConfig();
 static void CheckEnableApply();
 
--- ./src/WINNT/afssvrmgr/dispguts.cpp.~1~	2000-11-04 05:02:03.000000000 -0500
+++ ./src/WINNT/afssvrmgr/dispguts.cpp	2003-11-19 16:17:51.000000000 -0500
@@ -118,8 +118,8 @@
 
    // Add an entry in the Servers list for each server in the cell.
    //
-   LPIDENT lpiSelStart = (LPIDENT)FL_GetSelectedData (pdr->hList);
-   BOOL fRefresh = FALSE;
+//   LPIDENT lpiSelStart = (LPIDENT)FL_GetSelectedData (pdr->hList);
+//   BOOL fRefresh = FALSE;
 
    LPCELL lpCell;
    if (!g.lpiCell || !(lpCell = g.lpiCell->OpenCell()))
--- ./src/auth/userok.c.~1~	2003-07-15 19:14:41.000000000 -0400
+++ ./src/auth/userok.c	2003-11-18 13:04:26.000000000 -0500
@@ -59,7 +59,7 @@
 UNLOCK_GLOBAL_MUTEX}
 #endif /* !defined(UKERNEL) */
 
-static
+static int
 GetNoAuthFlag(adir)
      struct afsconf_dir *adir;
 {
--- ./src/auth/userok.c.~1~	2003-07-15 19:14:41.000000000 -0400
+++ ./src/auth/userok.c	2003-11-18 13:04:26.000000000 -0500
@@ -71,6 +71,7 @@
 }
 
 
+int
 afsconf_GetNoAuthFlag(adir)
      struct afsconf_dir *adir;
 {
--- ./src/auth/userok.c.~1~	2003-07-15 19:14:41.000000000 -0400
+++ ./src/auth/userok.c	2003-11-18 13:04:26.000000000 -0500
@@ -80,6 +81,7 @@
     UNLOCK_GLOBAL_MUTEX return rc;
 }
 
+void
 afsconf_SetNoAuthFlag(adir, aflag)
      struct afsconf_dir *adir;
      int aflag;
--- ./src/auth/userok.c.~1~	2003-07-15 19:14:41.000000000 -0400
+++ ./src/auth/userok.c	2003-11-18 13:04:26.000000000 -0500
@@ -104,6 +106,7 @@
 UNLOCK_GLOBAL_MUTEX}
 
 /* deletes a user from the UserList file */
+int
 afsconf_DeleteUser(adir, auser)
      struct afsconf_dir *adir;
      register char *auser;
--- ./src/auth/userok.c.~1~	2003-07-15 19:14:41.000000000 -0400
+++ ./src/auth/userok.c	2003-11-18 13:04:26.000000000 -0500
@@ -190,6 +193,7 @@
 }
 
 /* returns nth super user from the UserList file */
+int
 afsconf_GetNthUser(adir, an, abuffer, abufferLen)
      struct afsconf_dir *adir;
      afs_int32 an;
--- ./src/auth/userok.c.~1~	2003-07-15 19:14:41.000000000 -0400
+++ ./src/auth/userok.c	2003-11-18 13:04:26.000000000 -0500
@@ -262,6 +266,7 @@
 }
 
 /* add a user to the user list, checking for duplicates */
+int
 afsconf_AddUser(adir, aname)
      struct afsconf_dir *adir;
      char *aname;
--- ./src/auth/writeconfig.c.~1~	2003-07-15 19:14:41.000000000 -0400
+++ ./src/auth/writeconfig.c	2003-11-18 09:57:55.000000000 -0500
@@ -48,7 +48,7 @@
     by acellInfo parm.   Useful only on the server (which describes only one cell).
 */
 
-static
+static int
 VerifyEntries(aci)
      register struct afsconf_cell *aci;
 {
--- ./src/auth/writeconfig.c.~1~	2003-07-15 19:14:41.000000000 -0400
+++ ./src/auth/writeconfig.c	2003-11-18 09:57:55.000000000 -0500
@@ -90,6 +90,7 @@
    This is a handle to the internal cache that is maintained by the bosserver.
    */
 
+int
 afsconf_SetCellInfo(adir, apath, acellInfo)
      struct afsconf_dir *adir;
      char *apath;
--- ./src/auth/writeconfig.c.~1~	2003-07-15 19:14:41.000000000 -0400
+++ ./src/auth/writeconfig.c	2003-11-18 09:57:55.000000000 -0500
@@ -101,6 +102,7 @@
     return code;
 }
 
+int
 afsconf_SetExtendedCellInfo(adir, apath, acellInfo, clones)
      struct afsconf_dir *adir;
      char *apath;
--- ./src/bucoord/bc_status.c.~1~	2003-07-15 19:14:46.000000000 -0400
+++ ./src/bucoord/bc_status.c	2003-11-19 22:11:14.000000000 -0500
@@ -103,6 +107,7 @@
 
 char *cmdLine;
 
+int
 cmdDispatch()
 {
 #define	MAXV	100
--- ./src/bucoord/commands.c.~1~	2003-07-15 19:14:47.000000000 -0400
+++ ./src/bucoord/commands.c	2003-11-20 14:34:18.000000000 -0500
@@ -3080,6 +3058,7 @@
     return (code);
 }
 
+int
 compareDump(ptr1, ptr2)
      struct budb_dumpEntry *ptr1, *ptr2;
 {
--- ./src/bucoord/dlq.c.~1~	2003-07-15 19:14:47.000000000 -0400
+++ ./src/bucoord/dlq.c	2003-11-14 14:14:24.000000000 -0500
@@ -89,6 +89,7 @@
  *	move all the items on the fromptr and append to the toptr's list
  */
 
+void
 dlqMoveb(fromptr, toptr)
      dlqlinkP fromptr;
      dlqlinkP toptr;
--- ./src/bucoord/status.c.~1~	2003-07-15 19:14:47.000000000 -0400
+++ ./src/bucoord/status.c	2003-11-14 14:14:25.000000000 -0500
@@ -71,6 +71,7 @@
 
 /* general */
 
+void
 clearStatus(taskId, flags)
      afs_uint32 taskId;
      afs_uint32 flags;
--- ./src/bucoord/status.c.~1~	2003-07-15 19:14:47.000000000 -0400
+++ ./src/bucoord/status.c	2003-11-14 14:14:25.000000000 -0500
@@ -141,6 +142,7 @@
     return (ptr);
 }
 
+void
 setStatus(taskId, flags)
      afs_uint32 taskId;
      afs_uint32 flags;
--- ./obj/dest/free/include/afs/cm.h.~1~	2003-06-19 12:43:15.000000000 -0400
+++ ./obj/dest/free/include/afs/cm.h	2003-11-20 11:12:19.000000000 -0500
@@ -17,11 +17,12 @@
 #endif /* DJGPP */
 
 /* from .xg file */
-long VL_GetEntryByID(struct rx_connection *, long, long, struct vldbentry *);
-long VL_GetEntryByNameO(struct rx_connection *, char *, struct vldbentry *);
-long VL_ProbeServer(struct rx_connection *);
-long VL_GetEntryBYIDN(struct rx_connection *, long, long, struct nvldbentry *);
-long VL_GetEntryByNameN(struct rx_connection *, char *, struct nvldbentry *);
+/* FIXME: these were "long" but Windows NT wants "int" */
+int VL_GetEntryByID(struct rx_connection *, long, long, struct vldbentry *);
+int VL_GetEntryByNameO(struct rx_connection *, char *, struct vldbentry *);
+int VL_ProbeServer(struct rx_connection *);
+int VL_GetEntryBYIDN(struct rx_connection *, long, long, struct nvldbentry *);
+int VL_GetEntryByNameN(struct rx_connection *, char *, struct nvldbentry *);
 
 /* from .xg file */
 extern StartRXAFS_FetchData (struct rx_call *,
--- ./src/butc/butc_xbsa.c.~1~	2003-07-15 19:14:48.000000000 -0400
+++ ./src/butc/butc_xbsa.c	2003-11-20 09:33:38.000000000 -0500
@@ -25,6 +25,8 @@
 #include "butc_xbsa.h"
 #include <afs/butx.h>
 
+#include "error_macros.h"
+
 extern int debugLevel;
 
 
--- ./src/butc/dump.c.~1~	2003-08-08 17:54:36.000000000 -0400
+++ ./src/butc/dump.c	2003-11-20 13:14:37.000000000 -0500
@@ -59,15 +61,13 @@
 
 extern struct rx_connection *UV_Bind();
 
-extern char *globalCellName;
-
-extern afs_int32 xbsaType;
 extern afs_int32 groupId;
 extern afs_int32 BufferSize;
 extern afs_int32 statusSize;
 extern FILE *centralLogIO;
 afs_int32 lastPass = 0;
 #ifdef xbsa
+extern afs_int32 xbsaType;
 char *butcdumpIdStr = "/backup_afs_volume_dumps";
 extern struct butx_transactionInfo butxInfo;
 extern char *xbsaObjectOwner;
--- ./src/butc/dump.c.~1~	2003-08-08 17:54:36.000000000 -0400
+++ ./src/butc/dump.c	2003-11-20 13:14:37.000000000 -0500
@@ -145,7 +145,7 @@
 
 afs_int32 tc_EndMargin;
 afs_int32 tc_KEndMargin;
-char *bufferBlock;
+static char *bufferBlock;
 
 /* compute the absolute expiration date */
 afs_int32
--- ./src/butc/list.c.~1~	2003-07-15 19:14:49.000000000 -0400
+++ ./src/butc/list.c	2003-11-20 13:13:30.000000000 -0500
@@ -23,7 +23,9 @@
 #include <errno.h>
 #include <afs/tcdata.h>
 
-extern int debugLevel;
+#include "error_macros.h"
+
+/*extern int debugLevel;*/
 static struct dumpNode *dumpQHeader;	/* ptr to head of the dumpNode list */
 static struct dumpNode headNode;	/* the dummy header of the node list */
 static afs_int32 maxTaskID;	/* the largest task Id allotted so far, this is never reused */
--- ./src/butc/lwps.c.~1~	2003-08-08 16:01:25.000000000 -0400
+++ ./src/butc/lwps.c	2003-11-20 13:13:18.000000000 -0500
@@ -48,9 +47,11 @@
 extern char *whoami;
 extern char *extractDumpName();
 extern int BufferSize;		/* Size in B stored for header info */
-extern char *restoretofile;
 FILE *restoretofilefd;
+#ifdef xbsa
+extern char *restoretofile;
 extern int forcemultiple;
+#endif
 
 /* XBSA Global Parameters */
 afs_int32 xbsaType;
--- ./src/butc/lwps.c.~1~	2003-08-08 16:01:25.000000000 -0400
+++ ./src/butc/lwps.c	2003-11-20 13:13:18.000000000 -0500
@@ -58,7 +59,7 @@
 struct butx_transactionInfo butxInfo;
 #endif
 
-struct TapeBlock {		/* A 16KB tapeblock */
+static struct TapeBlock {		/* A 16KB tapeblock */
     char mark[BUTM_HDRSIZE];	/* Header info */
     char data[BUTM_BLKSIZE];	/* data */
 } *bufferBlock;
--- ./src/butc/lwps.c.~1~	2003-08-08 16:01:25.000000000 -0400
+++ ./src/butc/lwps.c	2003-11-20 13:13:18.000000000 -0500
@@ -125,7 +126,7 @@
 afs_int32 readVolumeHeader( /*char *buffer,afs_int32 bufloc,(struct volumeHeader *)vhptr */ );
 
 /* The on-disk volume header or trailer can differ in size from platform to platform */
-struct TapeBlock tapeBlock;
+static struct TapeBlock tapeBlock;
 char tapeVolumeHT[sizeof(struct volumeHeader) + 2 * sizeof(char)];
 
 void
--- ./src/butc/lwps.c.~1~	2003-08-08 16:01:25.000000000 -0400
+++ ./src/butc/lwps.c	2003-11-20 13:13:18.000000000 -0500
@@ -402,6 +403,7 @@
         * * notes:
         * *     only external clients are in recoverDb.c. Was static. PA
         */
+void
 FFlushInput()
 {
     int w;
--- ./src/config/mkvers.c.~1~	2003-07-15 19:14:55.000000000 -0400
+++ ./src/config/mkvers.c	2003-11-18 13:44:57.000000000 -0500
@@ -84,6 +84,7 @@
     exit(1);
 }
 
+int
 main(int argc, char **argv)
 {
     char stampsFile[1024];
--- ./src/config/stds.h.~1~	2003-09-13 16:14:32.000000000 -0400
+++ ./src/config/stds.h	2003-11-20 12:05:44.000000000 -0500
@@ -121,7 +121,7 @@
 
 /* Maximum integer sizes.  Also what is expected by %lld, %llu in
  * afs_snprintf. */
-#ifdef AFS_64BIT_CLIENT
+#if defined(AFS_64BIT_CLIENT) || defined(AFS_NT40_ENV)
 typedef afs_int64 afs_intmax_t;
 typedef afs_uint64 afs_uintmax_t;
 #else /* !AFS_64BIT_CLIENT */
--- ./src/des/read_pssword.c.~1~	2003-07-15 19:15:00.000000000 -0400
+++ ./src/des/read_pssword.c	2003-11-18 11:09:48.000000000 -0500
@@ -87,7 +87,7 @@
 #endif
 
 int des_read_pw_string(char *, int, char *, int);
-int des_string_to_key(char *, des_cblock *);
+void des_string_to_key(char *, des_cblock *);
 
 /*** Routines ****************************************************** */
 int
--- ./src/des/stats.h.~1~	2003-07-15 19:15:00.000000000 -0400
+++ ./src/des/stats.h	2003-11-19 21:58:58.000000000 -0500
@@ -10,13 +10,27 @@
 /* Some Cheap statistics which should be shared with the rxkad definitions, but
  * aren't.  The layout should match the layout in rxkad/rxkad.p.h. */
 
-struct {
-    afs_uint32 rxkad_stuff[34];	/* see rxkad.h */
-    afs_uint32 fc_stuff[3];	/* see rxkad.h */
+struct rxkad_stats {
+    afs_uint32 connections[3];	/* client side only */
+    afs_uint32 destroyObject;	/* client security objects */
+    afs_uint32 destroyClient;	/* client connections */
+    afs_uint32 destroyUnused;	/* unused server conn */
+    afs_uint32 destroyUnauth;	/* unauthenticated server conn */
+    afs_uint32 destroyConn[3];	/* server conn per level */
+    afs_uint32 expired;		/* server packets rejected */
+    afs_uint32 challengesSent;	/* server challenges sent */
+    afs_uint32 challenges[3];	/* challenges seen by client */
+    afs_uint32 responses[3];	/* responses seen by server */
+    afs_uint32 preparePackets[6];
+    afs_uint32 checkPackets[6];
+    afs_uint32 bytesEncrypted[2];	/* index just by type */
+    afs_uint32 bytesDecrypted[2];
+    afs_uint32 fc_encrypts[2];	/* DECRYPT==0, ENCRYPT==1 */
+    afs_uint32 fc_key_scheds;	/* key schedule creations */
     afs_uint32 des_encrypts[2];	/* DECRYPT==0, ENCRYPT==1 */
     afs_uint32 des_key_scheds;	/* key schedule creations */
     afs_uint32 des_randoms;	/* random blocks generated */
-    unsigned long spares[10];
+    long spares[10];
 } rxkad_stats;			/* put these here for convenience */
 
 #ifdef AFS_PTHREAD_ENV
--- ./src/des/test/testit.c.~1~	2003-07-15 19:15:01.000000000 -0400
+++ ./src/des/test/testit.c	2003-11-18 11:11:02.000000000 -0500
@@ -25,7 +25,7 @@
 /* MIN_ARGC == MAX_ARGC ==> required # args */
 
 extern char *errmsg();
-extern int des_string_to_key();
+extern void des_string_to_key();
 extern int des_key_sched();
 extern int des_ecb_encrypt();
 extern int des_cbc_encrypt();
--- ./src/des/test/verify.c.~1~	2003-07-15 19:15:01.000000000 -0400
+++ ./src/des/test/verify.c	2003-11-18 11:10:57.000000000 -0500
@@ -23,7 +23,7 @@
 
 
 extern char *errmsg();
-extern int des_string_to_key();
+extern void des_string_to_key();
 extern int des_key_sched();
 extern int des_ecb_encrypt();
 extern int des_cbc_encrypt();
--- ./src/dir/buffer.c.~1~	2003-07-15 19:15:02.000000000 -0400
+++ ./src/dir/buffer.c	2003-11-20 09:15:27.000000000 -0500
@@ -46,7 +46,7 @@
 #define BUFFER_FID_SIZE (6 + 2*sizeof(char*)/sizeof(int))
 #endif
 
-struct buffer {
+static struct buffer {
     /* fid is used for Unique cache key + i/o addressing.
      * fid size is based on 4 + size of inode and size of pointer
      */
--- ./src/kauth/admin_tools.c.~1~	2003-07-15 19:15:16.000000000 -0400
+++ ./src/kauth/admin_tools.c	2003-11-20 14:30:18.000000000 -0500
@@ -79,53 +76,6 @@
 /* These are the command operation procedures. */
 
 int
-ListUsers(struct cmd_syndesc *as, char *arock)
-{
-    struct kaident name;
-    afs_int32 index;
-    afs_int32 count;
-    afs_int32 next_index;
-    int code, all = 0, showa = 0;
-    int showkey = (as->parms[2].items != NULL);
-
-    if (as->parms[0].items)
-	all = 1;
-    if (as->parms[1].items) {
-	all = 1;
-	showa = 1;
-    }
-    for (index = 0; 1; index = next_index) {
-	code =
-	    ubik_Call(KAM_ListEntry, conn, 0, index, &next_index, &count,
-		      &name);
-	if (code) {
-	    com_err(whoami, code, "calling KAM_ListEntry");
-	    break;
-	}
-	if (!next_index)
-	    break;
-	if (next_index < 0)
-	    printf("next_index (%d) is negative: ", next_index);
-	if (strlen(name.name) == 0)
-	    printf("name is zero length: ");
-	if (all)
-	    DumpUser(name.name, NULL, showa, showkey, name.instance);
-	else
-	    ka_PrintUserID("", name.name, name.instance, "\n");
-    }
-    return code;
-}
-
-
-int
-ExamineUser(struct cmd_syndesc *as, char *arock)
-{
-    int showkey = (as->parms[1].items != NULL);
-    return DumpUser(as->parms[0].items->data, arock, 0, showkey, NULL);
-}
-
-
-int
 DumpUser(char *user, char *arock, int showadmin, int showkey, char *inst)
 {
     char name[MAXKTCNAMELEN];
@@ -283,6 +233,53 @@
     return 0;
 }
 
+int
+ListUsers(struct cmd_syndesc *as, char *arock)
+{
+    struct kaident name;
+    afs_int32 index;
+    afs_int32 count;
+    afs_int32 next_index;
+    int code, all = 0, showa = 0;
+    int showkey = (as->parms[2].items != NULL);
+
+    if (as->parms[0].items)
+	all = 1;
+    if (as->parms[1].items) {
+	all = 1;
+	showa = 1;
+    }
+    for (index = 0; 1; index = next_index) {
+	code =
+	    ubik_Call(KAM_ListEntry, conn, 0, index, &next_index, &count,
+		      &name);
+	if (code) {
+	    com_err(whoami, code, "calling KAM_ListEntry");
+	    break;
+	}
+	if (!next_index)
+	    break;
+	if (next_index < 0)
+	    printf("next_index (%d) is negative: ", next_index);
+	if (strlen(name.name) == 0)
+	    printf("name is zero length: ");
+	if (all)
+	    DumpUser(name.name, NULL, showa, showkey, name.instance);
+	else
+	    ka_PrintUserID("", name.name, name.instance, "\n");
+    }
+    return code;
+}
+
+
+int
+ExamineUser(struct cmd_syndesc *as, char *arock)
+{
+    int showkey = (as->parms[1].items != NULL);
+    return DumpUser(as->parms[0].items->data, arock, 0, showkey, NULL);
+}
+
+
 struct OKerrors {
     int code;
     char *msg;
--- ./src/kauth/kadatabase.c.~1~	2003-07-15 19:15:16.000000000 -0400
+++ ./src/kauth/kadatabase.c	2003-11-20 14:30:06.000000000 -0500
@@ -708,6 +708,7 @@
 
 /* Add a key to the key cache, expanding it if necessary. */
 
+void
 ka_Encache(name, inst, kvno, key, superseded)
      char *name;
      char *inst;
--- ./src/lwp/lwp_nt.c.~1~	2001-07-12 15:58:48.000000000 -0400
+++ ./src/lwp/lwp_nt.c	2003-11-18 10:54:08.000000000 -0500
@@ -498,7 +498,7 @@
 }
 
 
-VOID WINAPI Enter_LWP(PVOID fiberData)
+static VOID WINAPI Enter_LWP(PVOID fiberData)
 {
     PROCESS pcb = (PROCESS)fiberData;
 
--- ./src/lwp/timer.c.~1~	2003-07-15 19:15:45.000000000 -0400
+++ ./src/lwp/timer.c	2003-11-20 14:26:19.000000000 -0500
@@ -49,10 +49,7 @@
 
 #define MILLION	1000000
 
-static globalInitDone = 0;
-
-void openafs_insque(struct TM_Elem *, struct TM_Elem *);
-void openafs_remque(struct TM_Elem *);
+static int globalInitDone = 0;
 
 /* t1 = t2 - t3 */
 static void
--- ./src/ptserver/ptclient.c.~1~	2003-08-08 17:54:45.000000000 -0400
+++ ./src/ptserver/ptclient.c	2003-11-20 13:15:56.000000000 -0500
@@ -41,7 +41,9 @@
 
 char *whoami;
 
+#ifndef AFS_PTHREAD_ENV
 extern struct ubik_client *pruclient;
+#endif
 
 static int ignoreExist = 0;
 static char line[256];
--- ./src/ptserver/ptserver.c.~1~	2003-08-24 13:17:50.000000000 -0400
+++ ./src/ptserver/ptserver.c	2003-11-20 16:40:49.000000000 -0500
@@ -157,15 +157,14 @@
 extern afs_int32 depthsg;
 #endif
 
-extern afs_int32 ubik_lastYesTime;
-extern afs_int32 ubik_nBuffers;
-
 extern int afsconf_ServerAuth();
 extern int afsconf_CheckAuth();
 
 int pr_realmNameLen;
 char *pr_realmName;
 
+static struct afsconf_cell info;
+
 #include "AFS_component_version_number.c"
 
 /* check whether caller is authorized to manage RX statistics */
--- ./src/ptserver/testpt.c.~1~	2003-07-15 19:16:03.000000000 -0400
+++ ./src/ptserver/testpt.c	2003-11-20 14:29:54.000000000 -0500
@@ -240,6 +238,7 @@
     return y;
 }
 
+void
 CreateUser(u)
      int u;
 {
--- ./src/ptserver/testpt.c.~1~	2003-07-15 19:16:03.000000000 -0400
+++ ./src/ptserver/testpt.c	2003-11-20 14:29:54.000000000 -0500
@@ -276,9 +275,9 @@
 	ownerUser = id;
 	strcpy(ownerUserName, name);
     }
-    return;
 }
 
+void
 CreateGroup(g)
      int g;
 {
--- ./src/ptserver/testpt.c.~1~	2003-07-15 19:16:03.000000000 -0400
+++ ./src/ptserver/testpt.c	2003-11-20 14:29:54.000000000 -0500
@@ -345,7 +347,6 @@
 	lastGroup = id;
 	lastGroupPrefix = ownerName;
     }
-    return;
 }
 
 int
--- ./src/ptserver/testpt.c.~1~	2003-07-15 19:16:03.000000000 -0400
+++ ./src/ptserver/testpt.c	2003-11-20 14:29:54.000000000 -0500
@@ -377,6 +378,7 @@
     return -1;			/* none left */
 }
 
+void
 AddUser(u, g)
      int u, g;
 {
--- ./src/ptserver/testpt.c.~1~	2003-07-15 19:16:03.000000000 -0400
+++ ./src/ptserver/testpt.c	2003-11-20 14:29:54.000000000 -0500
@@ -398,9 +400,9 @@
 	printf("Adding user (%di) to group (%di)\n", ui, gi);
     population[u * number + g]++;
     nAdds++;
-    return;
 }
 
+void
 RemUser(u, g)
      int u, g;
 {
--- ./src/ptserver/testpt.c.~1~	2003-07-15 19:16:03.000000000 -0400
+++ ./src/ptserver/testpt.c	2003-11-20 14:29:54.000000000 -0500
@@ -418,7 +420,6 @@
 	printf("Removing user (%di) from group (%di)\n", ui, gi);
     population[u * number + g]--;
     nRems++;
-    return;
 }
 
 TestManyMembers(as, arock)
--- ./src/ptserver/ubik.c.~1~	2003-07-15 19:16:04.000000000 -0400
+++ ./src/ptserver/ubik.c	2003-11-18 08:50:57.000000000 -0500
@@ -182,6 +182,7 @@
 
 /* Other declarations */
 
+int
 afsconf_GetNoAuthFlag()
 {
     return (1);
--- ./src/rx/rx_clock_nt.c.~1~	2003-07-15 19:16:09.000000000 -0400
+++ ./src/rx/rx_clock_nt.c	2003-11-18 08:48:31.000000000 -0500
@@ -42,7 +42,7 @@
 void clock_UpdateTime(void);
 
 void
-clock_Init()
+clock_Init(void)
 {
     if (!QueryPerformanceFrequency(&rxi_clockFreq)) {
 	printf("No High Performance clock, exiting.\n");
--- ./src/rx/rx_clock_nt.c.~1~	2003-07-15 19:16:09.000000000 -0400
+++ ./src/rx/rx_clock_nt.c	2003-11-18 08:48:31.000000000 -0500
@@ -57,9 +57,11 @@
 
 #ifndef KERNEL
 /* Make clock uninitialized. */
-clock_UnInit()
+int
+clock_UnInit(void)
 {
     clockInitialized = 0;
+	return 0;
 }
 #endif
 
--- ./src/ubik/disk.c.~1~	2003-07-15 19:17:05.000000000 -0400
+++ ./src/ubik/disk.c	2003-11-20 09:17:32.000000000 -0500
@@ -38,7 +38,7 @@
 #include "ubik_int.h"
 
 #define	PHSIZE	128
-struct buffer {
+static struct buffer {
     struct ubik_dbase *dbase;	/* dbase within which the buffer resides */
     afs_int32 file;		/* Unique cache key */
     afs_int32 page;		/* page number */
--- ./src/ubik/lock.c.~1~	2003-08-08 16:18:13.000000000 -0400
+++ ./src/ubik/lock.c	2003-11-14 14:14:35.000000000 -0500
@@ -145,12 +145,12 @@
 }
 
 /* Release the transaction lock */
-int
+void
 ulock_relLock(atrans)
      struct ubik_trans *atrans;
 {
     if (rwlockinit)
-	return EINVAL;
+	return;
 
     if (atrans->locktype == LOCKREAD) {
 	ReleaseReadLock(&rwlock);
--- ./src/util/regex.c.~1~	2003-07-15 19:17:16.000000000 -0400
+++ ./src/util/regex.c	2003-11-18 13:26:58.000000000 -0500
@@ -107,9 +107,9 @@
 /* forward defs
 */
 
-static int advance();
-static int backref();
-static int cclass();
+static int advance(register char *lp, register char *ep);
+static int backref(register int i, register char *lp);
+static int cclass(register char *set, register char c, int af);
 
 
 /*
--- ./src/util/regex.c.~1~	2003-07-15 19:17:16.000000000 -0400
+++ ./src/util/regex.c	2003-11-18 13:26:58.000000000 -0500
@@ -277,8 +278,7 @@
  * try to match the next thing in the dfa
  */
 static int
-advance(lp, ep)
-     register char *lp, *ep;
+advance(register char *lp, register char *ep)
 {
     register char *curlp;
     int ct, i;
--- ./src/util/regex.c.~1~	2003-07-15 19:17:16.000000000 -0400
+++ ./src/util/regex.c	2003-11-18 13:26:58.000000000 -0500
@@ -382,9 +382,7 @@
 }
 
 static int
-backref(i, lp)
-     register int i;
-     register char *lp;
+backref(register int i, register char *lp)
 {
     register char *bp;
 
--- ./src/util/regex.c.~1~	2003-07-15 19:17:16.000000000 -0400
+++ ./src/util/regex.c	2003-11-18 13:26:58.000000000 -0500
@@ -396,9 +394,7 @@
 }
 
 static int
-cclass(set, c, af)
-     register char *set, c;
-     int af;
+cclass(register char *set, register char c, int af)
 {
     register int n;
 
--- ./src/util/serverLog.c.~1~	2003-07-15 19:17:16.000000000 -0400
+++ ./src/util/serverLog.c	2003-11-18 11:22:38.000000000 -0500
@@ -165,7 +165,7 @@
 void
 SetDebug_Signal(int signo)
 {
-    extern int IOMGR_SoftSig();
+/*    extern int IOMGR_SoftSig();*/
 
     if (LogLevel > 0) {
 	LogLevel *= 5;
--- ./src/vol/ntops.c.~1~	2003-07-15 19:17:39.000000000 -0400
+++ ./src/vol/ntops.c	2003-11-20 14:53:51.000000000 -0500
@@ -41,6 +41,8 @@
 
 #define BASEFILEATTRIBUTE FILE_ATTRIBUTE_NORMAL
 
+static void AddToZLCDeleteList(char dir, char *name);
+
 /* nt_unlink - unlink a case sensitive name.
  *
  * nt_unlink supports the nt_dec call.
--- ./src/volser/vsutils.c.~1~	2003-07-15 19:17:49.000000000 -0400
+++ ./src/volser/vsutils.c	2003-11-20 14:32:54.000000000 -0500
@@ -578,6 +573,7 @@
 /*extract the name of volume <name> without readonly or backup suffixes
  * and return the result as <rname>.
  */
+int
 vsu_ExtractName(rname, name)
      char rname[], name[];
 {

--------------030807050708020901010905--