]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
add-missing-return-values-20031207
authorJeffrey Altman <jaltman@grand.central.org>
Mon, 8 Dec 2003 01:45:23 +0000 (01:45 +0000)
committerJeffrey Altman <jaltman@secure-endpoints.com>
Mon, 8 Dec 2003 01:45:23 +0000 (01:45 +0000)
Add missing return values producing warnings on Windows

22 files changed:
src/WINNT/afsd/cm_buf.c
src/WINNT/afsd/cm_config.c
src/WINNT/afsd/cm_freelance.c
src/WINNT/afsd/smb.c
src/bucoord/commands.c
src/bucoord/main.c
src/budb/server.c
src/budb/struct_ops.c
src/butc/dump.c
src/butc/lwps.c
src/butc/tcudbprocs.c
src/dir/buffer.c
src/ptserver/db_verify.c
src/ptserver/ptuser.c
src/ubik/disk.c
src/ubik/recovery.c
src/ubik/vote.c
src/viced/afsfileprocs.c
src/viced/callback.c
src/viced/host.c
src/viced/physio.c
src/volser/vsprocs.c

index 5a89ffa62e4ba099c72546abc32289e8dc9241fa..84346f29550ef3547c14cf5352c3552da7cfb7e1 100644 (file)
@@ -1441,5 +1441,6 @@ int cm_DumpBufHashTable(FILE *outputFile, char *cookie)
     WriteFile(outputFile, output, strlen(output), &zilch, NULL);
 
     lock_ReleaseRead(&buf_globalLock);
+    return 0;
 }
 
index 41b0e5df8672ccfd578fe4a7f63bc755ca46b46e..37ed8897bfa5be4640d5d18e4a9275bbe9cd6452 100644 (file)
@@ -565,7 +565,8 @@ long cm_CloseCellFile(cm_configFile_t *filep)
 
 #if !defined(DJGPP) && !defined(AFS_WIN95_ENV)
        code = GetWindowsDirectory(wdir, sizeof(wdir));
-        if (code == 0 || code > sizeof(wdir)) return NULL;
+        if (code == 0 || code > sizeof(wdir)) 
+           return closeCode;
         
        /* add trailing backslash, if required */
         tlen = strlen(wdir);
@@ -599,7 +600,8 @@ long cm_CloseCellFile(cm_configFile_t *filep)
         
         code = rename(sdir, wdir);     /* do the rename */
         
-        if (code) code = errno;
+        if (code) 
+         code = errno;
         
         return code;
 }
index d3081229d73859edf6d494a99d4c40e66ac16da0..1547f3a424e7449eda38b0c3a92d76dc2d077f43 100644 (file)
@@ -229,10 +229,11 @@ void cm_InitFakeRootDir() {
 
 int cm_FakeRootFid(cm_fid_t *fidp)
 {
-  fidp->cell = 0x1;            /* root cell */
-       fidp->volume = 0x20000001;   /* root.afs ? */
-       fidp->vnode = 0x1;
-       fidp->unique = 0x1;
+      fidp->cell = 0x1;            /* root cell */
+      fidp->volume = 0x20000001;   /* root.afs ? */
+      fidp->vnode = 0x1;
+      fidp->unique = 0x1;
+      return 0;
 }
   
 int cm_getLocalMountPointChange() {
@@ -332,6 +333,7 @@ int cm_reInitLocalMountPoints() {
        lock_ReleaseMutex(&cm_Freelance_Lock);
 
        printf("----- reinit complete -----\n\n");
+       return 0;
 }
 
 
index ccfaca931daa412aaa1abaec94936e5d6f454379..063c43db9e9a633ecbf0c54700315ec63ece3d0d 100644 (file)
@@ -6639,6 +6639,7 @@ int smb_DumpVCP(FILE *outputFile, char *cookie)
     }       
   
     lock_ReleaseRead(&smb_rctLock);
+    return 0;
 }
 
 
index 06179b4a63a948403cb30b1cd53cca88fc82a7d9..423de31bdd97262c297592c19af22a0e04dcb700 100644 (file)
@@ -194,6 +194,7 @@ randSPEntries(serverlist, avols)
        }
        free(ss);
     }
+    return 0;
 }
 
 int
index db9cd4fb9240ec0c323410107ef25abcc51bbcbf..069433a63b11d88f7d26a022b29ceead012c486d 100644 (file)
@@ -468,6 +468,7 @@ bc_interactCmd(as, arock)
      char *arock;
 {
     interact = 1;
+    return 0;
 }
 
 static void
index 95be5397576d666ae7a74567d4e23477dafff05b..2e80753c889f9d737ae9a42d651d578738acfaa4 100644 (file)
@@ -550,6 +550,7 @@ LogDebug(level, a, b, c, d, e, f, g, h, i)
            fclose(globalConfPtr->log);
        }
     }
+    return 0;
 }
 
 static char *
@@ -578,6 +579,7 @@ Log(a, b, c, d, e, f, g, h, i)
        fflush(globalConfPtr->log);
        fclose(globalConfPtr->log);
     }
+    return 0;
 }
 
  /*VARARGS*/
@@ -600,6 +602,7 @@ LogError(code, a, b, c, d, e, f, g, h, i)
        fflush(globalConfPtr->log);
        fclose(globalConfPtr->log);
     }
+    return 0;
 }
 
 
@@ -622,4 +625,5 @@ LogNetDump(dumpPtr)
        printDump(globalConfPtr->log, &hostDump);
        fclose(globalConfPtr->log);
     }
+    return 0;
 }
index 75c3aca6b5cb43ba1f5c1c6fedc0a62dbe4df6b3..5d6c0109ffb6c589c115fdcfa17c872bf4cd038f 100644 (file)
@@ -122,6 +122,7 @@ printHashTable(fid, htptr)
 /* printMemoryHashTable
  *     print the hash table structure, i.e. the header structure.
  */
+int
 printMemoryHashTable(fid, mhtptr)
      FILE *fid;
      struct memoryHashTable *mhtptr;
@@ -131,24 +132,30 @@ printMemoryHashTable(fid, mhtptr)
     fprintf(fid, "progress = %d\n", mhtptr->progress);
     fprintf(fid, "size = %d\n", mhtptr->size);
     fprintf(fid, "oldsize = %d\n", mhtptr->oldSize);
+    return 0;
 }
 
+int
 printPrincipal(ptr)
      struct ktc_principal *ptr;
 {
     printf("name = %s\n", ptr->name);
     printf("instance = %s\n", ptr->instance);
     printf("cell = %s\n", ptr->cell);
+    return 0;
 }
 
+int
 printStructDumpHeader(ptr)
      struct structDumpHeader *ptr;
 {
     printf("type = %d\n", ptr->type);
     printf("structure version = %d\n", ptr->structversion);
     printf("size = %d bytes\n", ptr->size);
+    return 0;
 }
 
+int
 printTape(fid, tptr)
      FILE *fid;
      struct tape *tptr;
@@ -167,8 +174,10 @@ printTape(fid, tptr)
     fprintf(fid, "firstVol = %d\n", tptr->firstVol);
     fprintf(fid, "labelPos = %d\n", tptr->labelpos);
     fprintf(fid, "useCount = %d\n", tptr->useCount);
+    return 0;
 }
 
+int
 printTapeEntry(teptr)
      struct budb_tapeEntry *teptr;
 {
@@ -198,8 +207,10 @@ printTapeEntry(teptr)
     printf("labelPos = %d\n", teptr->labelpos);
     printf("useCount = %d\n", teptr->useCount);
     printf("dump = %d\n", teptr->dump);
+    return 0;
 }
 
+int
 printTapeSet(tsptr, nss)
      struct budb_tapeSet *tsptr;
      afs_int32 nss;            /* is the tapeserver name an accurate name */
@@ -212,8 +223,10 @@ printTapeSet(tsptr, nss)
 /*  printf("a  = %d\n",tsptr->a ); */
 /*  printf("b = %d\n",tsptr->b);   */
     printf("Start Tape Seq = %d\n", tsptr->b);
+    return 0;
 }
 
+int
 printVolumeEntry(veptr)
      struct budb_volumeEntry *veptr;
 {
@@ -245,8 +258,10 @@ printVolumeEntry(veptr)
 
     printf("dump = %d\n", veptr->dump);
     printf("tape = %s\n", veptr->tape);
+    return 0;
 }
 
+int
 printVolFragment(fid, vfptr)
      FILE *fid;
      struct volFragment *vfptr;
@@ -262,8 +277,10 @@ printVolFragment(fid, vfptr)
     fprintf(fid, "nBytes = %d\n", vfptr->nBytes);
     fprintf(fid, "flags = %d\n", vfptr->flags);
     fprintf(fid, "sequence = %d\n", vfptr->sequence);
+    return 0;
 }
 
+int
 printVolInfo(fid, viptr)
      FILE *fid;
      struct volInfo *viptr;
@@ -278,6 +295,7 @@ printVolInfo(fid, viptr)
     fprintf(fid, "sameNameChain = %d\n", viptr->sameNameChain);
     fprintf(fid, "firstFragment = %d\n", viptr->firstFragment);
     fprintf(fid, "nFrags = %d\n", viptr->nFrags);
+    return 0;
 }
 
 
@@ -401,6 +419,7 @@ principal_hton(hostptr, netptr)
     strcpy(netptr->name, hostptr->name);
     strcpy(netptr->instance, hostptr->instance);
     strcpy(netptr->cell, hostptr->cell);
+    return 0;
 }
 
 principal_ntoh(netptr, hostptr)
@@ -409,6 +428,7 @@ principal_ntoh(netptr, hostptr)
     strcpy(hostptr->name, netptr->name);
     strcpy(hostptr->instance, netptr->instance);
     strcpy(hostptr->cell, netptr->cell);
+    return 0;
 }
 
 structDumpHeader_hton(hostPtr, netPtr)
@@ -445,6 +465,7 @@ tapeEntry_ntoh(netptr, hostptr)
     hostptr->dump = ntohl(netptr->dump);
 }
 
+int
 tapeSet_hton(hostptr, netptr)
      struct budb_tapeSet *hostptr, *netptr;
 {
@@ -454,8 +475,10 @@ tapeSet_hton(hostptr, netptr)
     netptr->maxTapes = htonl(hostptr->maxTapes);
     netptr->a = htonl(hostptr->a);
     netptr->b = htonl(hostptr->b);
+    return 0;
 }
 
+int
 tapeSet_ntoh(netptr, hostptr)
      struct budb_tapeSet *netptr, *hostptr;
 {
@@ -465,6 +488,7 @@ tapeSet_ntoh(netptr, hostptr)
     hostptr->maxTapes = ntohl(netptr->maxTapes);
     hostptr->a = ntohl(netptr->a);
     hostptr->b = ntohl(netptr->b);
+    return 0;
 }
 
 textBlock_hton(hostptr, netptr)
index 6c37af34d6893aed41e471db24759ab4874642b0..19363f2a9f3e2d8048951059bd290f163d26e8eb 100644 (file)
@@ -106,6 +106,7 @@ int
 localtime_r(time_t * t, struct tm *tm)
 {
     memcpy(tm, localtime(t), sizeof(struct tm));
+    return 0;
 }
 #endif
 
@@ -821,6 +822,8 @@ xbsaDumpVolume(struct tc_dumpDesc * curDump, struct dumpRock * dparamsPtr)
   abort_exit:
     dparamsPtr->curVolumeStatus = DUMP_FAILED;
     ERROR_EXIT(code);
+#else
+    return 0;
 #endif
 }
 
@@ -1459,6 +1462,7 @@ printTapeLabel(struct butm_tapeLabel *tl)
     printf("   pName          = %s\n", tl->pName);
     printf("   size           = %u\n", tl->size);
     printf("   dumpPath       = %s\n", tl->dumpPath);
+    return 0;
 }
 
 /* getXBSATape
@@ -1900,6 +1904,7 @@ volumeHeader_hton(struct volumeHeader *hostPtr, struct volumeHeader *netPtr)
     volHdr.cloneDate = htonl(hostPtr->cloneDate);
 
     memcpy(netPtr, &volHdr, sizeof(struct volumeHeader));
+    return 0;
 }
 
 /* database related routines */
index 6eb2ee37c60dbbb1cadaa5528dc6fd9b53e4702c..1ce9e4120be18df75fbb2107ae3621dbb19ed4f4 100644 (file)
@@ -1443,6 +1443,7 @@ SkipTape(Restore, size, index, tapename, tapeid, taskid)
            SkipVolume(Restore, size, i, Restore[i].origVid, taskid);
        }
     }
+    return 0;
 }
 
 /* SkipVolume
@@ -1468,6 +1469,7 @@ SkipVolume(Restore, size, index, volid, taskid)
            }
        }
     }
+    return 0;
 }
 
 xbsaRestoreVolume(taskId, restoreInfo, rparamsPtr)
index 42f8a672ed392687fb6f0d70b617ea42037cf352..7a902ef60a080707a1adc2798374f090336545c6 100644 (file)
@@ -528,6 +528,7 @@ makeDbDumpEntry(tapeEntPtr, dumpEntryPtr)
     strcat(dumpEntryPtr->tapes.format, ".%d");
     dumpEntryPtr->tapes.b = tapeEntPtr->seq;
     dumpEntryPtr->tapes.maxTapes = 0;
+    return 0;
 }
 
 /* readDbTape
@@ -780,6 +781,7 @@ KeepAlive()
        if (code || done)
            break;
     }
+    return 0;
 }
 
 #define BIGCHUNK 102400
index 7863ced221248835e85eab90f0ef99bf1f37dbb0..02b98a65599794221e57496ce0f1e24a67363623 100644 (file)
@@ -219,6 +219,7 @@ FixupBucket(ap)
     ap->hashIndex = i;         /* remember where we are for deletion */
     ap->hashNext = phTable[i]; /* add us to the list */
     phTable[i] = ap;           /* at the front, since it's LRU */
+    return 0;
 }
 
 struct buffer *
index e2ee4a8a5603a80116d48a4d3753473f0c42f95f..6fd341e783af7b78de3c55244dff8a024f97f638 100644 (file)
@@ -87,6 +87,7 @@ printheader(h)
 /* printf("Sub/super Count   = %d\n", ntohl(h->instcount));    NYI */
     printf("Name Hash         = %d buckets\n", HASHSIZE);
     printf("ID   Hash         = %d buckets\n", HASHSIZE);
+    return 0;
 }
 
 static afs_int32
index daae04fa61c6c15e95ed34e3dcce02e0e49cfa21..8df66fd804478cc822f727a90ef9c5185e54b04e 100644 (file)
@@ -779,6 +779,7 @@ pr_SetFieldsEntry(id, mask, flags, ngroups, nusers)
 }
 
 
+int
 stolower(s)
      char *s;
 {
@@ -787,4 +788,5 @@ stolower(s)
            *s = tolower(*s);
        s++;
     }
+    return 0;
 }
index 02a482aec3cfefcaf0ef64a07787c3c24e0b63ad..89b8303892176b62f896ed94b27f584d34528521 100644 (file)
@@ -103,6 +103,7 @@ udisk_Debug(struct ubik_debug *aparm)
                aparm->writeLockedPages++;
        }
     }
+    return 0;
 }
 
 /* log format is defined here, and implicitly in recovery.c
@@ -472,6 +473,7 @@ FixupBucket(struct buffer *ap)
     ap->hashIndex = i;         /* remember where we are for deletion */
     ap->hashNext = phTable[i]; /* add us to the list */
     phTable[i] = ap;
+    return 0;
 }
 
 /* create a new slot for a particular dbase page */
index fcf4ee175e53d6fbc10c897ca0261b3585b995c4..cbcaae9d5216f74eb5fa64d708223a05bd0862df 100644 (file)
@@ -164,6 +164,7 @@ urecovery_CheckTid(register struct ubik_tid *atid)
            ubik_currentTrans = (struct ubik_trans *)0;
        }
     }
+    return;
 }
 
 /* log format is defined here, and implicitly in disk.c
index 45cbfc07ab5e4316c6a61f4efa739e9fa61c33da..0a1f4f230afd3878bc6918d66930c30ca5847808 100644 (file)
@@ -546,6 +546,7 @@ ubik_dprint(char *a, char *b, char *c, char *d, char *e, char *f, char *g,
            char *h)
 {
     ViceLog(5, (a, b, c, d, e, f, g, h));
+    return 0;
 }
 
 int
@@ -553,6 +554,7 @@ ubik_print(char *a, char *b, char *c, char *d, char *e, char *f, char *g,
           char *h)
 {
     ViceLog(0, (a, b, c, d, e, f, g, h));
+    return 0;
 }
 
 /* called once/run to init the vote module */
index 5171305b5831c20d896c004b4d2356a8f4b27474..1b271dc13c021ca9714e0157288ebb20b4bb782c 100644 (file)
@@ -1898,7 +1898,7 @@ RXGetVolumeStatus(AFSFetchVolumeStatus * status, char **name, char **offMsg,
     }
     strcpy(*motd, V_motd(volptr));
 #endif /* FS_STATS_DETAILED */
-
+    return 0;
 }                              /*RXGetVolumeStatus */
 
 
index 09ac9ff98eb214e977e6afd68b06782764c05db8..65e3be2899e5a4084d7eb47d9204f54e3b7e8a40 100644 (file)
@@ -1489,6 +1489,7 @@ CleanupTimedOutCallBacks(void)
     H_LOCK;
     CleanupTimedOutCallBacks_r();
     H_UNLOCK;
+    return 0;
 }
 
 int
index 0fba00f299a58e78a5f4fd9ad5e82456c4fc64e2..1f2651dd622e03ac23ef21d3f72be13b01ffe2d3 100644 (file)
@@ -832,6 +832,7 @@ h_FreeConnection(struct rx_connection *tcon)
            client->tcon = (struct rx_connection *)0;
        H_UNLOCK;
     }
+    return 0;
 }                              /*h_FreeConnection */
 
 
index eba5d2c3b71895ea7ad637dee43848a384d47512..b3a6a16ff33f138dc50ade5ed9e8e978d388ac83 100644 (file)
@@ -202,4 +202,5 @@ FidCpy(DirHandle * tofile, DirHandle * fromfile)
 {
     *tofile = *fromfile;
     IH_COPY(tofile->dirh_handle, fromfile->dirh_handle);
+    return 0;
 }
index 2fad506a645e8184482770415917075577a477cc..fe03d06a0c5e1526202fc5c94f36a922cc12ce01 100644 (file)
@@ -415,6 +415,7 @@ UV_SetSecurity(register struct rx_securityClass *as, afs_int32 aindex)
 {
     uvindex = aindex;
     uvclass = as;
+    return 0;
 }
 
 /* bind to volser on <port> <aserver> */