From: Christof Hanke Date: Mon, 26 Nov 2007 21:03:31 +0000 (+0000) Subject: assorted-warning-cleanup-20071126 X-Git-Tag: BP-openafs-windows-kdfs-ifs~342 X-Git-Url: http://git.openafs.org/?p=openafs.git;a=commitdiff_plain;h=da18bb147b25e62ed69c6f88fa6331161018d9fb assorted-warning-cleanup-20071126 add missignheader files, missing return values, correct a few calls to printf --- diff --git a/src/afs/UKERNEL/afs_usrops.c b/src/afs/UKERNEL/afs_usrops.c index e56ccc8..094c141 100644 --- a/src/afs/UKERNEL/afs_usrops.c +++ b/src/afs/UKERNEL/afs_usrops.c @@ -183,6 +183,7 @@ int ufs_brelse(struct usr_vnode *vp, struct usr_buf *bp) { usr_assert(0); + return 0; } /* @@ -192,12 +193,14 @@ int iodone(struct usr_buf *bp) { usr_assert(0); + return 0; } struct usr_file * getf(int fd) { usr_assert(0); + return 0; } /* @@ -233,6 +236,7 @@ int usr_flock(void) { usr_assert(0); + return 0; } /* @@ -243,6 +247,7 @@ int usr_ioctl(void) { usr_assert(0); + return 0; } /* @@ -252,24 +257,28 @@ int afs_syscall_icreate(void) { usr_assert(0); + return 0; } int afs_syscall_iincdec(void) { usr_assert(0); + return 0; } int afs_syscall_iopen(void) { usr_assert(0); + return 0; } int afs_syscall_ireadwrite(void) { usr_assert(0); + return 0; } /* @@ -280,24 +289,28 @@ int vno_close(void) { usr_assert(0); + return 0; } int vno_ioctl(void) { usr_assert(0); + return 0; } int vno_rw(void) { usr_assert(0); + return 0; } int vno_select(void) { usr_assert(0); + return 0; } /* @@ -374,12 +387,14 @@ usr_crfree(struct usr_ucred *credp) if (credp->cr_ref == 0) { afs_osi_Free((char *)credp, sizeof(struct usr_ucred)); } + return 0; } int usr_crhold(struct usr_ucred *credp) { credp->cr_ref++; + return 0; } void @@ -517,6 +532,7 @@ afs_osi_Wakeup(void *x) waitp = waitp->next; } usr_mutex_unlock(&osi_waitq_lock); + return 0; } int @@ -608,6 +624,7 @@ afs_osi_CheckTimedWaits(void) waitp = waitp->timedNext; } usr_mutex_unlock(&osi_waitq_lock); + return 0; } /* @@ -1977,6 +1994,7 @@ syscallThread(void *argp) sysArgsP->param2, sysArgsP->param3, sysArgsP->param4); afs_osi_Free(argp, -1); + return 0; } fork_syscall(syscall, afscall, param1, param2, param3, param4) @@ -1997,6 +2015,7 @@ fork_syscall(syscall, afscall, param1, param2, param3, param4) usr_thread_create(&tid, syscallThread, sysArgsP); usr_thread_detach(tid); + return 0; } call_syscall(syscall, afscall, param1, param2, param3, param4) @@ -2183,7 +2202,7 @@ uafs_LookupName(char *path, struct usr_vnode *parentVp, struct usr_vnode *linkVp; char *tmpPath; char *pathP; - char *nextPathP; + char *nextPathP = NULL; AFS_ASSERT_GLOCK(); diff --git a/src/afs/UKERNEL/osi_groups.c b/src/afs/UKERNEL/osi_groups.c index 849dbdd..248627d 100644 --- a/src/afs/UKERNEL/osi_groups.c +++ b/src/afs/UKERNEL/osi_groups.c @@ -26,6 +26,7 @@ int afs_xsetgroups() { usr_assert(0); + return 0; } static int diff --git a/src/afs/afs.h b/src/afs/afs.h index 8b4859c..6cde840 100644 --- a/src/afs/afs.h +++ b/src/afs/afs.h @@ -923,6 +923,9 @@ struct afs_fheader { #endif #endif + +#ifdef KERNEL +/* it does not compile outside kernel */ struct buffer { afs_int32 fid; /* is adc->index, the cache file number */ afs_inode_t inode; /* is adc->f.inode, the inode number of the cac\ @@ -950,6 +953,7 @@ struct fcache { afs_int32 chunkBytes; /* Num bytes in this chunk */ char states; /* Has this chunk been modified? */ }; +#endif /* magic numbers to specify the cache type */ diff --git a/src/afs/afs_pioctl.c b/src/afs/afs_pioctl.c index 5f540ce..08f75bb 100644 --- a/src/afs/afs_pioctl.c +++ b/src/afs/afs_pioctl.c @@ -2722,7 +2722,8 @@ DECL_PIOCTL(PGetVnodeXStatus2) DECL_PIOCTL(PSetSysName) { char *cp, *cp2 = NULL, inname[MAXSYSNAME], outname[MAXSYSNAME]; - int setsysname, foundname = 0; + afs_int32 setsysname; + int foundname = 0; register struct afs_exporter *exporter; register struct unixuser *au; register afs_int32 pag, error; @@ -2739,7 +2740,7 @@ DECL_PIOCTL(PSetSysName) #endif } memset(inname, 0, MAXSYSNAME); - memcpy((char *)&setsysname, ain, sizeof(afs_int32)); + memcpy(&setsysname, ain, sizeof(afs_int32)); ain += sizeof(afs_int32); if (setsysname & 0x8000) { allpags = 1; diff --git a/src/afs/afs_server.c b/src/afs/afs_server.c index 8caf719..520757a 100644 --- a/src/afs/afs_server.c +++ b/src/afs/afs_server.c @@ -1129,6 +1129,7 @@ afsi_SetServerIPRank(struct srvAddr *sa, afs_int32 addr, sa->sa_iprank = afs_min(sa->sa_iprank, MED); } } + return 0; } #else /* AFS_USERSPACE_IP_ADDR */ #if (! defined(AFS_SUN5_ENV)) && !defined(AFS_DARWIN60_ENV) && defined(USEIFADDR) diff --git a/src/afsmonitor/afsmon-win.c b/src/afsmonitor/afsmon-win.c index 6a564b4..7cbaf03 100644 --- a/src/afsmonitor/afsmon-win.c +++ b/src/afsmonitor/afsmon-win.c @@ -565,6 +565,7 @@ afsmonExit_gtx() } afsmon_Exit(0); + return 0; /* not reached */ } diff --git a/src/bozo/bosserver.c b/src/bozo/bosserver.c index 6593f88..d53d909 100644 --- a/src/bozo/bosserver.c +++ b/src/bozo/bosserver.c @@ -1068,6 +1068,7 @@ main(int argc, char **argv, char **envp) rx_SetMinProcs(tservice, 2); rx_SetMaxProcs(tservice, 4); rx_StartServer(1); /* donate this process */ + return 0; } void diff --git a/src/bu_utils/fms.c b/src/bu_utils/fms.c index 15c0857..83067f5 100644 --- a/src/bu_utils/fms.c +++ b/src/bu_utils/fms.c @@ -69,6 +69,7 @@ main(argc, argv) cmd_AddParm(cptr, "-tape", CMD_SINGLE, CMD_REQUIRED, "tape special file"); cmd_Dispatch(argc, argv); + return 0; } static int diff --git a/src/bucoord/commands.c b/src/bucoord/commands.c index 49b92e9..8206ef8 100644 --- a/src/bucoord/commands.c +++ b/src/bucoord/commands.c @@ -765,7 +765,8 @@ concatParams(itemPtr) /* printIfStatus * print out an interface status node as received from butc */ - + +void printIfStatus(statusPtr) struct tciStatusS *statusPtr; { diff --git a/src/bucoord/dsstub.c b/src/bucoord/dsstub.c index 040208d..7ed4fb7 100644 --- a/src/bucoord/dsstub.c +++ b/src/bucoord/dsstub.c @@ -26,6 +26,8 @@ RCSID #include #include #endif +#include +#include #include #include #include diff --git a/src/bucoord/dsvs.c b/src/bucoord/dsvs.c index 13d464b..d65c503 100644 --- a/src/bucoord/dsvs.c +++ b/src/bucoord/dsvs.c @@ -44,6 +44,8 @@ struct ubik_client *cstructp; /*Ptr to Ubik client structure */ extern struct bc_volumeSet *bc_FindVolumeSet(struct bc_config *cf, char *name); +static FreeVolumeEntryList(); +static FreeVolumeEntry(); /* Code to maintain dump schedule and volume set abstractions. * A volume set looks like this: diff --git a/src/bucoord/dump.c b/src/bucoord/dump.c index 2e45b7f..d6b46c8 100644 --- a/src/bucoord/dump.c +++ b/src/bucoord/dump.c @@ -178,6 +178,7 @@ bc_Dumper(aindex) * free the list of volumes used for dumps */ +void freeDumpTaskVolumeList(vdptr) struct bc_volumeDump *vdptr; { diff --git a/src/bucoord/dump_sched.c b/src/bucoord/dump_sched.c index 13bc6fc..04d0fdf 100644 --- a/src/bucoord/dump_sched.c +++ b/src/bucoord/dump_sched.c @@ -12,6 +12,8 @@ */ #include +#include +#include #include #include @@ -43,6 +45,7 @@ extern struct bc_config *bc_globalConfig; extern struct udbHandleS udbHandle; extern char *whoami; +static ListDumpSchedule(); /* ------------------------------------ * command level routines diff --git a/src/bucoord/regex.c b/src/bucoord/regex.c index a65587e..435749f 100644 --- a/src/bucoord/regex.c +++ b/src/bucoord/regex.c @@ -93,6 +93,10 @@ static char expbuf[ESIZE], *braslist[NBRA], *braelist[NBRA]; static char circf; +static int advance(); +static int backref(); +static int cclass(); + /* * compile the regular expression argument into a dfa */ diff --git a/src/bucoord/restore.c b/src/bucoord/restore.c index f4d743e..0fc3135 100644 --- a/src/bucoord/restore.c +++ b/src/bucoord/restore.c @@ -131,6 +131,7 @@ extractTapeSeq(tapename) return (atol(sptr)); } +void viceName(value) long value; { diff --git a/src/bucoord/status.c b/src/bucoord/status.c index d48c145..956d93f 100644 --- a/src/bucoord/status.c +++ b/src/bucoord/status.c @@ -38,6 +38,7 @@ extern struct Lock cmdLineLock; /* lock on the cmdLine */ * These routines are common the backup coordinator and tape coordinator */ +void initStatus() { dlqInit(&statusHead); @@ -47,21 +48,25 @@ initStatus() /* lock managment */ +void lock_Status() { ObtainWriteLock(&statusQueueLock); } +void unlock_Status() { ReleaseWriteLock(&statusQueueLock); } +void lock_cmdLine() { ObtainWriteLock(&cmdLineLock); } +void unlock_cmdLine() { ReleaseWriteLock(&cmdLineLock); @@ -109,6 +114,7 @@ createStatusNode() return (ptr); } +void deleteStatusNode(ptr) statusP ptr; { diff --git a/src/bucoord/vol_sets.c b/src/bucoord/vol_sets.c index 7cf8707..3333daf 100644 --- a/src/bucoord/vol_sets.c +++ b/src/bucoord/vol_sets.c @@ -41,6 +41,7 @@ extern char *whoami; extern struct bc_volumeSet *bc_FindVolumeSet(struct bc_config *cf, char *name); extern void FreeVolumeSet(struct bc_volumeSet *avset); +static ListVolSet(); /* ------------------------------------ * command level routines diff --git a/src/budb/db_dump.c b/src/budb/db_dump.c index 8c5a614..4d0a11e 100644 --- a/src/budb/db_dump.c +++ b/src/budb/db_dump.c @@ -93,6 +93,7 @@ canWrite(fid) * no return value */ +void haveWritten(nbytes) afs_int32 nbytes; { @@ -114,6 +115,7 @@ haveWritten(nbytes) * done flag. */ +void doneWriting(error) afs_int32 error; { diff --git a/src/budb/db_text.c b/src/budb/db_text.c index 9ce5b9b..ab21aea 100644 --- a/src/budb/db_text.c +++ b/src/budb/db_text.c @@ -483,7 +483,7 @@ SaveText(call, lockHandle, textType, offset, flags, charListPtr) } /* debug support */ - +void saveTextToFile(ut, tbPtr) struct ubik_trans *ut; struct textBlock *tbPtr; diff --git a/src/budb/server.c b/src/budb/server.c index 1829534b..4e123a7 100644 --- a/src/budb/server.c +++ b/src/budb/server.c @@ -134,6 +134,7 @@ MyBeforeProc(register struct cmd_syndesc *as, void *arock) * initialize all the supported commands and their arguments */ +void initializeArgHandler() { struct cmd_syndesc *cptr; @@ -590,7 +591,7 @@ main(argc, argv) return (code); } - +void consistencyCheckDb() { /* do consistency checks on structure sizes */ diff --git a/src/budb/struct_ops.c b/src/budb/struct_ops.c index 0377f3b..49be35f 100644 --- a/src/budb/struct_ops.c +++ b/src/budb/struct_ops.c @@ -107,6 +107,7 @@ printDumpEntry(struct budb_dumpEntry *deptr) * print the hash table structure, i.e. the header structure. */ +void printHashTable(fid, htptr) FILE *fid; struct hashTable *htptr; @@ -311,6 +312,7 @@ printVolInfo(fid, viptr) * currently used for debug only */ +void volFragment_ntoh(netVfPtr, hostVfPtr) struct volFragment *netVfPtr, *hostVfPtr; { @@ -327,6 +329,7 @@ volFragment_ntoh(netVfPtr, hostVfPtr) hostVfPtr->sequence = ntohs(netVfPtr->sequence); } +void volInfo_ntoh(netViPtr, hostViPtr) struct volInfo *netViPtr, *hostViPtr; { @@ -342,6 +345,7 @@ volInfo_ntoh(netViPtr, hostViPtr) hostViPtr->nFrags = ntohl(netViPtr->nFrags); } +void tape_ntoh(netTapePtr, hostTapePtr) struct tape *netTapePtr, *hostTapePtr; { @@ -363,6 +367,7 @@ tape_ntoh(netTapePtr, hostTapePtr) hostTapePtr->useCount = ntohl(netTapePtr->useCount); } +void dump_ntoh(netDumpPtr, hostDumpPtr) struct dump *netDumpPtr, *hostDumpPtr; { @@ -385,6 +390,7 @@ dump_ntoh(netDumpPtr, hostDumpPtr) principal_ntoh(&netDumpPtr->dumper, &hostDumpPtr->dumper); } +void DbHeader_ntoh(netptr, hostptr) struct DbHeader *netptr, *hostptr; { @@ -396,6 +402,7 @@ DbHeader_ntoh(netptr, hostptr) hostptr->lastTapeId = ntohl(netptr->lastTapeId); } +void dumpEntry_ntoh(netptr, hostptr) struct budb_dumpEntry *netptr, *hostptr; { @@ -434,6 +441,7 @@ principal_ntoh(netptr, hostptr) return 0; } +void structDumpHeader_hton(hostPtr, netPtr) struct structDumpHeader *hostPtr, *netPtr; { @@ -442,6 +450,7 @@ structDumpHeader_hton(hostPtr, netPtr) netPtr->size = htonl(hostPtr->size); } +void structDumpHeader_ntoh(netPtr, hostPtr) struct structDumpHeader *hostPtr, *netPtr; { @@ -450,6 +459,7 @@ structDumpHeader_ntoh(netPtr, hostPtr) hostPtr->size = ntohl(netPtr->size); } +void tapeEntry_ntoh(netptr, hostptr) struct budb_tapeEntry *netptr, *hostptr; { @@ -494,6 +504,7 @@ tapeSet_ntoh(netptr, hostptr) return 0; } +void textBlock_hton(hostptr, netptr) struct textBlock *hostptr, *netptr; { @@ -504,6 +515,7 @@ textBlock_hton(hostptr, netptr) netptr->newTextAddr = htonl(hostptr->newTextAddr); } +void textBlock_ntoh(netptr, hostptr) struct textBlock *netptr, *hostptr; { @@ -514,6 +526,7 @@ textBlock_ntoh(netptr, hostptr) hostptr->newTextAddr = ntohl(netptr->newTextAddr); } +void textLock_hton(hostptr, netptr) db_lockP hostptr, netptr; { @@ -525,6 +538,7 @@ textLock_hton(hostptr, netptr) netptr->lockHost = htonl(hostptr->lockHost); } +void textLock_ntoh(netptr, hostptr) db_lockP netptr, hostptr; { @@ -536,6 +550,7 @@ textLock_ntoh(netptr, hostptr) hostptr->lockHost = ntohl(netptr->lockHost); } +void volumeEntry_ntoh(netptr, hostptr) struct budb_volumeEntry *netptr, *hostptr; { @@ -562,7 +577,7 @@ volumeEntry_ntoh(netptr, hostptr) * ------------------------------------- */ - +void copy_ktcPrincipal_to_budbPrincipal(ktcPtr, budbPtr) struct ktc_principal *ktcPtr; struct budb_principal *budbPtr; @@ -666,4 +681,5 @@ default_tapeset(tapesetPtr, dumpname) tapesetPtr->a = 1; tapesetPtr->b = 1; tapesetPtr->maxTapes = 0; + return 0; } diff --git a/src/butc/dbentries.c b/src/butc/dbentries.c index 1388441..16f09df 100644 --- a/src/butc/dbentries.c +++ b/src/butc/dbentries.c @@ -310,6 +310,7 @@ waitDbWatcher() if (message) { printf("Updating database - done\n"); } + return 0; } #define MAXVOLUMESTOADD 100 diff --git a/src/butc/lwps.c b/src/butc/lwps.c index df33590..3561d5d 100644 --- a/src/butc/lwps.c +++ b/src/butc/lwps.c @@ -547,6 +547,7 @@ callOutRoutine(taskId, tapePath, flag, name, dbDumpId, tapecount) * Regardless of error, the closecallout routine will be called * (unless a tape is not mounted in the first place). */ +void unmountTape(taskId, tapeInfoPtr) afs_int32 taskId; struct butm_tapeInfo *tapeInfoPtr; @@ -1923,6 +1924,7 @@ Restorer(newNode) /* this is just scaffolding, creates new tape label with name */ +void GetNewLabel(tapeInfoPtr, pName, AFSName, tapeLabel) struct butm_tapeInfo *tapeInfoPtr; char *pName, *AFSName; @@ -2284,6 +2286,7 @@ Labeller(labelIfPtr) * print out the tape label. */ +void PrintTapeLabel(labelptr) struct butm_tapeLabel *labelptr; { diff --git a/src/butc/read_tape.c b/src/butc/read_tape.c index 3d0e408..0e12480 100644 --- a/src/butc/read_tape.c +++ b/src/butc/read_tape.c @@ -82,6 +82,7 @@ readblock(buffer) return 0; } +void printLabel(tapeLabelPtr) struct tapeLabel *tapeLabelPtr; { @@ -130,6 +131,7 @@ printLabel(tapeLabelPtr) } } +void printHeader(headerPtr, isvolheader) struct volumeHeader *headerPtr; afs_int32 *isvolheader; diff --git a/src/butc/recoverDb.c b/src/butc/recoverDb.c index dd51fa6..a6d0d7f 100644 --- a/src/butc/recoverDb.c +++ b/src/butc/recoverDb.c @@ -52,6 +52,8 @@ struct tapeScanInfo { extern struct tapeConfig globalTapeConfig; extern struct deviceSyncNode *deviceLatch; +static readDump(); + /* PrintDumpLabel * print out the tape (dump) label. */ diff --git a/src/butc/tcprocs.c b/src/butc/tcprocs.c index 1f904b1..4bb4f23 100644 --- a/src/butc/tcprocs.c +++ b/src/butc/tcprocs.c @@ -42,6 +42,11 @@ RCSID #include "error_macros.h" #include "butc_xbsa.h" +static CopyDumpDesc(); +static CopyRestoreDesc(); +static CopyTapeSetDesc(); + + int callPermitted(struct rx_call *call) { @@ -139,7 +144,7 @@ STC_LabelTape(struct rx_call *acid, struct tc_tapeLabel *label, afs_uint32 *task PROCESS pid; #endif struct labelTapeIf *ptr; - statusP statusPtr; + statusP statusPtr = NULL; afs_int32 code; extern int Labeller(); @@ -487,7 +492,7 @@ STC_SaveDb(struct rx_call *rxCall, Date archiveTime, afs_uint32 *taskId) #else PROCESS pid; #endif - statusP statusPtr; + statusP statusPtr = NULL; afs_int32 code = 0; struct saveDbIf *ptr; diff --git a/src/butc/tcudbprocs.c b/src/butc/tcudbprocs.c index eebac7f..7e84e5d 100644 --- a/src/butc/tcudbprocs.c +++ b/src/butc/tcudbprocs.c @@ -52,6 +52,10 @@ RCSID extern int dump_namecheck; extern int autoQuery; +static void initTapeBuffering(); +static writeDbDump(); +static restoreDbEntries(); + /* CreateDBDump * create a dump entry for a saved database */ @@ -905,7 +909,7 @@ readDbTape(tapeInfoPtr, rstTapeInfoPtr, query) } static afs_int32 nbytes = 0; /* # bytes left in buffer */ -static +static void initTapeBuffering() { nbytes = 0; diff --git a/src/butm/file_tm.c b/src/butm/file_tm.c index 4458aa2..1e858d3 100644 --- a/src/butm/file_tm.c +++ b/src/butm/file_tm.c @@ -627,6 +627,7 @@ ShutdownAccess(usd_handle_t fid) * dataSize - bytes used on the tape */ +void incSize(info, dataSize) struct butm_tapeInfo *info; afs_uint32 dataSize; @@ -648,6 +649,7 @@ incSize(info, dataSize) * dataSize - bytes used on the tape */ +void incPosition(info, fid, dataSize) struct butm_tapeInfo *info; usd_handle_t fid; diff --git a/src/gtx/frame.c b/src/gtx/frame.c index a0b5fc0..9e8e3ee 100644 --- a/src/gtx/frame.c +++ b/src/gtx/frame.c @@ -318,6 +318,7 @@ gtxframe_DisplayString(aframe, amsgLine) if (aframe->messageLine) free(aframe->messageLine); aframe->messageLine = gtx_CopyString(amsgLine); + return 0; } /* Called by input processor to try to clear the dude */ diff --git a/src/gtx/gtxtest.c b/src/gtx/gtxtest.c index 5277c01..a859d5e 100644 --- a/src/gtx/gtxtest.c +++ b/src/gtx/gtxtest.c @@ -246,4 +246,5 @@ main() keymap_Delete(tmap); gtx_InputServer(win); + return 0; } diff --git a/src/gtx/input.c b/src/gtx/input.c index 834377f..384aa81 100644 --- a/src/gtx/input.c +++ b/src/gtx/input.c @@ -61,6 +61,7 @@ gtx_InputServer(awin) tframe->flags &= ~GTXFRAME_RECURSIVEEND; WOP_DISPLAY(awin); /* eventually calls gtxframe_Display */ } + return 0; } struct gwin * diff --git a/src/gtx/textobject.c b/src/gtx/textobject.c index 9cdd08b..b0a57ee 100644 --- a/src/gtx/textobject.c +++ b/src/gtx/textobject.c @@ -363,7 +363,7 @@ gator_text_Scroll(onp, nlines, direction) * the window empty. */ if (objects_debug) - fprintf(stderr, "[%s:%s] Scrolling text object at 0x%x %d lines %s\n", + fprintf(stderr, "[%s:%s] Scrolling text object %d lines %s\n", mn, rn, nlines, (direction == GATOR_TEXT_SCROLL_UP) ? "UP" : "DOWN"); @@ -454,7 +454,7 @@ gator_text_Write(onp, strToWrite, numChars, highlight, skip) if (objects_debug) { fprintf(stderr, "[%s:%s] Writing %d chars to text object at 0x%x (highlight=%d, skip=%d: '", - rn, numChars, onp, highlight, skip); + mn, rn, numChars, onp, highlight, skip); for (i = 0; i < numChars; i++) fprintf(stderr, "%c", strToWrite + i); fprintf(stderr, "\n"); diff --git a/src/kauth/kadatabase.c b/src/kauth/kadatabase.c index a1e6580..d49fc8d 100644 --- a/src/kauth/kadatabase.c +++ b/src/kauth/kadatabase.c @@ -107,6 +107,7 @@ static afs_int32 keyCacheVersion = 0; static afs_int32 maxKeyLifetime; static int dbfixup = 0; +void init_kadatabase(initFlags) int initFlags; /* same as init_kaprocs (see which) */ { diff --git a/src/kauth/kdb.c b/src/kauth/kdb.c index 7b1edeb..39df9e4 100644 --- a/src/kauth/kdb.c +++ b/src/kauth/kdb.c @@ -129,5 +129,6 @@ int main(void) { printf("kdb not supported\n"); + return 1; } #endif diff --git a/src/kauth/kkids.c b/src/kauth/kkids.c index 48e6f14..ef0fc14 100644 --- a/src/kauth/kkids.c +++ b/src/kauth/kkids.c @@ -422,6 +422,7 @@ init_child(char *myname) argv[1] = NULL; argv[0] = dirpath; execv(dirpath, argv); + return 0; } else { using_child = pid; /* save it for later */ childin = fdopen(pipe1[1], "w"); diff --git a/src/kauth/kpwvalid.c b/src/kauth/kpwvalid.c index 703a5b6..2114eb9 100644 --- a/src/kauth/kpwvalid.c +++ b/src/kauth/kpwvalid.c @@ -43,4 +43,5 @@ main(int argc, char *argv[]) fflush(stdout); } } + return rc; } diff --git a/src/kauth/krb_udp.c b/src/kauth/krb_udp.c index 94d8ddd..6178c1f 100644 --- a/src/kauth/krb_udp.c +++ b/src/kauth/krb_udp.c @@ -822,7 +822,7 @@ process_udp_request(ksoc, pkt) return; } -static +static void SocketListener() { fd_set rfds; diff --git a/src/kauth/rebuild.c b/src/kauth/rebuild.c index 1c8bb30..1eb2bce 100644 --- a/src/kauth/rebuild.c +++ b/src/kauth/rebuild.c @@ -217,6 +217,7 @@ PrintEntry(index, entry) } /* ntohEntry - convert back to host-order */ +void ntohEntry(struct kaentry *entryp) { entryp->flags = ntohl(entryp->flags); @@ -396,6 +397,7 @@ readDB(offset, buffer, size) afs_com_err(whoami, errno, "reading db got %d bytes", code); exit(3); } + return 0; } #include "AFS_component_version_number.c" diff --git a/src/libadmin/cfg/cfgclient.c b/src/libadmin/cfg/cfgclient.c index 339887b..9ac669f 100644 --- a/src/libadmin/cfg/cfgclient.c +++ b/src/libadmin/cfg/cfgclient.c @@ -96,7 +96,7 @@ cfg_ClientQueryStatus(const char *hostName, /* name of host */ afs_status_t clientSt = 0; char *clientCellName = NULL; short cmInstalled = 0; - unsigned cmVersion; + unsigned cmVersion = 0; /* validate parameters */ diff --git a/src/libadmin/cfg/cfginternal.c b/src/libadmin/cfg/cfginternal.c index aad5d62..aa35bad 100644 --- a/src/libadmin/cfg/cfginternal.c +++ b/src/libadmin/cfg/cfginternal.c @@ -480,8 +480,8 @@ cfgutil_HostAddressFetchAll(const char *hostName, int *addrCount, { int rc = 1; afs_status_t tst = 0; - int aCount; - afs_int32 *aList; + int aCount = 0; + afs_int32 *aList = NULL; #ifdef AFS_NT40_ENV /* Note: gethostbyname() allocs hostent on a per-thread basis */ diff --git a/src/libadmin/samples/rxdebug_conns.c b/src/libadmin/samples/rxdebug_conns.c index 00e00f6..2e0ff99 100644 --- a/src/libadmin/samples/rxdebug_conns.c +++ b/src/libadmin/samples/rxdebug_conns.c @@ -69,7 +69,7 @@ main(int argc, char *argv[]) struct rx_debugConn conn; afs_uint32 supportedStats; afs_uint32 supportedValues; - int allconns; + int allconns = 1; int i; ParseArgs(argc, argv, &srvrName, &srvrPort); diff --git a/src/log/unlog.c b/src/log/unlog.c index b4f8146..7f6477c 100644 --- a/src/log/unlog.c +++ b/src/log/unlog.c @@ -259,6 +259,7 @@ unlog_NormalizeCellNames(char **list, int size) *list = newCellName; } afsconf_Close(conf); + return 0; } /* @@ -283,4 +284,5 @@ unlog_VerifyUnlog(char **cellList, int cellListSize, struct tokenInfo *tokenList fprintf(stderr, "unlog: Warning - no tokens held for cell %s\n", cellList[index]); } + return 0; } diff --git a/src/lwp/lwp.c b/src/lwp/lwp.c index 71a4b40..136a755 100644 --- a/src/lwp/lwp.c +++ b/src/lwp/lwp.c @@ -961,6 +961,8 @@ Dispatcher(void) lwp_cpptr = runnable[i].head; returnto(&lwp_cpptr->context); + + return 0; /* not reachable */ } /* Complain of a stack overflow to stderr without using stdio. */ diff --git a/src/ptserver/readgroup.c b/src/ptserver/readgroup.c index 954ba31..a07e3a2 100644 --- a/src/ptserver/readgroup.c +++ b/src/ptserver/readgroup.c @@ -206,6 +206,7 @@ main(int argc, char **argv) } } } + return 0; } void diff --git a/src/ptserver/readpwd.c b/src/ptserver/readpwd.c index 3131b0b..c662ca3 100644 --- a/src/ptserver/readpwd.c +++ b/src/ptserver/readpwd.c @@ -99,4 +99,5 @@ main(afs_int32 argc, char **argv) fprintf(stderr, "%s (%d).\n", pr_ErrorMsg(code), code); } } + return 0; } diff --git a/src/rx/rx.h b/src/rx/rx.h index e73bc27..c47be0b 100644 --- a/src/rx/rx.h +++ b/src/rx/rx.h @@ -46,6 +46,7 @@ #else /* KERNEL */ # include # include +# include #ifdef AFS_PTHREAD_ENV # include "rx_pthread.h" #else diff --git a/src/rx/rx_trace.c b/src/rx/rx_trace.c index ac7a6e6..37b85d6 100644 --- a/src/rx/rx_trace.c +++ b/src/rx/rx_trace.c @@ -182,6 +182,7 @@ main(argc, argv) printf(" %3u %7u %7u %x.%x\n", ip.qlen, ip.servicetime, ip.waittime, ip.cid, ip.call); } + return 0; } #endif /* DUMPTRACE */ diff --git a/src/scout/scout.c b/src/scout/scout.c index 47b4cbc..c2a9118 100644 --- a/src/scout/scout.c +++ b/src/scout/scout.c @@ -2378,4 +2378,5 @@ main(argc, argv) } else scout_CleanExit(0); + return 0; /* not reachable */ } /*main */ diff --git a/src/sys/pagsh.c b/src/sys/pagsh.c index e0a93e9..1fe8811 100644 --- a/src/sys/pagsh.c +++ b/src/sys/pagsh.c @@ -166,6 +166,7 @@ ktc_newpag(void) strcat(*denv, fname5); *++denv = 0; environ = newenv; + return 0; } #endif diff --git a/src/sys/rmtsysc.c b/src/sys/rmtsysc.c index f37b878..50fd128 100644 --- a/src/sys/rmtsysc.c +++ b/src/sys/rmtsysc.c @@ -305,7 +305,7 @@ afs_get_pag_from_groups(afs_uint32 g0, afs_uint32 g1) return NOPAG; } - +void afs_get_groups_from_pag(afs_uint32 pag, afs_uint32 * g0p, afs_uint32 * g1p) { unsigned short g0, g1; diff --git a/src/sys/rmtsysd.c b/src/sys/rmtsysd.c index 0819b94..aceb44b 100644 --- a/src/sys/rmtsysd.c +++ b/src/sys/rmtsysd.c @@ -78,4 +78,5 @@ main(int argc, char *argv[]) * at some point... */ rx_SetMaxProcs(service, 2); rx_StartServer(1); /* Donate this process to the server process pool */ + return 0; } diff --git a/src/sys/rmtsysnet.c b/src/sys/rmtsysnet.c index c879e73..4430b38 100644 --- a/src/sys/rmtsysnet.c +++ b/src/sys/rmtsysnet.c @@ -147,6 +147,7 @@ RAclToString(struct Acl *acl, char *mydata, int ntoh_conv) sprintf(tstring, "%s %d\n", tp->name, tp->rights); strcat(mydata, tstring); } + return 0; } @@ -165,6 +166,7 @@ RCleanAcl(struct Acl *aa) free(te); } free(aa); + return 0; } @@ -206,6 +208,7 @@ RFetchVolumeStatus_conversion(char *data, int ntoh_conv) status->PartBlocksAvail = htonl(status->PartBlocksAvail); status->PartMaxBlocks = htonl(status->PartMaxBlocks); } + return 0; } int @@ -224,6 +227,7 @@ RClearToken_convert(char *ptr, int ntoh_conv) ticket->BeginTimestamp = htonl(ticket->BeginTimestamp); ticket->EndTimestamp = htonl(ticket->EndTimestamp); } + return 0; } int @@ -334,6 +338,7 @@ inparam_conversion(afs_int32 cmd, char *buffer, afs_int32 ntoh_conv) /* Note that new pioctls are supposed to be in network order! */ break; } + return 0; } @@ -444,4 +449,5 @@ outparam_conversion(afs_int32 cmd, char *buffer, afs_int32 ntoh_conv) /* Note that new pioctls are supposed to be in network order! */ break; } + return 0; } diff --git a/src/sys/rmtsyss.c b/src/sys/rmtsyss.c index 3e20624..2cb68a9 100644 --- a/src/sys/rmtsyss.c +++ b/src/sys/rmtsyss.c @@ -83,6 +83,7 @@ rmtsysd() * at some point... */ rx_SetMaxProcs(service, 2); rx_StartServer(1); /* Donate this process to the server process pool */ + return 0; /* not reached */ } diff --git a/src/ubik/beacon.c b/src/ubik/beacon.c index 3823109..e375e2c 100644 --- a/src/ubik/beacon.c +++ b/src/ubik/beacon.c @@ -77,6 +77,7 @@ static verifyInterfaceAddress(); */ /* procedure called from debug rpc call to get this module's state for debugging */ +void ubeacon_Debug(aparm) register struct ubik_debug *aparm; { diff --git a/src/uss/grammar.y b/src/uss/grammar.y index a14828c..2c3fede 100644 --- a/src/uss/grammar.y +++ b/src/uss/grammar.y @@ -127,4 +127,5 @@ yyerror(s) char *s; { fprintf(stderr,"%s. ",s); +return 0; } diff --git a/src/uss/lex.l b/src/uss/lex.l index c96ecec..07a4776 100644 --- a/src/uss/lex.l +++ b/src/uss/lex.l @@ -70,6 +70,7 @@ EOL [\n] * and replaces the second with a null. */ +void Replace(in, out) char *in, *out; diff --git a/src/uss/uss.c b/src/uss/uss.c index aaf3203..2c66fee 100644 --- a/src/uss/uss.c +++ b/src/uss/uss.c @@ -1995,4 +1995,5 @@ main(argc, argv) if (doUnlog) { code = uss_fs_UnlogToken(uss_Cell); } + return 0; } /*Main routine */ diff --git a/src/uss/uss_fs.c b/src/uss/uss_fs.c index 9749928..3b87470 100644 --- a/src/uss/uss_fs.c +++ b/src/uss/uss_fs.c @@ -489,7 +489,7 @@ uss_fs_MkMountPoint(a_volname, a_cellname, a_rw, a_mountpoint) #endif /* USS_FS_DB */ return (-1); } - + return 0; } /*uss_fs_MkMountPoint */ diff --git a/src/venus/fs.c b/src/venus/fs.c index 6c599aa..7ee7489 100644 --- a/src/venus/fs.c +++ b/src/venus/fs.c @@ -279,6 +279,7 @@ PRights(afs_int32 arights, int dfs) if (arights & DFS_USR7) printf("H"); } + return 0; } /* this function returns TRUE (1) if the file is in AFS, otherwise false (0) */ diff --git a/src/venus/fstrace.c b/src/venus/fstrace.c index 2f9e17d..4e47b2c 100644 --- a/src/venus/fstrace.c +++ b/src/venus/fstrace.c @@ -81,6 +81,7 @@ struct logInfo { } *allInfo = 0; char dumpFileName[256] = ""; +void RegisterIclDumpFileName(name) char *name; { @@ -252,7 +253,7 @@ CheckTypes(bufferp, typesp, typeCount) #if defined(AFS_SGI61_ENV) && !defined(AFS_SGI62_ENV) #define uint64_t long long #endif -static +static void DisplayRecord(outFilep, alp, rsize) FILE *outFilep; register afs_int32 *alp; diff --git a/src/venus/test/fulltest.c b/src/venus/test/fulltest.c index ee455f3..49da1bd 100644 --- a/src/venus/test/fulltest.c +++ b/src/venus/test/fulltest.c @@ -17,6 +17,7 @@ RCSID #include #include #include +#include #include main(argc, argv) @@ -40,41 +41,41 @@ main(argc, argv) dirName = argv[1]; mkdir(dirName, 0777); if (chdir(dirName) < 0) - return perror("chdir"); + {perror("chdir");return;} if (getcwd(tempName, 1024) == 0) { return printf("Could not get working dir.\n"); } /* now create some files */ fd1 = open("hi", O_CREAT | O_TRUNC | O_RDWR, 0666); if (fd1 < 0) - return perror("open1"); + {perror("open1");return;} if (close(fd1) < 0) - return perror("close1"); + {perror("close1");return;} if (access("hi", 2) < 0) return printf("New file can not be written (access)\n"); if (chmod("hi", 0741) < 0) - return perror("chmod1"); + {perror("chmod1");return;} if (stat("hi", &tstat) < 0) - return perror("stat1"); + {perror("stat1");return;} if ((tstat.st_mode & 0777) != 0741) return printf("chmod failed to set mode properly\n"); fd1 = open("hi", O_RDWR); if (fd1 < 0) - return perror("open2"); + {perror("open2");return;} if (fchmod(fd1, 0654) < 0) - return perror("fchmod"); + {perror("fchmod");return;} if (fstat(fd1, &tstat) < 0) - return perror("fstat1"); + {perror("fstat1");return;} if ((tstat.st_mode & 0777) != 0654) return printf("fchmod failed to set mode properly\n"); #if 0 /* These appear to be defunct routines; * I don't know what, if anything, replaced them */ if (osi_ExclusiveLockNoBlock(fd1) < 0) - return perror("flock1"); + {perror("flock1");return;} if (osi_UnLock(fd1) < 0) - return perror("flock/unlock"); + {perror("flock/unlock");return;} #endif /* How about shared lock portability? */ @@ -87,7 +88,7 @@ main(argc, argv) fl.l_len = 0; if (fcntl(fd1, F_SETLK, &fl) == -1) - return perror("fcntl1: RDLCK"); + {perror("fcntl1: RDLCK");return;} fl.l_type = F_UNLCK; fl.l_whence = SEEK_SET; @@ -95,7 +96,7 @@ main(argc, argv) fl.l_len = 0; if (fcntl(fd1, F_SETLK, &fl) == -1) - return perror("fcntl2: UNLCK"); + {perror("fcntl2: UNLCK");return;} fl.l_type = F_WRLCK; fl.l_whence = SEEK_SET; @@ -103,7 +104,7 @@ main(argc, argv) fl.l_len = 0; if (fcntl(fd1, F_SETLK, &fl) == -1) - return perror("fcntl3: WRLCK"); + {perror("fcntl3: WRLCK");return;} fl.l_type = F_UNLCK; fl.l_whence = SEEK_SET; @@ -111,61 +112,61 @@ main(argc, argv) fl.l_len = 0; if (fcntl(fd1, F_SETLK, &fl) == -1) - return perror("fcntl4: UNLCK"); + {perror("fcntl4: UNLCK");return;} } if (fsync(fd1) < 0) - return perror("fsync"); + {perror("fsync");return;} if (write(fd1, "hi\n", 3) != 3) - return perror("write"); + {perror("write");return;} if (ftruncate(fd1, 2) < 0) - return perror("ftruncate"); + {perror("ftruncate");return;} if (close(fd1) < 0) - return perror("close2"); + {perror("close2");return;} fd1 = open("hi", O_RDONLY); if (fd1 < 0) - return perror("open3"); + {perror("open3");return;} if (read(fd1, tempName, 100) != 2) - return perror("read2"); + {perror("read2");return;} if (close(fd1) < 0) - return perror("close3"); + {perror("close3");return;} if (link("hi", "bye") < 0) - return perror("link"); + {perror("link");return;} if (stat("bye", &tstat) < 0) - return perror("link/stat"); + {perror("link/stat");return;} if (unlink("bye") < 0) - return perror("unlink"); + {perror("unlink");return;} if (symlink("hi", "bye") < 0) - return perror("symlink"); + {perror("symlink");return;} if (readlink("bye", tempName, 100) != 2) - return perror("readlink"); + {perror("readlink");return;} if (strncmp(tempName, "hi", 2) != 0) return printf("readlink contents"); if (mkdir("tdir", 0777) < 0) - return perror("mkdir"); + {perror("mkdir");return;} fd1 = open("tdir/fdsa", O_CREAT | O_TRUNC, 0777); close(fd1); if (rmdir("tdir") == 0) return printf("removed non-empty dir\n"); if (unlink("tdir/fdsa") < 0) - return perror("unlink tdir contents"); + {perror("unlink tdir contents");return;} if (rmdir("tdir") < 0) - return perror("rmdir"); + {perror("rmdir");return;} fd1 = open(".", O_RDONLY); if (fd1 < 0) - return perror("open dot"); + {perror("open dot");return;} if (read(fd1, tempName, 20) < 20) perror("read dir"); close(fd1); fd1 = open("rotest", O_RDWR | O_CREAT, 0444); if (fd1 < 0) - return perror("open ronly"); + {perror("open ronly");return;} fchown(fd1, 1, -1); /* don't check error code, may fail on Ultrix */ code = write(fd1, "test", 4); if (code != 4) { @@ -174,40 +175,41 @@ main(argc, argv) } code = close(fd1); if (code) - return perror("close ronly"); + {perror("close ronly");return;} code = stat("rotest", &tstat); if (code < 0) - return perror("stat ronly"); + {perror("stat ronly");return;} if (tstat.st_size != 4) { printf("rotest short close\n"); exit(1); } if (unlink("rotest") < 0) - return perror("rotest unlink"); + {perror("rotest unlink");return;} if (rename("hi", "bye") < 0) - return perror("rename1"); + {perror("rename1");return;} if (stat("bye", &tstat) < 0) - return perror("rename target invisible\n"); + {perror("rename target invisible\n");return;} if (stat("hi", &tstat) == 0) return printf("rename source still there\n"); #ifndef AFS_AIX_ENV /* No truncate(2) on aix so the following are excluded */ if (truncate("bye", 1) < 0) - return perror("truncate"); + {perror("truncate");return;} if (stat("bye", &tstat) < 0) - return perror("truncate zapped"); + {perror("truncate zapped");return;} if (tstat.st_size != 1) return printf("truncate failed\n"); #endif if (utimes("bye", tvp) < 0) - return perror("utimes"); + {perror("utimes");return;} if (unlink("bye") < 0) - return perror("unlink bye"); + {perror("unlink bye");return;} /* now finish up */ chdir(".."); rmdir(dirName); printf("Test completed successfully.\n"); + return 0; } diff --git a/src/venus/test/idtest.c b/src/venus/test/idtest.c index be04f05..9261f28 100644 --- a/src/venus/test/idtest.c +++ b/src/venus/test/idtest.c @@ -9,6 +9,7 @@ #include #include +#include RCSID ("$Header$"); diff --git a/src/venus/test/owntest.c b/src/venus/test/owntest.c index 11dcf41..a22b604 100644 --- a/src/venus/test/owntest.c +++ b/src/venus/test/owntest.c @@ -12,6 +12,7 @@ #ifdef HAVE_STDLIB_H #include #endif +#include RCSID ("$Header$"); diff --git a/src/venus/up.c b/src/venus/up.c index 63765b7..a5b4c3f 100644 --- a/src/venus/up.c +++ b/src/venus/up.c @@ -21,6 +21,7 @@ RCSID #undef _NONSTD_TYPES #endif #include +#include #include #include #ifdef AFS_SUN5_ENV diff --git a/src/viced/check_sysid.c b/src/viced/check_sysid.c index e1e3c65..b37b544 100644 --- a/src/viced/check_sysid.c +++ b/src/viced/check_sysid.c @@ -109,4 +109,5 @@ main(int argc, char **argv) } close(fd); + return 0; } diff --git a/src/viced/fsprobe.c b/src/viced/fsprobe.c index d65990f..6f90bd5 100644 --- a/src/viced/fsprobe.c +++ b/src/viced/fsprobe.c @@ -253,6 +253,7 @@ main(int argc, char **argv) } } #endif + return 0; } diff --git a/src/viced/viced.c b/src/viced/viced.c index 68533f7..3d39b01 100644 --- a/src/viced/viced.c +++ b/src/viced/viced.c @@ -2281,4 +2281,5 @@ main(int argc, char *argv[]) #else /* AFS_PTHREAD_ENV */ assert(LWP_WaitProcess(&parentPid) == LWP_SUCCESS); #endif /* AFS_PTHREAD_ENV */ + return 0; } diff --git a/src/vlserver/cnvldb.c b/src/vlserver/cnvldb.c index 5a2028d..e62d5f1 100644 --- a/src/vlserver/cnvldb.c +++ b/src/vlserver/cnvldb.c @@ -357,6 +357,7 @@ struct extentaddr *base[VL_MAX_ADDREXTBLKS]; * verifying their address is not pass the EOF and the flags are good. * If it's not good, then don't read the block in. */ +void read_mhentries(mh_addr, oldfd) int oldfd; afs_uint32 mh_addr; @@ -463,6 +464,7 @@ read_mhentries(mh_addr, oldfd) * * Before this can be called, the routine read_mhentries must be called. */ +void convert_mhentries(oldfd, newfd, header, fromver, tover) int oldfd, newfd; struct vlheader_2 *header; diff --git a/src/vlserver/vldb_check.c b/src/vlserver/vldb_check.c index 1460577..73a57d5 100644 --- a/src/vlserver/vldb_check.c +++ b/src/vlserver/vldb_check.c @@ -258,6 +258,7 @@ readheader(struct vlheader *headerp) if (headerp->vital_header.headersize != sizeof(*headerp)) printf("Header reports its size as %d (should be %d)\n", headerp->vital_header.headersize, sizeof(*headerp)); + return 0; } void @@ -314,6 +315,7 @@ readMH(afs_int32 addr, struct extentaddr *mhblockP) for (j = 0; j < VL_MAXIPADDRS_PERMH; j++) e->ex_addrs[j] = ntohl(e->ex_addrs[j]); } + return 0; } void @@ -392,6 +394,7 @@ readentry(afs_int32 addr, struct nvlentry *vlentryp, afs_int32 *type) } } } + return 0; } void @@ -686,6 +689,7 @@ FollowNameHash(struct vlheader *header) ("%d entries in name hash, longest is %d, shortest is %d, average length is %f\n", count, longest, shortest, ((float)count / (float)HASHSIZE)); } + return 0; } /* @@ -761,6 +765,7 @@ FollowIdHash(struct vlheader *header) ((float)count / (float)HASHSIZE)); } } + return 0; } /* @@ -805,6 +810,7 @@ FollowFreeChain(struct vlheader *header) } if (verbose) printf("%d entries on free chain\n", count); + return 0; } /* @@ -1015,7 +1021,7 @@ CheckIpAddrs(struct vlheader *header) printf("%d simple entries, %d multihomed entries, Total = %d\n", regentries, mhentries, mhentries + regentries); } - + return 0; } void diff --git a/src/vlserver/vlprocs.c b/src/vlserver/vlprocs.c index 486f790..5e0f125 100644 --- a/src/vlserver/vlprocs.c +++ b/src/vlserver/vlprocs.c @@ -55,17 +55,17 @@ static char rxinfo_str[128]; /* Need rxinfo string to be non-local */ static int put_attributeentry(); static int put_nattributeentry(); static int RemoveEntry(); -static ReleaseEntry(); +static void ReleaseEntry(); static int check_vldbentry(); static int check_nvldbentry(); static int vldbentry_to_vlentry(); static int nvldbentry_to_vlentry(); static get_vldbupdateentry(); static int repsite_exists(); -static repsite_compress(); -static vlentry_to_vldbentry(); -static vlentry_to_nvldbentry(); -static vlentry_to_uvldbentry(); +static void repsite_compress(); +static void vlentry_to_vldbentry(); +static void vlentry_to_nvldbentry(); +static void vlentry_to_uvldbentry(); static int InvalidVolname(); static int InvalidVoltype(); static int InvalidOperation(); @@ -2556,7 +2556,7 @@ RemoveEntry(trans, entryptr, tentry) return 0; } -static +static void ReleaseEntry(tentry, releasetype) struct nvlentry *tentry; afs_int32 releasetype; @@ -2861,7 +2861,7 @@ repsite_exists(VlEntry, server, partition) /* Repsite table compression: used when deleting a repsite entry so that all active repsite entries are on the top of the table. */ -static +static void repsite_compress(VlEntry, offset) struct nvlentry *VlEntry; int offset; @@ -2882,7 +2882,7 @@ repsite_compress(VlEntry, offset) /* Convert from the internal (compacted) vldb entry to the external representation used by the interface. */ -static +static void vlentry_to_vldbentry(VlEntry, VldbEntry) struct nvlentry *VlEntry; struct vldbentry *VldbEntry; @@ -2924,7 +2924,7 @@ vlentry_to_vldbentry(VlEntry, VldbEntry) /* Convert from the internal (compacted) vldb entry to the external representation used by the interface. */ -static +static void vlentry_to_nvldbentry(VlEntry, VldbEntry) struct nvlentry *VlEntry; struct nvldbentry *VldbEntry; @@ -2964,7 +2964,7 @@ vlentry_to_nvldbentry(VlEntry, VldbEntry) VldbEntry->flags = VlEntry->flags; } -static +static void vlentry_to_uvldbentry(VlEntry, VldbEntry) struct nvlentry *VlEntry; struct uvldbentry *VldbEntry; diff --git a/src/vlserver/vlserver.c b/src/vlserver/vlserver.c index 8dde3f8..094540c 100644 --- a/src/vlserver/vlserver.c +++ b/src/vlserver/vlserver.c @@ -409,4 +409,6 @@ main(argc, argv) rx_SetRxStatUserOk(vldb_rxstat_userok); rx_StartServer(1); /* Why waste this idle process?? */ + + return 0; /* not reachable */ } diff --git a/src/vol/namei_ops.c b/src/vol/namei_ops.c index fc82b82..c070911 100644 --- a/src/vol/namei_ops.c +++ b/src/vol/namei_ops.c @@ -18,6 +18,7 @@ RCSID #ifdef AFS_NAMEI_ENV #include #include +#include #include #include #include diff --git a/src/vol/salvaged.c b/src/vol/salvaged.c index 1388d60..cff405f 100644 --- a/src/vol/salvaged.c +++ b/src/vol/salvaged.c @@ -407,6 +407,7 @@ main(int argc, char **argv) err = cmd_Dispatch(argc, argv); Exit(err); + return 0; /* not reached */ } static void diff --git a/src/vol/salvager.c b/src/vol/salvager.c index 35fba13..d7dab03 100644 --- a/src/vol/salvager.c +++ b/src/vol/salvager.c @@ -490,5 +490,6 @@ main(int argc, char **argv) #endif /* FAST_RESTART */ err = cmd_Dispatch(argc, argv); Exit(err); + return 0; /* not reached */ } diff --git a/src/volser/lockprocs.c b/src/volser/lockprocs.c index e312ff1..9b1d96c 100644 --- a/src/volser/lockprocs.c +++ b/src/volser/lockprocs.c @@ -102,6 +102,7 @@ SetAValue(entry, oserver, opart, nserver, npart, type) } /* Changes the RW site only */ +void Lp_SetRWValue(entry, oserver, opart, nserver, npart) struct nvldbentry *entry; afs_int32 oserver, opart, nserver, npart; @@ -110,6 +111,7 @@ Lp_SetRWValue(entry, oserver, opart, nserver, npart) } /* Changes the RO site only */ +void Lp_SetROValue(entry, oserver, opart, nserver, npart) struct nvldbentry *entry; afs_int32 oserver, opart, nserver, npart; @@ -143,6 +145,7 @@ Lp_GetRwIndex(entry) } /*initialize queue pointed by */ +void Lp_QInit(ahead) struct qHead *ahead; { @@ -151,6 +154,7 @@ Lp_QInit(ahead) } /*add in front of queue */ +void Lp_QAdd(ahead, elem) struct qHead *ahead; struct aqueue *elem; @@ -192,6 +196,7 @@ Lp_QScan(ahead, id, success, elem) /*return the element in the beginning of the queue , free *the space used by that element . indicates if enumeration was ok*/ +void Lp_QEnumerate(ahead, success, elem) struct qHead *ahead; struct aqueue *elem; @@ -217,6 +222,7 @@ Lp_QEnumerate(ahead, success, elem) *success = 0; } +void Lp_QTraverse(ahead) struct qHead *ahead; { diff --git a/src/volser/restorevol.c b/src/volser/restorevol.c index 976a3a3..aadac4c 100644 --- a/src/volser/restorevol.c +++ b/src/volser/restorevol.c @@ -118,7 +118,7 @@ readchar() #define BUFSIZE 16384 char buf[BUFSIZE]; -char +void readdata(buffer, size) char *buffer; afs_sfsize_t size; diff --git a/src/volser/volmain.c b/src/volser/volmain.c index db10bc1..e31ceb8 100644 --- a/src/volser/volmain.c +++ b/src/volser/volmain.c @@ -539,4 +539,5 @@ main(int argc, char **argv) osi_audit(VS_FinishEvent, (-1), AUD_END); Abort("StartServer returned?"); + return 0; /* not reached */ } diff --git a/src/volser/vsprocs.c b/src/volser/vsprocs.c index ec7c639..840c0d6 100644 --- a/src/volser/vsprocs.c +++ b/src/volser/vsprocs.c @@ -646,7 +646,7 @@ UV_CreateVolume2(afs_int32 aserver, afs_int32 apart, char *aname, code = AFSVolSetInfo(aconn, tid, &tstatus); if (code) - EPRINT(code, "Could not change quota (error %d), continuing...\n"); + EPRINT(code, "Could not change quota, continuing...\n"); code = AFSVolSetFlags(aconn, tid, 0); /* bring it online (mark it InService */ EGOTO2(cfail, vcode, "Could not bring the volume %s %u online \n", aname, diff --git a/src/xstat/xstat_cm_test.c b/src/xstat/xstat_cm_test.c index da3fec8..3da9dba 100644 --- a/src/xstat/xstat_cm_test.c +++ b/src/xstat/xstat_cm_test.c @@ -152,6 +152,7 @@ PrintCallInfo() /* Print detailed functional call statistics */ +void print_cmCallStats() { static char rn[] = "print_cmCallStats"; /*Routine name */