]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
1.6: fix warnings
authorDerrick Brashear <shadow@your-file-system.com>
Wed, 12 Sep 2012 11:25:12 +0000 (07:25 -0400)
committerDerrick Brashear <shadow@your-file-system.com>
Sat, 29 Sep 2012 13:39:30 +0000 (06:39 -0700)
1.6 only. fix warnings which do not exist on master

Change-Id: I33927d1f3f3a45c26991bb9a60eb80bd0e6a9178
Reviewed-on: http://gerrit.openafs.org/8105
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
41 files changed:
src/afs/afs_analyze.c
src/afs/afs_bypasscache.c
src/afs/afs_cell.c
src/afs/afs_init.c
src/afs/afs_osidnlc.c
src/afs/afs_pioctl.c
src/afs/afs_segments.c
src/afs/afs_server.c
src/afs/afs_vcache.c
src/afsmonitor/afsmon-win.c
src/afsmonitor/afsmonitor.c
src/bozo/bnode.c
src/bucoord/vol_sets.c
src/budb/database.h
src/des/key_sched.c
src/kauth/authclient.c
src/kauth/kadatabase.c
src/kauth/kkids.c
src/kauth/kpasswd.c
src/libadmin/test/pts.c
src/libadmin/vos/vsprocs.c
src/ptserver/db_verify.c
src/rxgen/rpc_parse.c
src/rxkad/v5gen.c
src/scout/scout.c
src/ubik/recovery.c
src/ubik/remote.c
src/update/server.c
src/uss/uss.c
src/uss/uss_acl.c
src/venus/fs.c
src/viced/afsfileprocs.c
src/vol/fssync-server.c
src/vol/vol-salvage.c
src/vol/volume.c
src/vol/vutil.c
src/volser/dumpstuff.c
src/volser/restorevol.c
src/volser/vol_split.c
src/volser/volprocs.c
src/xstat/xstat_fs_test.c

index c4a0cffeadd2bcf5cbb8b0951faf890caf341421..b7f4aea9f656d25fce2f70584fa933ddd690fea6 100644 (file)
@@ -427,7 +427,6 @@ afs_Analyze(struct afs_conn *aconn, struct rx_connection *rxconn,
     afs_int32 shouldRetry = 0;
     afs_int32 serversleft = 1;
     struct afs_stats_RPCErrors *aerrP;
-    afs_int32 markeddown;
     afs_uint32 address;
 
     if (AFS_IS_DISCONNECTED && !AFS_IN_SYNC) {
@@ -665,7 +664,7 @@ afs_Analyze(struct afs_conn *aconn, struct rx_connection *rxconn,
             */
            goto out;
        }
-       markeddown = afs_ServerDown(sa, acode);
+       afs_ServerDown(sa, acode);
        ForceNewConnections(sa); /**multi homed clients lock:afs_xsrvAddr? */
        if (aerrP)
            (aerrP->err_Server)++;
index e4470243cfdf62944c712e844405a15cc29cda2e..7370dc04d83f9b59e51f31b384e7e1a4b36338e5 100644 (file)
@@ -568,7 +568,6 @@ afs_PrefetchNoCache(struct vcache *avc,
 #endif
 
     struct afs_conn *tc;
-    afs_int32 i;
     struct rx_call *tcall;
     struct tlocal1 {
        struct AFSVolSync tsync;
@@ -588,7 +587,6 @@ afs_PrefetchNoCache(struct vcache *avc,
       tc = afs_Conn(&avc->f.fid, areq, SHARED_LOCK /* ignored */, &rxconn);
        if (tc) {
            avc->callback = tc->srvr->server;
-           i = osi_Time();
            tcall = rx_NewCall(rxconn);
 #ifdef AFS_64BIT_CLIENT
            if (!afs_serverHasNo64Bit(tc)) {
index 016aa2e6a1ced96019302b0669efb0ca2bb973a8..3e4259a5f8b5c15df892667644c289c465948fa2 100644 (file)
@@ -331,7 +331,6 @@ afs_cellname_init(afs_dcache_id_t *inode, int lookupcode)
 
     while (1) {
        afs_int32 cellnum, clen, magic;
-       struct cell_name *cn;
        char *cellname;
 
        cc = afs_osi_Read(tfile, off, &magic, sizeof(magic));
@@ -369,7 +368,7 @@ afs_cellname_init(afs_dcache_id_t *inode, int lookupcode)
            break;
        }
 
-       cn = afs_cellname_new(cellname, cellnum);
+       afs_cellname_new(cellname, cellnum);
        afs_osi_Free(cellname, clen + 1);
     }
 
index cf0636a6044f00a73ead9fdd46abdc61b7766876..431d89dd0ee48f4cff298bf748cd241c53537ca0 100644 (file)
@@ -724,11 +724,6 @@ shutdown_cache(void)
 void
 shutdown_vnodeops(void)
 {
-#if !defined(AFS_SGI_ENV) && !defined(AFS_SUN5_ENV)
-    struct buf *afs_bread_freebp = 0;
-#endif
-
-
     AFS_STATCNT(shutdown_vnodeops);
     if (afs_cold_shutdown) {
 #ifndef        AFS_SUN5_ENV            /* XXX */
@@ -736,9 +731,6 @@ shutdown_vnodeops(void)
 #endif
 #ifndef AFS_LINUX20_ENV
        afs_rd_stash_i = 0;
-#endif
-#if !defined(AFS_SGI_ENV) && !defined(AFS_SUN5_ENV)
-       afs_bread_freebp = 0;
 #endif
        shutdown_mariner();
     }
index d2a661696c2c09ecfca05e5f59f9867044c7dd6a..0309e9a90ed750c0df3f94fd8a4a2c005c16ba0d 100644 (file)
@@ -190,10 +190,9 @@ struct vcache *
 osi_dnlc_lookup(struct vcache *adp, char *aname, int locktype)
 {
     struct vcache *tvc;
-    int LRUme;
     unsigned int key, skey;
     char *ts = aname;
-    struct nc *tnc, *tnc1 = 0;
+    struct nc *tnc;
     int safety;
 #ifdef AFS_DARWIN80_ENV
     vnode_t tvp;
@@ -218,7 +217,6 @@ osi_dnlc_lookup(struct vcache *adp, char *aname, int locktype)
        if ( /* (tnc->key == key)  && */ (tnc->dirp == adp)
            && (!strcmp((char *)tnc->name, aname))) {
            tvc = tnc->vp;
-           tnc1 = tnc;
            break;
        } else if (tnc->next == nameHash[skey]) {       /* end of list */
            break;
@@ -232,7 +230,6 @@ osi_dnlc_lookup(struct vcache *adp, char *aname, int locktype)
        }
     }
 
-    LRUme = 0;                 /* (tnc != nameHash[skey]); */
     ReleaseReadLock(&afs_xdnlc);
 
     if (!tvc) {
index b0b1b9870e67003dd0c73b07eeb6e74b8569d287..d96a842753d3869b6af0d4356e8f5f46000765e5 100644 (file)
@@ -4854,8 +4854,8 @@ DECL_PIOCTL(PRxStatPeer)
 
 DECL_PIOCTL(PPrefetchFromTape)
 {
-    afs_int32 code, code1;
-    afs_int32 bytes, outval;
+    afs_int32 code;
+    afs_int32 outval;
     struct afs_conn *tc;
     struct rx_call *tcall;
     struct AFSVolSync tsync;
@@ -4898,11 +4898,11 @@ DECL_PIOCTL(PPrefetchFromTape)
                StartRXAFS_FetchData(tcall, (struct AFSFid *)&tvc->f.fid.Fid, 0,
                                     0);
            if (!code) {
-               bytes = rx_Read(tcall, (char *)&outval, sizeof(afs_int32));
+               rx_Read(tcall, (char *)&outval, sizeof(afs_int32));
                code =
                    EndRXAFS_FetchData(tcall, &OutStatus, &CallBack, &tsync);
            }
-           code1 = rx_EndCall(tcall, code);
+           code = rx_EndCall(tcall, code);
            RX_AFS_GLOCK();
        } else
            code = -1;
index 0c32462845be86dce32b9fe614a36d82fd07057e..192a3d4b41175524c1621e7a330ab0731bd75a46 100644 (file)
@@ -169,7 +169,6 @@ afs_StoreAllSegments(struct vcache *avc, struct vrequest *areq,
     afs_hyper_t newDV, oldDV;  /* DV when we start, and finish, respectively */
     struct dcache **dcList;
     unsigned int i, j, minj, moredata, high, off;
-    afs_size_t tlen;
     afs_size_t maxStoredLength;        /* highest offset we've written to server. */
     int safety, marineronce = 0;
 
@@ -238,7 +237,6 @@ afs_StoreAllSegments(struct vcache *avc, struct vrequest *areq,
     origCBs = afs_allCBs;
 
     maxStoredLength = 0;
-    tlen = avc->f.m.Length;
     minj = 0;
 
     do {
index 1f553cdcfbfb7d924fcf9ec10edc47481dc5a160..178169f45dc64137e32caada01e1946ff5d1e66d 100644 (file)
@@ -1880,7 +1880,6 @@ afs_GetServer(afs_uint32 *aserverp, afs_int32 nservers, afs_int32 acell,
 {
     struct server *oldts = 0, *ts, *newts, *orphts = 0;
     struct srvAddr *oldsa, *newsa, *nextsa, *orphsa;
-    u_short fsport;
     afs_int32 iphash, k, srvcount = 0;
     unsigned int srvhash;
 
@@ -1964,8 +1963,6 @@ afs_GetServer(afs_uint32 *aserverp, afs_int32 nservers, afs_int32 acell,
     if (acell)
        newts->cell = afs_GetCell(acell, 0);
 
-    fsport = (newts->cell ? newts->cell->fsport : AFS_FSPORT);
-
     /* For each IP address we are registering */
     for (k = 0; k < nservers; k++) {
        iphash = SHash(aserverp[k]);
index 8b7115c9ea1c98eea40015ffa75e44844e8dc1e9..793d0353be88f071a2f52971f85eed606f8b7f17 100644 (file)
@@ -1510,7 +1510,6 @@ afs_RemoteLookup(struct VenusFid *afid, struct vrequest *areq,
                 struct AFSVolSync *tsyncp)
 {
     afs_int32 code;
-    afs_uint32 start;
     struct afs_conn *tc;
     struct rx_connection *rxconn;
     struct AFSFetchStatus OutDirStatus;
@@ -1522,7 +1521,6 @@ afs_RemoteLookup(struct VenusFid *afid, struct vrequest *areq,
        if (tc) {
            if (serverp)
                *serverp = tc->srvr->server;
-           start = osi_Time();
            XSTATS_START_TIME(AFS_STATS_FS_RPCIDX_XLOOKUP);
            RX_AFS_GUNLOCK();
            code =
index f3e2188bd0b293e79cc735c5dd253f74d8cf2719..550d313c892055d99ba1666f90a17ef9ade60163 100644 (file)
@@ -1036,7 +1036,6 @@ create_ovwFrame_objects(void)
     int hostLines;             /* number of lines of host names to display */
     struct onode **ovw_fsNames_o_Ptr;  /* index to list of fs names onodes */
     struct onode **ovw_cmNames_o_Ptr;  /* index to list of cm names onodes */
-    int code;
     int i;
 
     if (afsmon_debug) {
@@ -1066,8 +1065,8 @@ create_ovwFrame_objects(void)
        sprintf(errMsg, "[ %s ] Failed to create initMsg_o onode\n", rn);
        afsmon_Exit(250);
     }
-    code = gtxframe_AddToList(ovwFrame, initMsg_o);
-    code = gator_light_set(initMsg_o, HIGHLIGHT);
+    gtxframe_AddToList(ovwFrame, initMsg_o);
+    gator_light_set(initMsg_o, HIGHLIGHT);
     initMsg_on = 1;
 
 
@@ -1079,8 +1078,8 @@ create_ovwFrame_objects(void)
        sprintf(errMsg, "[ %s ] Failed to create command onode\n", rn);
        afsmon_Exit(265);
     }
-    code = gtxframe_AddToList(ovwFrame, ovw_cmd_o);
-    code = gator_light_set(ovw_cmd_o, HIGHLIGHT);
+    gtxframe_AddToList(ovwFrame, ovw_cmd_o);
+    gator_light_set(ovw_cmd_o, HIGHLIGHT);
 
     /* create the program name object */
 
@@ -1089,8 +1088,8 @@ create_ovwFrame_objects(void)
        sprintf(errMsg, "[ %s ] Failed to create programName onode\n", rn);
        afsmon_Exit(255);
     }
-    code = gtxframe_AddToList(ovwFrame, ovw_progName_o);
-    code = gator_light_set(ovw_progName_o, HIGHLIGHT);
+    gtxframe_AddToList(ovwFrame, ovw_progName_o);
+    gator_light_set(ovw_progName_o, HIGHLIGHT);
 
     /* create the page number object */
 
@@ -1101,8 +1100,8 @@ create_ovwFrame_objects(void)
        sprintf(errMsg, "[ %s ] Failed to create pageNumber onode\n", rn);
        afsmon_Exit(260);
     }
-    code = gtxframe_AddToList(ovwFrame, ovw_pageNum_o);
-    code = gator_light_set(ovw_pageNum_o, HIGHLIGHT);
+    gtxframe_AddToList(ovwFrame, ovw_pageNum_o);
+    gator_light_set(ovw_pageNum_o, HIGHLIGHT);
 
     /* create the probe number object */
     ovw_probeNum_o =
@@ -1112,8 +1111,8 @@ create_ovwFrame_objects(void)
        sprintf(errMsg, "[ %s ] Failed to create probe number onode\n", rn);
        afsmon_Exit(270);
     }
-    code = gtxframe_AddToList(ovwFrame, ovw_probeNum_o);
-    code = gator_light_set(ovw_probeNum_o, HIGHLIGHT);
+    gtxframe_AddToList(ovwFrame, ovw_probeNum_o);
+    gator_light_set(ovw_probeNum_o, HIGHLIGHT);
 
     /* create the numFS monitored object */
     ovw_numFS_o = initLightObject("", 0, 2, FC_NUMHOSTS_O_WIDTH, afsmon_win);
@@ -1121,7 +1120,7 @@ create_ovwFrame_objects(void)
        sprintf(errMsg, "[ %s ] Failed to create numFS onode\n", rn);
        afsmon_Exit(275);
     }
-    code = gtxframe_AddToList(ovwFrame, ovw_numFS_o);
+    gtxframe_AddToList(ovwFrame, ovw_numFS_o);
 
     /* create the numCM monitored object */
     ovw_numCM_o =
@@ -1130,7 +1129,7 @@ create_ovwFrame_objects(void)
        sprintf(errMsg, "[ %s ] Failed to create numCM_o onode\n", rn);
        afsmon_Exit(280);
     }
-    code = gtxframe_AddToList(ovwFrame, ovw_numCM_o);
+    gtxframe_AddToList(ovwFrame, ovw_numCM_o);
 
     /* create the number-of-FS-alerts object */
     ovw_FSalerts_o =
@@ -1139,7 +1138,7 @@ create_ovwFrame_objects(void)
        sprintf(errMsg, "[ %s ] Failed to create FSalerts_o onode\n", rn);
        afsmon_Exit(285);
     }
-    code = gtxframe_AddToList(ovwFrame, ovw_FSalerts_o);
+    gtxframe_AddToList(ovwFrame, ovw_FSalerts_o);
 
     /* create the number-of-CM-alerts object */
     ovw_CMalerts_o =
@@ -1148,7 +1147,7 @@ create_ovwFrame_objects(void)
        sprintf(errMsg, "[ %s ] Failed to create CMalerts_o onode\n", rn);
        afsmon_Exit(290);
     }
-    code = gtxframe_AddToList(ovwFrame, ovw_CMalerts_o);
+    gtxframe_AddToList(ovwFrame, ovw_CMalerts_o);
 
     /* create file-server-name and cache-manager-names objects */
     ovw_numHosts_perPage = maxY - OVW_NUM_FIXED_LINES;
@@ -1180,7 +1179,7 @@ create_ovwFrame_objects(void)
         * fflush(debugFD);
         * }
         */
-       code = gtxframe_AddToList(ovwFrame, *ovw_fsNames_o_Ptr);
+       gtxframe_AddToList(ovwFrame, *ovw_fsNames_o_Ptr);
        ovw_fsNames_o_Ptr++;
 
     }
@@ -1206,7 +1205,7 @@ create_ovwFrame_objects(void)
            sprintf(errMsg, "[ %s ] Failed to create a CM name onode\n", rn);
            afsmon_Exit(310);
        }
-       code = gtxframe_AddToList(ovwFrame, *ovw_cmNames_o_Ptr);
+       gtxframe_AddToList(ovwFrame, *ovw_cmNames_o_Ptr);
        ovw_cmNames_o_Ptr++;
     }
 
@@ -2080,7 +2079,6 @@ create_FSframe_objects(void)
     struct onode **fsLabels_o_Ptr;
     int x_pos;
     int y_pos;
-    int code;
     int i;
     int j;
     int numBytes;
@@ -2100,13 +2098,13 @@ create_FSframe_objects(void)
        sprintf(errMsg, "[ %s ] Failed to create fs command onode\n", rn);
        afsmon_Exit(340);
     }
-    code = gtxframe_AddToList(fsFrame, fs_cmd_o);
-    code = gator_light_set(fs_cmd_o, HIGHLIGHT);
+    gtxframe_AddToList(fsFrame, fs_cmd_o);
+    gator_light_set(fs_cmd_o, HIGHLIGHT);
 
     /* we already have the dimensions for the frame - same as the ovw frame */
     /* use the ovw program name object for the fs screen too */
 
-    code = gtxframe_AddToList(fsFrame, ovw_progName_o);
+    gtxframe_AddToList(fsFrame, ovw_progName_o);
 
 
     /* create the page number object */
@@ -2118,8 +2116,8 @@ create_FSframe_objects(void)
        sprintf(errMsg, "[ %s ] Failed to create pageNumber onode\n", rn);
        afsmon_Exit(335);
     }
-    code = gtxframe_AddToList(fsFrame, fs_pageNum_o);
-    code = gator_light_set(fs_pageNum_o, HIGHLIGHT);
+    gtxframe_AddToList(fsFrame, fs_pageNum_o);
+    gator_light_set(fs_pageNum_o, HIGHLIGHT);
 
     /* create the probe number object */
     fs_probeNum_o =
@@ -2130,8 +2128,8 @@ create_FSframe_objects(void)
        sprintf(errMsg, "[ %s ] Failed to create fs probeNum onode\n", rn);
        afsmon_Exit(345);
     }
-    code = gtxframe_AddToList(fsFrame, fs_probeNum_o);
-    code = gator_light_set(fs_probeNum_o, HIGHLIGHT);
+    gtxframe_AddToList(fsFrame, fs_probeNum_o);
+    gator_light_set(fs_probeNum_o, HIGHLIGHT);
 
 
     /* create the numFS monitored object */
@@ -2144,7 +2142,7 @@ create_FSframe_objects(void)
                "[ %s ] Failed to create numFS onode for the fs frame\n", rn);
        afsmon_Exit(350);
     }
-    code = gtxframe_AddToList(fsFrame, fs_numFS_o);
+    gtxframe_AddToList(fsFrame, fs_numFS_o);
 
     /* create the "more columns to left" indicator */
     fs_leftArrows_o =
@@ -2155,7 +2153,7 @@ create_FSframe_objects(void)
                rn);
        afsmon_Exit(355);
     }
-    code = gtxframe_AddToList(fsFrame, fs_leftArrows_o);
+    gtxframe_AddToList(fsFrame, fs_leftArrows_o);
 
     /* create the "more columns to right" indicator */
     fs_rightArrows_o =
@@ -2167,7 +2165,7 @@ create_FSframe_objects(void)
                rn);
        afsmon_Exit(360);
     }
-    code = gtxframe_AddToList(fsFrame, fs_rightArrows_o);
+    gtxframe_AddToList(fsFrame, fs_rightArrows_o);
 
 
 
@@ -2230,7 +2228,7 @@ create_FSframe_objects(void)
            sprintf(errMsg, "[ %s ] Failed to create an FS name onode\n", rn);
            afsmon_Exit(375);
        }
-       code = gtxframe_AddToList(fsFrame, fs_lines_Ptr->host_o);
+       gtxframe_AddToList(fsFrame, fs_lines_Ptr->host_o);
 
        /* if (afsmon_debug) {
         * fprintf(debugFD,"[ %s ] Addr of host_o = %d for line %d\n",
@@ -2261,7 +2259,7 @@ create_FSframe_objects(void)
                            "[ %s ] Failed to create an FS data onode\n", rn);
                    afsmon_Exit(380);
                }
-               code = gtxframe_AddToList(fsFrame, *fs_data_o_Ptr);
+               gtxframe_AddToList(fsFrame, *fs_data_o_Ptr);
 
                fs_data_o_Ptr++;
            }                   /* for each column */
@@ -2300,7 +2298,7 @@ create_FSframe_objects(void)
                        rn);
                afsmon_Exit(390);
            }
-           code = gtxframe_AddToList(fsFrame, *fsLabels_o_Ptr);
+           gtxframe_AddToList(fsFrame, *fsLabels_o_Ptr);
            fsLabels_o_Ptr++;
        }
 
@@ -2861,7 +2859,6 @@ create_CMframe_objects(void)
     struct onode **cmLabels_o_Ptr;
     int x_pos;
     int y_pos;
-    int code;
     int i;
     int j;
     int numBytes;
@@ -2882,14 +2879,14 @@ create_CMframe_objects(void)
        sprintf(errMsg, "[ %s ] Failed to create cm command onode\n", rn);
        afsmon_Exit(420);
     }
-    code = gtxframe_AddToList(cmFrame, cm_cmd_o);
-    code = gator_light_set(cm_cmd_o, HIGHLIGHT);
+    gtxframe_AddToList(cmFrame, cm_cmd_o);
+    gator_light_set(cm_cmd_o, HIGHLIGHT);
 
 
     /* we already have the dimensions for the frame - same as the ovw frame */
     /* use the ovw program name object for the cm screen too */
 
-    code = gtxframe_AddToList(cmFrame, ovw_progName_o);
+    gtxframe_AddToList(cmFrame, ovw_progName_o);
 
 
     /* create the page number object */
@@ -2901,8 +2898,8 @@ create_CMframe_objects(void)
        sprintf(errMsg, "[ %s ] Failed to create pageNumber onode\n", rn);
        afsmon_Exit(415);
     }
-    code = gtxframe_AddToList(cmFrame, cm_pageNum_o);
-    code = gator_light_set(cm_pageNum_o, HIGHLIGHT);
+    gtxframe_AddToList(cmFrame, cm_pageNum_o);
+    gator_light_set(cm_pageNum_o, HIGHLIGHT);
 
     /* create the probe number object */
     cm_probeNum_o =
@@ -2913,8 +2910,8 @@ create_CMframe_objects(void)
        sprintf(errMsg, "[ %s ] Failed to create cm probeNum onode\n", rn);
        afsmon_Exit(425);
     }
-    code = gtxframe_AddToList(cmFrame, cm_probeNum_o);
-    code = gator_light_set(cm_probeNum_o, HIGHLIGHT);
+    gtxframe_AddToList(cmFrame, cm_probeNum_o);
+    gator_light_set(cm_probeNum_o, HIGHLIGHT);
 
 
     /* create the numCM monitored object */
@@ -2927,7 +2924,7 @@ create_CMframe_objects(void)
                "[ %s ] Failed to create numCM onode for the cm frame\n", rn);
        afsmon_Exit(430);
     }
-    code = gtxframe_AddToList(cmFrame, cm_numCM_o);
+    gtxframe_AddToList(cmFrame, cm_numCM_o);
 
     /* create the "more columns to left" indicator */
     cm_leftArrows_o =
@@ -2938,7 +2935,7 @@ create_CMframe_objects(void)
                rn);
        afsmon_Exit(435);
     }
-    code = gtxframe_AddToList(cmFrame, cm_leftArrows_o);
+    gtxframe_AddToList(cmFrame, cm_leftArrows_o);
 
     /* create the "more columns to right" indicator */
     cm_rightArrows_o =
@@ -2950,7 +2947,7 @@ create_CMframe_objects(void)
                rn);
        afsmon_Exit(440);
     }
-    code = gtxframe_AddToList(cmFrame, cm_rightArrows_o);
+    gtxframe_AddToList(cmFrame, cm_rightArrows_o);
 
 
 
@@ -3013,7 +3010,7 @@ create_CMframe_objects(void)
            sprintf(errMsg, "[ %s ] Failed to create an CM name onode\n", rn);
            afsmon_Exit(455);
        }
-       code = gtxframe_AddToList(cmFrame, cm_lines_Ptr->host_o);
+       gtxframe_AddToList(cmFrame, cm_lines_Ptr->host_o);
 
        /* if (afsmon_debug) {
         * fprintf(debugFD,"[ %s ] Addr of host_o = %d for line %d\n",
@@ -3044,7 +3041,7 @@ create_CMframe_objects(void)
                            "[ %s ] Failed to create an CM data onode\n", rn);
                    afsmon_Exit(460);
                }
-               code = gtxframe_AddToList(cmFrame, *cm_data_o_Ptr);
+               gtxframe_AddToList(cmFrame, *cm_data_o_Ptr);
 
                cm_data_o_Ptr++;
            }                   /* for each column */
@@ -3083,7 +3080,7 @@ create_CMframe_objects(void)
                        rn);
                afsmon_Exit(470);
            }
-           code = gtxframe_AddToList(cmFrame, *cmLabels_o_Ptr);
+           gtxframe_AddToList(cmFrame, *cmLabels_o_Ptr);
            cmLabels_o_Ptr++;
        }
 
index b5f1c466ea848fb475f019afbfbd95a6b1aff64a..f7992d64cce2eceecc0872c94ff1a63374da93b0 100644 (file)
@@ -1417,7 +1417,6 @@ process_config_file(char *a_config_filename)
     char *handlerPtr;          /* ptr to pass theresh handler string */
     int code = 0;              /* error code */
     int linenum = 0;           /* config file line number */
-    int threshCount;           /* count of thresholds for each server */
     int error_in_config;       /* syntax errors in config file  ?? */
     int i;
     int numBytes;
@@ -1453,7 +1452,6 @@ process_config_file(char *a_config_filename)
 
     numFS = 0;
     numCM = 0;
-    threshCount = 0;
     error_in_config = 0;       /* flag to note if config file has syntax errors */
 
     while ((fgets(line, CFG_STR_LEN, configFD)) != NULL) {
@@ -2044,7 +2042,6 @@ execute_thresh_handler(char *a_handler,           /* ptr to handler function + args */
     char fileName[256];                /* file name to execute */
     int i;
     char *ch;
-    int code;
     int argNum;
     int anotherArg;            /* boolean used to flag if another arg is available */
 
@@ -2109,7 +2106,7 @@ execute_thresh_handler(char *a_handler,           /* ptr to handler function + args */
 
     if (fork() == 0) {
        exec_fsThreshHandler = 1;
-       code = afsmon_Exit(60);
+       afsmon_Exit(60);
     }
 
     return (0);
index 6f3e2c36d1b3262ec66c88121f83dc6d6709d4ab..54ebf92b675da11bbeed5dcc87bd4c1d195c5f7c 100644 (file)
@@ -775,7 +775,7 @@ int
 hdl_notifier(struct bnode_proc *tp)
 {
 #ifndef AFS_NT40_ENV           /* NT notifier callout not yet implemented */
-    int code, pid;
+    int pid;
     struct stat tstat;
 
     if (stat(tp->bnode->notifier, &tstat)) {
@@ -786,16 +786,15 @@ hdl_notifier(struct bnode_proc *tp)
     if ((pid = fork()) == 0) {
        FILE *fout;
        struct bnode *tb = tp->bnode;
-       int ec;
 
 #if defined(AFS_HPUX_ENV) || defined(AFS_SUN5_ENV) || defined(AFS_SGI51_ENV)
-       ec = setsid();
+       setsid();
 #elif defined(AFS_DARWIN90_ENV)
-       ec = setpgid(0, 0);
+       setpgid(0, 0);
 #elif defined(AFS_LINUX20_ENV) || defined(AFS_AIX_ENV)
-       ec = setpgrp();
+       setpgrp();
 #else
-       ec = setpgrp(0, 0);
+       setpgrp(0, 0);
 #endif
        fout = popen(tb->notifier, "w");
        if (fout == NULL) {
@@ -804,7 +803,7 @@ hdl_notifier(struct bnode_proc *tp)
            perror(tb->notifier);
            exit(1);
        }
-       code = SendNotifierData(fileno(fout), tp);
+       SendNotifierData(fileno(fout), tp);
        pclose(fout);
        exit(0);
     } else if (pid < 0) {
index 047cec8fb037de7d537320dd50fa11d4183f8d20..a184511ede12c6d8ac51dcc1e70ae1f05b035d75 100644 (file)
@@ -447,13 +447,11 @@ bc_ParseVolumeSet(void)
 
     udbClientTextP ctPtr;
     FILE *stream;
-    struct bc_config *configPtr;
 
     extern struct bc_config *bc_globalConfig;
 
     ctPtr = &bc_globalConfig->configText[TB_VOLUMESET];
     stream = ctPtr->textStream;
-    configPtr = bc_globalConfig;
 
     /*
      * Open up the volume set configuration file, fail if it can't be done.
@@ -601,13 +599,11 @@ bc_SaveVolumeSet(void)
 
     udbClientTextP ctPtr;
     FILE *stream;
-    struct bc_config *configPtr;
 
     extern struct bc_config *bc_globalConfig;
 
     ctPtr = &bc_globalConfig->configText[TB_VOLUMESET];
     stream = ctPtr->textStream;
-    configPtr = bc_globalConfig;
 
     /* must be locked */
     if (ctPtr->lockHandle == 0)
index 6a359a7d8952c4d80d09937882d2837da683959b..fdb3da59827c2355a98f1f8c548a52b664b4035d 100644 (file)
 #include <lock.h>
 #include "budb.h"
 
+#if !defined(offsetof)
+#include <stddef.h>             /* for definition of offsetof() */
+#endif
+
 typedef afs_uint32 dbadr;
 
 struct hashTable {
@@ -289,7 +293,7 @@ struct memoryDB {           /* in core copies of database structures */
 extern struct memoryDB db;
 
 #define set_header_word(ut,field,value) \
-    dbwrite ((ut), ((char *)&(db.h.field) - (char *)&db.h), \
+    dbwrite ((ut), (offsetof(struct dbHeader, field)), \
             ((db.h.field = (value)), (char *)&(db.h.field)), \
             sizeof(afs_int32))
 
index d8569148148990af9e50a22f8f0b22e5a8124f98..c6654f3fff0d2f216d7dbc90a4dfe8ceeb8b5880 100644 (file)
@@ -55,17 +55,13 @@ des_key_sched(des_cblock k, des_key_schedule schedule)
 {
     /* better pass 8 bytes, length not checked here */
 
-    int i, j, n;       /* i = r10, j = r9, n = r8 */
+    int i, j;
     unsigned int temp; /*  r7 */
     char *p_char;      /* r6 */
     key k_char;
     i = 8;
-    n = 0;
     p_char = k_char;
 
-#ifdef lint
-    n = n;                     /* fool it in case of VAXASM */
-#endif
 #ifdef DEBUG
     if (des_debug)
        fprintf(stderr, "\n\ninput key, left to right = ");
index 2831a12a4de2f55224d5970935dd1a90abd9c478..0d577714eccd2547926cd5a751e9688c61acd64c 100644 (file)
@@ -352,12 +352,10 @@ CheckTicketAnswer(ka_BBS * oanswer, afs_int32 challenge,
                  afs_int32 * pwexpires)
 {
     struct ka_ticketAnswer *answer;
-    afs_uint32 cksum;
     unsigned char tempc;
 
     answer = (struct ka_ticketAnswer *)oanswer->SeqBody;
 
-    cksum = ntohl(answer->cksum);
     if (challenge != ntohl(answer->challenge))
        return KABADPROTOCOL;
     memcpy(&token->sessionKey, &answer->sessionKey,
index b204225da34f08acc49eafbbd87415e18b715df1..0a9fe9ca998732fd737fecc57015cf5059150495 100644 (file)
 #include "kautils.h"
 #include "kaserver.h"
 
+#if !defined(offsetof)
+#include <stddef.h>             /* for definition of offsetof() */
+#endif
+
 extern Date cheaderReadTime;   /* time cheader last read in */
 
-#define set_header_word(tt,field,value) kawrite ((tt), ((char *)&(cheader.field) - (char *)&cheader), ((cheader.field = (value)), (char *)&(cheader.field)), sizeof(afs_int32))
+#define set_header_word(tt,field,value) kawrite ((tt), (offsetof(struct kaheader, field)), ((cheader.field = (value)), (char *)&(cheader.field)), sizeof(afs_int32))
 
-#define inc_header_word(tt,field) kawrite ((tt), ((char *)&(cheader.field) - (char *)&cheader), ((cheader.field = (htonl(ntohl(cheader.field)+1))), (char *)&(cheader.field)), sizeof(afs_int32))
+#define inc_header_word(tt,field) kawrite ((tt), (offsetof(struct kaheader, field)), ((cheader.field = (htonl(ntohl(cheader.field)+1))), (char *)&(cheader.field)), sizeof(afs_int32))
 
 static int index_OK(afs_int32);
 
@@ -411,7 +415,11 @@ ka_NewKey(struct ubik_trans *tt, afs_int32 tentryaddr,
     Date now = time(0);
     afs_int32 newkeyver;       /* new key version number */
     afs_int32 newtotalkeyentries = 0, oldtotalkeyentries = 0, keyentries;
-    int foundcurrentkey = 0, addednewkey = 0, modified;
+    int addednewkey = 0, modified;
+#ifdef AUTH_DBM_LOG
+    int foundcurrentkey = 0;
+#endif
+
 
     es_Report("Newkey for %s.%s\n", tentry->userID.name,
              tentry->userID.instance);
@@ -460,8 +468,8 @@ ka_NewKey(struct ubik_trans *tt, afs_int32 tentryaddr,
                            ("Warning: Entry %s.%s contains more than one valid key: fixing\n",
                             tentry->userID.name, tentry->userID.instance));
                }
-#endif
                foundcurrentkey = 1;
+#endif
            }
 
            /* If we find an oldkey of the same version or
index d004028a5b02cc4337df649aeb47410e3016e7fa..1d755274d503d0b1073809fc130ea47dac2fba17 100644 (file)
@@ -51,11 +51,8 @@ static FILE *childin, *childout;     /* file pointers on pipe to kpwvalid */
 static int
 simplify_name(char *orig_name, char *true_name)
 {
-    int thru_symlink;
     struct stat statbuff;
 
-    thru_symlink = 0;
-
 #ifdef AFS_NT40_ENV
     if (stat(orig_name, &statbuff) < 0) {
        *true_name = '\0';
@@ -80,7 +77,6 @@ simplify_name(char *orig_name, char *true_name)
         * the contents of the link for the file name.
         */
        if ((statbuff.st_mode & S_IFMT) == S_IFLNK) {
-           thru_symlink = 1;
            link_chars_read = readlink(orig_name, true_name, 1024);
            if (link_chars_read <= 0) {
                *true_name = '\0';
index c40640a706b9cc46df3ab59528066f77356f5d1c..d81cbefe99065c9ce1d92f207a35cb806744e1fb 100644 (file)
@@ -218,7 +218,6 @@ CommandProc(struct cmd_syndesc *as, void *arock)
     struct passwd pwent;
     struct passwd *pw = &pwent;
 
-    int insist;                        /* insist on good password quality */
     int lexplicit = 0;         /* servers specified explicitly */
     int local;                 /* explicit cell is same a local cell */
     int foundPassword = 0;     /*Not yet, anyway */
@@ -410,7 +409,6 @@ CommandProc(struct cmd_syndesc *as, void *arock)
     give_to_child(passwd);
 
     /* Get new password if it wasn't provided. */
-    insist = 0;
     if (!foundNewPassword) {
        if (Pipe)
            getpipepass(npasswd, sizeof(npasswd));
index d4381b4719efbee8d4e5920e66fab790495a4e89..7d7a2022dcfdec76e6259bd863fd18108dc05129 100644 (file)
@@ -421,7 +421,6 @@ DoPtsUserModify(struct cmd_syndesc *as, void *arock)
     afs_status_t st = 0;
     const char *user = as->parms[USER].items->data;
     pts_UserUpdateEntry_t entry;
-    int have_quota = 0;
     int have_list_status_perm = 0;
     int have_list_groups_owned_perm = 0;
     int have_list_membership_perm = 0;
@@ -432,7 +431,6 @@ DoPtsUserModify(struct cmd_syndesc *as, void *arock)
        entry.groupCreationQuota =
            GetIntFromString(as->parms[GROUPQUOTA].items->data, "bad quota");
        entry.flag = PTS_USER_UPDATE_GROUP_CREATE_QUOTA;
-       have_quota = 1;
     }
 
     if (as->parms[LISTSTATUS].items) {
index f313f41195993c59e45ed2a2dff0ac9d4185ad3b..f314e018e362bcc60e705266f9c12252a6a55034 100644 (file)
@@ -398,8 +398,7 @@ UV_MoveVolume(afs_cell_handle_p cellHandle, afs_uint32 afromvol,
     struct destServer destination;
 
     struct nvldbentry entry;
-    int islocked, pntg;
-    afs_int32 error;
+    int islocked;
     int same;
     afs_int32 store_flags;
 
@@ -414,9 +413,7 @@ UV_MoveVolume(afs_cell_handle_p cellHandle, afs_uint32 afromvol,
     fromtid = 0;
     totid = 0;
     clonetid = 0;
-    error = 0;
     volid = 0;
-    pntg = 0;
     backupId = 0;
     newVol = 0;
 
@@ -464,7 +461,6 @@ UV_MoveVolume(afs_cell_handle_p cellHandle, afs_uint32 afromvol,
         */
        fromconn = UV_Bind(cellHandle, afromserver, AFSCONF_VOLUMEPORT);
        fromtid = 0;
-       pntg = 1;
 
        tst =
            AFSVolTransCreate(fromconn, afromvol, afrompart, ITOffline,
@@ -519,7 +515,6 @@ UV_MoveVolume(afs_cell_handle_p cellHandle, afs_uint32 afromvol,
        }
 
        fromtid = 0;
-       error = 0;
        goto fail_UV_MoveVolume;
     }
 
@@ -538,7 +533,6 @@ UV_MoveVolume(afs_cell_handle_p cellHandle, afs_uint32 afromvol,
        }
     }
 
-    pntg = 1;
     toconn = UV_Bind(cellHandle, atoserver, AFSCONF_VOLUMEPORT);       /* get connections to the servers */
     fromconn = UV_Bind(cellHandle, afromserver, AFSCONF_VOLUMEPORT);
     fromtid = totid = 0;       /* initialize to uncreated */
@@ -2099,11 +2093,9 @@ UV_DumpVolume(afs_cell_handle_p cellHandle, afs_uint32 afromvol,
     afs_int32 rcode;
 
     struct nvldbentry entry;
-    afs_int32 error;
     int islocked;
 
     islocked = 0;
-    error = 0;
     rxError = 0;
     fromcall = (struct rx_call *)0;
     fromconn = (struct rx_connection *)0;
@@ -2300,7 +2292,6 @@ UV_RestoreVolume(afs_cell_handle_p cellHandle, afs_int32 toserver,
     afs_int32 temptid;
     int success;
     struct nvldbentry entry;
-    afs_int32 error;
     int islocked;
     struct restoreCookie cookie;
     int reuseID;
@@ -2311,7 +2302,6 @@ UV_RestoreVolume(afs_cell_handle_p cellHandle, afs_int32 toserver,
     memset(&cookie, 0, sizeof(cookie));
     islocked = 0;
     success = 0;
-    error = 0;
     reuseID = 1;
     tocall = (struct rx_call *)0;
     toconn = (struct rx_connection *)0;
@@ -3519,7 +3509,6 @@ CheckVldb(afs_cell_handle_p cellHandle, struct nvldbentry *entry,
     int islocked = 0;
     int pass = 0;
     afs_int32 modentry = 0;
-    afs_int32 delentry = 0;
 
     if (modified) {
        *modified = 0;
@@ -3583,7 +3572,6 @@ CheckVldb(afs_cell_handle_p cellHandle, struct nvldbentry *entry,
            if (tst) {
                goto fail_CheckVldb;
            }
-           delentry = 1;
        } else {
            /* Replace old entry with our new one */
            if (!VLDB_ReplaceEntry
@@ -3626,7 +3614,6 @@ UV_SyncServer(afs_cell_handle_p cellHandle, struct rx_connection *server,
 {
     int rc = 0;
     afs_status_t tst = 0;
-    afs_int32 code, vcode;
     int noError;
     afs_int32 nentries, tentries = 0;
     struct VldbListByAttributes attributes;
@@ -3637,8 +3624,6 @@ UV_SyncServer(afs_cell_handle_p cellHandle, struct rx_connection *server,
     afs_int32 si, nsi;
     afs_int32 modified = 0;
 
-    code = 0;
-    vcode = 0;
     noError = 1;
     arrayEntries.nbulkentries_val = 0;
 
@@ -3701,14 +3686,13 @@ UV_RenameVolume(afs_cell_handle_p cellHandle, struct nvldbentry *entry,
     int rc = 0;
     afs_status_t tst = 0;
     afs_status_t etst = 0;
-    afs_int32 rcode, error;
+    afs_int32 rcode;
     int i, index;
     char nameBuffer[256];
     afs_int32 tid;
     struct rx_connection *aconn;
     int islocked;
 
-    error = 0;
     aconn = (struct rx_connection *)0;
     tid = 0;
     islocked = 0;
@@ -4065,12 +4049,10 @@ int
 UV_VolumeZap(afs_cell_handle_p cellHandle, struct rx_connection *server,
             unsigned int partition, afs_uint32 volumeId, afs_status_p st)
 {
-    afs_int32 rcode, ttid, error, code;
+    afs_int32 rcode, ttid;
     int rc = 0;
     afs_status_t tst = 0;
 
-    code = 0;
-    error = 0;
     ttid = 0;
 
     tst = AFSVolTransCreate(server, volumeId, partition, ITOffline, &ttid);
index e99863902bd1298c0e62b3140cdca85163124831..0e76765339ab03616827ea4dae9c7b0a1472984d 100644 (file)
@@ -536,17 +536,13 @@ WalkNextChain(char map[],         /* one byte per db entry */
            if (id == PRBADID)
                continue;
            else if (id) {
-               int eid_s, id_s;
+               int id_s;
                sgcount++;
                /* in case the ids are large, convert to pure sign. */
                if (id > 0)
                    id_s = 1;
                else
                    id_s = -1;
-               if (eid > 0)
-                   eid_s = 1;
-               else
-                   eid_s = -1;
                if (id_s > 0) {
                    fprintf(stderr,
                            "User can't be member of supergroup list\n");
index a88a069a97e36c35f8fc07f2dfbdf1469742a8d5..a19ca5489c5578a821eb256090ca8c840d7f217f 100644 (file)
@@ -1658,11 +1658,6 @@ ss_ProcTail_setup(definition * defp, int somefrees)
     for (plist = defp->pc.plists; plist; plist = plist->next) {
        if (plist->component_kind == DEF_PARAM
            && (plist->pl.param_flag & FREETHIS_PARAM)) {
-           char *dot = "", *extens = "";
-           if (plist->pl.string_name) {
-               dot = ".";
-               extens = plist->pl.string_name;
-           }
            f_print(fout, "\tif (!%s) goto fail1;\n", plist->scode);
        }
     }
index fe8ab6b195c402fc645887212aba71d499a3d2c0..eb576fbb60b3346bd111beb88514f0aaea87eece 100644 (file)
@@ -14,9 +14,8 @@ encode_krb5int32(unsigned char *p, size_t len, const krb5int32 * data, size_t *
 {
     size_t ret = 0;
     size_t l;
-    int i, e;
+    int e;
 
-    i = 0;
     e = der_put_integer(p, len, data, &l);
     if (e)
        return e;
@@ -117,9 +116,8 @@ encode_Ticket(unsigned char *p, size_t len, const Ticket * data, size_t * size)
 {
     size_t ret = 0;
     size_t l;
-    int i, e;
+    int e;
 
-    i = 0;
 /* enc-part */
     {
        size_t Top_tag_tag_oldret = ret;
@@ -460,9 +458,8 @@ encode_AuthorizationDataElement(unsigned char *p, size_t len, const Authorizatio
 {
     size_t ret = 0;
     size_t l;
-    int i, e;
+    int e;
 
-    i = 0;
 /* ad-data */
     {
        size_t Top_tag_oldret = ret;
@@ -691,9 +688,8 @@ encode_EncryptedData(unsigned char *p, size_t len, const EncryptedData * data, s
 {
     size_t ret = 0;
     size_t l;
-    int i, e;
+    int e;
 
-    i = 0;
 /* cipher */
     {
        size_t Top_tag_oldret = ret;
@@ -1463,9 +1459,8 @@ encode_HostAddress(unsigned char *p, size_t len, const HostAddress * data, size_
 {
     size_t ret = 0;
     size_t l;
-    int i, e;
+    int e;
 
-    i = 0;
 /* address */
     {
        size_t Top_tag_oldret = ret;
@@ -1890,9 +1885,8 @@ encode_EncTicketPart(unsigned char *p, size_t len, const EncTicketPart * data, s
 {
     size_t ret = 0;
     size_t l;
-    int i, e;
+    int e;
 
-    i = 0;
 /* authorization-data */
     if ((data)->authorization_data) {
        size_t Top_tag_tag_oldret = ret;
@@ -2692,9 +2686,8 @@ encode_KerberosTime(unsigned char *p, size_t len, const KerberosTime * data, siz
 {
     size_t ret = 0;
     size_t l;
-    int i, e;
+    int e;
 
-    i = 0;
     e = der_put_generalized_time(p, len, data, &l);
     if (e)
        return e;
@@ -2795,9 +2788,8 @@ encode_TransitedEncoding(unsigned char *p, size_t len, const TransitedEncoding *
 {
     size_t ret = 0;
     size_t l;
-    int i, e;
+    int e;
 
-    i = 0;
 /* contents */
     {
        size_t Top_tag_oldret = ret;
@@ -3026,9 +3018,8 @@ encode_EncryptionKey(unsigned char *p, size_t len, const EncryptionKey * data, s
 {
     size_t ret = 0;
     size_t l;
-    int i, e;
+    int e;
 
-    i = 0;
 /* keyvalue */
     {
        size_t Top_tag_oldret = ret;
@@ -3257,9 +3248,8 @@ encode_TicketFlags(unsigned char *p, size_t len, const TicketFlags * data, size_
 {
     size_t ret = 0;
     size_t l;
-    int i, e;
+    int e;
 
-    i = 0;
     {
        unsigned char c = 0;
        if (len < 1)
@@ -3519,9 +3509,8 @@ encode_Realm(unsigned char *p, size_t len, const Realm * data, size_t * size)
 {
     size_t ret = 0;
     size_t l;
-    int i, e;
+    int e;
 
-    i = 0;
     e = der_put_general_string(p, len, data, &l);
     if (e)
        return e;
@@ -3627,9 +3616,8 @@ encode_ENCTYPE(unsigned char *p, size_t len, const ENCTYPE * data, size_t * size
 {
     size_t ret = 0;
     size_t l;
-    int i, e;
+    int e;
 
-    i = 0;
     {
        int enumint = (int) *data;
        e = der_put_integer(p, len, &enumint, &l);
@@ -3741,9 +3729,8 @@ encode_NAME_TYPE(unsigned char *p, size_t len, const NAME_TYPE * data, size_t *
 {
     size_t ret = 0;
     size_t l;
-    int i, e;
+    int e;
 
-    i = 0;
     {
        int enumint = (int) *data;
        e = der_put_integer(p, len, &enumint, &l);
index 9877ae1ce46138cce0e3140d9ff7589bcfeb9c81..2c2b392bff079bcc79093476755a88372e89ce97 100644 (file)
@@ -1031,7 +1031,6 @@ mini_PrintDiskStats(struct mini_line *a_srvline,
 {                              /*mini_PrintDiskStats */
 
     static char rn[] = "mini_PrintDiskStats";  /*Routine name */
-    int code;                  /*Return code */
     char s[128];               /*String buffer */
     struct onode *curr_disklight;      /*Ptr to current disk light */
     struct onode *srvname_light;       /*Ptr to server name light */
@@ -1087,13 +1086,13 @@ mini_PrintDiskStats(struct mini_line *a_srvline,
                        used_disk_idx, diskdata->label);
                fflush(scout_debugfd);
            }
-           code = mini_justify(" ",    /*Src buffer */
+           mini_justify(" ",   /*Src buffer */
                                diskdata->label,        /*Dest buffer */
                                scout_col_width[COL_DISK],      /*Dest's width */
                                SCOUT_RIGHT_JUSTIFY,    /*Right-justify */
                                SCOUT_LEFT_TRUNC,       /*Left-truncate */
                                SCOUT_ISNT_LDISK);      /*Not a labeled disk */
-           code = gator_light_set(curr_disklight, 0);
+           gator_light_set(curr_disklight, 0);
            if (a_fix_line_num) {
                curr_disklight->o_y += a_delta_line_num;
                disk_strparams = (struct gwin_strparams *)(diskdata->llrock);
@@ -1199,14 +1198,14 @@ mini_PrintDiskStats(struct mini_line *a_srvline,
                            rn, s, found_idx, diskdata->label);
                    fflush(scout_debugfd);
                }
-               code = mini_justify(s,  /*Src buffer */
+               mini_justify(s, /*Src buffer */
                                    diskdata->label,    /*Dest buffer */
                                    scout_col_width[COL_DISK],  /*Dest's width */
                                    SCOUT_LEFT_JUSTIFY, /*Left-justify */
                                    SCOUT_LEFT_TRUNC,   /*Left-truncate */
                                    SCOUT_IS_LDISK);    /*Labeled disk */
 
-               code = gator_light_set(sc_disk->disk_lp, pastthreshold);
+               gator_light_set(sc_disk->disk_lp, pastthreshold);
 
            }                   /*Found disk record */
        }
index f0b09ae6320269cc4259e8eee8cb7b845fc00ed4..b17d054823768136bb7805171e57c477f2671a81 100644 (file)
@@ -453,7 +453,7 @@ urecovery_Interact(void *dummy)
     struct ubik_server *bestServer = NULL;
     struct ubik_server *ts;
     int dbok, doingRPC, now;
-    afs_int32 lastProbeTime, lastDBVCheck;
+    afs_int32 lastProbeTime;
     /* if we're the sync site, the best db version we've found yet */
     static struct ubik_version bestDBVersion;
     struct ubik_version tversion;
@@ -466,14 +466,13 @@ urecovery_Interact(void *dummy)
     char hoststr[16];
 #ifndef OLD_URECOVERY
     char pbuffer[1028];
-    int flen, fd = -1;
+    int fd = -1;
     afs_int32 pass;
 #endif
 
     /* otherwise, begin interaction */
     urecovery_state = 0;
     lastProbeTime = 0;
-    lastDBVCheck = 0;
     while (1) {
        /* Run through this loop every 4 seconds */
        tv.tv_sec = 4;
@@ -552,7 +551,6 @@ urecovery_Interact(void *dummy)
                 */
                urecovery_state &= ~UBIK_RECHAVEDB;
            }
-           lastDBVCheck = FT_ApproxTime();
            urecovery_state |= UBIK_RECFOUNDDB;
            urecovery_state &= ~UBIK_RECSENTDB;
        }
@@ -616,7 +614,6 @@ urecovery_Interact(void *dummy)
                goto FetchEndCall;
            }
 #ifndef OLD_URECOVERY
-           flen = length;
            afs_snprintf(pbuffer, sizeof(pbuffer), "%s.DB%s%d.TMP", ubik_dbase->pathName, (file<0)?"SYS":"", (file<0)?-file:file);
            fd = open(pbuffer, O_CREAT | O_RDWR | O_TRUNC, 0600);
            if (fd < 0) {
index 9fa996d358d1fbea1923da3a9c55188c95a90dc8..a669da2ea16ac69b9c2dc951e29ca1c49353ee57 100644 (file)
@@ -487,7 +487,7 @@ SDISK_SendFile(struct rx_call *rxcall, afs_int32 file,
     char hoststr[16];
 #ifndef OLD_URECOVERY
     char pbuffer[1028];
-    int flen, fd = -1;
+    int fd = -1;
     afs_int32 epoch = 0;
     afs_int32 pass;
 #endif
@@ -537,7 +537,6 @@ SDISK_SendFile(struct rx_call *rxcall, afs_int32 file,
     tversion.epoch = 0;                /* start off by labelling in-transit db as invalid */
     (*dbase->setlabel) (dbase, file, &tversion);       /* setlabel does sync */
 #ifndef OLD_URECOVERY
-    flen = length;
     afs_snprintf(pbuffer, sizeof(pbuffer), "%s.DB%s%d.TMP", ubik_dbase->pathName, (file<0)?"SYS":"", (file<0)?-file:file);
     fd = open(pbuffer, O_CREAT | O_RDWR | O_TRUNC, 0600);
     if (fd < 0) {
index a7fc60ff554dc9d63eec47de3f99e95e5d4b0c25..7c44ab9e96d8733e872b978a01e741ca7e5c8e53 100644 (file)
@@ -249,10 +249,8 @@ main(int argc, char *argv[])
          usage:
            Quit("Usage: upserver [<directory>+] [-crypt <directory>+] [-clear <directory>+] [-auth <directory>+] [-rxbind] [-help]\n");
        } else {
-           int dirlen;
            if (nDirs >= sizeof(dirName) / sizeof(dirName[0]))
                Quit("Too many dirs");
-           dirlen = strlen(argv[a]);
            if (AddObject(&dirName[nDirs], argv[a])) {
                printf("%s: Unable to export dir %s. Skipping\n", whoami,
                       argv[a]);
index f5517150c4ab1ba99af6b5701a574f8665fd6b6a..1163fc126c29b914fdb41c1050e49a2fcaeb5f88 100644 (file)
@@ -1792,7 +1792,6 @@ main(int argc, char *argv[])
 {                              /*Main routine */
 
     struct cmd_syndesc *cs;    /*Command line syntax descriptor */
-    afs_int32 code;    /*Return code */
 
 #ifdef AFS_AIX32_ENV
     /*
@@ -1979,7 +1978,7 @@ main(int argc, char *argv[])
     /*
      * Execute the parsed command.
      */
-    code = cmd_Dispatch(argc, argv);
+    cmd_Dispatch(argc, argv);
 #if 0
     if (code) {
        fprintf(stderr, "%s: Call to cmd_Dispatch() failed; code is %d\n",
@@ -1988,7 +1987,7 @@ main(int argc, char *argv[])
     }
 #endif /* 0 */
     if (doUnlog) {
-       code = uss_fs_UnlogToken(uss_Cell);
+       uss_fs_UnlogToken(uss_Cell);
     }
     return 0;
 }                              /*Main routine */
index 9ed9aebe4dff2b65b1c83be3830c7c29d0590084..30a696eaa41c939c5a97604ef3415b095548293f 100644 (file)
@@ -672,7 +672,6 @@ uss_acl_SetDiskQuota(char *a_path, int a_q)
     static char rn[] = "uss_acl_SetDiskQuota";
 #endif
     uss_VolumeStatus_t *status;
-    char *name, *motd, *offmsg;
     char *input;
     char tmp_str[AFS_PIOCTL_MAXSIZE];
 
@@ -683,7 +682,6 @@ uss_acl_SetDiskQuota(char *a_path, int a_q)
 
     status = (uss_VolumeStatus_t *) tmp_str;
     status->MinQuota = status->MaxQuota = -1;
-    name = motd = offmsg = NULL;
     status->MaxQuota = a_q;
 
     input = (char *)status + sizeof(*status);
index 7439028cbe31e5f6148b8e36d1521984466a35a7..5ffa27b5d0ca7009d092227e50dd3dfef2fb6cf0 100644 (file)
@@ -2367,10 +2367,8 @@ CallBackRxConnCmd(struct cmd_syndesc *as, void *arock)
     struct cmd_item *ti;
     afs_int32 hostAddr;
     struct hostent *thp;
-    int setp;
 
     ti = as->parms[0].items;
-    setp = 1;
     if (ti) {
         thp = hostutil_GetHostByName(ti->data);
        if (!thp) {
@@ -2380,7 +2378,6 @@ CallBackRxConnCmd(struct cmd_syndesc *as, void *arock)
        else memcpy(&hostAddr, thp->h_addr, sizeof(afs_int32));
     } else {
         hostAddr = 0;   /* means don't set host */
-       setp = 0;       /* aren't setting host */
     }
 
     /* now do operation */
@@ -2751,7 +2748,7 @@ ExportAfsCmd(struct cmd_syndesc *as, void *arock)
     afs_int32 code;
     struct ViceIoctl blob;
     struct cmd_item *ti;
-    int export = 0, type = 0, mode = 0, exp = 0, exportcall, pwsync =
+    int export = 0, type = 0, mode = 0, exportcall, pwsync =
        0, smounts = 0, clipags = 0, pagcb = 0;
 
     ti = as->parms[0].items;
@@ -2773,7 +2770,6 @@ ExportAfsCmd(struct cmd_syndesc *as, void *arock)
            fprintf(stderr, "Illegal argument %s\n", ti->data);
            return 1;
        }
-       exp = 1;
     }
     if ((ti = as->parms[2].items)) {   /* -noconvert */
        if (strcmp(ti->data, "on") == 0)
@@ -4083,12 +4079,10 @@ FlushMountCmd(struct cmd_syndesc *as, void *arock)
     char *last_component;      /*Last component of true name */
     struct stat statbuff;      /*Buffer for status info */
     int link_chars_read;       /*Num chars read in readlink() */
-    int thru_symlink;          /*Did we get to a mount point via a symlink? */
     int error = 0;
 
     for (ti = as->parms[0].items; ti; ti = ti->next) {
        /* once per file */
-       thru_symlink = 0;
        sprintf(orig_name, "%s%s", (ti->data[0] == '/') ? "" : "./",
                ti->data);
 
@@ -4104,7 +4098,6 @@ FlushMountCmd(struct cmd_syndesc *as, void *arock)
         * the file name with the link name.
         */
        if ((statbuff.st_mode & S_IFMT) == S_IFLNK) {
-           thru_symlink = 1;
            /*
             * Read name of resolved file.
             */
index e09a96820c7ae2bb32995c00d82b0400005a8677..cf0dd0b6509f1809c24c20fc8499f9caef730db3 100644 (file)
@@ -1247,7 +1247,7 @@ RXStore_AccessList(Vnode * targetptr, struct AFSOpaque *AccessList)
 static int
 CopyOnWrite(Vnode * targetptr, Volume * volptr, afs_foff_t off, afs_fsize_t len)
 {
-    Inode ino, nearInode;
+    Inode ino, nearInode AFS_UNUSED;
     ssize_t rdlen;
     ssize_t wrlen;
     afs_fsize_t size;
@@ -1824,7 +1824,7 @@ Alloc_NewVnode(Vnode * parentptr, DirHandle * dir, Volume * volptr,
     Error errorCode = 0;               /* Error code returned back */
     Error temp;
     Inode inode = 0;
-    Inode nearInode;           /* hint for inode allocation in solaris */
+    Inode nearInode AFS_UNUSED;                /* hint for inode allocation in solaris */
     afs_ino_str_t stmp;
 
     if ((errorCode =
@@ -6019,7 +6019,7 @@ SRXAFS_XStatsVersion(struct rx_call * a_call, afs_int32 * a_versionP)
 static void
 FillPerfValues(struct afs_PerfStats *a_perfP)
 {                              /*FillPerfValues */
-    afs_uint32 hi, lo;
+    afs_uint32 hi AFS_UNUSED, lo;
     int dir_Buffers;           /*# buffers in use by dir package */
     int dir_Calls;             /*# read calls in dir package */
     int dir_IOs;               /*# I/O ops in dir package */
index a9ba3789b2dd0143807a5b963cb8108f516d7f08..8678fd59df88c591ac836ab3eb40c0516e587323 100644 (file)
@@ -332,14 +332,16 @@ FSYNC_sync(void * args)
            CallHandler(FSYNC_readfds, nfds, POLLIN|POLLPRI);
 #else
        int maxfd;
+#ifdef AFS_PTHREAD_ENV
        struct timeval s_timeout;
+#endif
        GetHandler(&FSYNC_readfds, &maxfd);
-       s_timeout.tv_sec = SYNC_SELECT_TIMEOUT;
-       s_timeout.tv_usec = 0;
        /* Note: check for >= 1 below is essential since IOMGR_select
         * doesn't have exactly same semantics as select.
         */
 #ifdef AFS_PTHREAD_ENV
+       s_timeout.tv_sec = SYNC_SELECT_TIMEOUT;
+       s_timeout.tv_usec = 0;
        if (select(maxfd + 1, &FSYNC_readfds, NULL, NULL, &s_timeout) >= 1)
 #else /* AFS_PTHREAD_ENV */
        if (IOMGR_Select(maxfd + 1, &FSYNC_readfds, NULL, NULL, NULL) >= 1)
index e21630c9ed235d0319573d25eda25821e20c11ed..21b41988450c86e919b0ed14e7d4ef34cc464dbc 100644 (file)
@@ -2580,7 +2580,6 @@ SalvageIndex(struct SalvInfo *salvinfo, Inode ino, VnodeClass class, int RW,
             struct ViceInodeInfo *ip, int nInodes,
              struct VolumeSummary *volSummary, int check)
 {
-    VolumeId volumeNumber;
     char buf[SIZEOF_LARGEDISKVNODE];
     struct VnodeDiskObject *vnode = (struct VnodeDiskObject *)buf;
     int err = 0;
@@ -2594,7 +2593,6 @@ SalvageIndex(struct SalvInfo *salvinfo, Inode ino, VnodeClass class, int RW,
     IHandle_t *handle;
     FdHandle_t *fdP;
 
-    volumeNumber = volSummary->header.id;
     IH_INIT(handle, salvinfo->fileSysDevice, volSummary->header.parent, ino);
     fdP = IH_OPEN(handle);
     osi_Assert(fdP != NULL);
@@ -3685,7 +3683,7 @@ CreateRootDir(struct SalvInfo *salvinfo, VolumeDiskData *volHeader,
     Inode *ip;
     afs_sfsize_t bytes;
     struct VnodeEssence *vep;
-    Inode readmeinode;
+    Inode readmeinode = 0;
     time_t now = time(NULL);
 
     if (!salvinfo->vnodeInfo[vLarge].vnodes && !salvinfo->vnodeInfo[vSmall].vnodes) {
index fca12561c8c8f82b1b8e53673e26062a400cdab3..e11e6c4d124e3eeb81e56ecc02249ef7cc8bab0c 100644 (file)
@@ -3139,11 +3139,11 @@ attach2(Error * ec, VolId volumeId, char *path, struct DiskPartition64 *partp,
     /* have we read in the header successfully? */
     int read_header = 0;
 
+#ifdef AFS_DEMAND_ATTACH_FS
     /* should we FreeVolume(vp) instead of VCheckFree(vp) in the error
      * cleanup? */
     int forcefree = 0;
 
-#ifdef AFS_DEMAND_ATTACH_FS
     /* in the case of an error, to what state should the volume be
      * transitioned? */
     VolState error_state = VOL_STATE_ERROR;
@@ -3330,10 +3330,10 @@ attach2(Error * ec, VolId volumeId, char *path, struct DiskPartition64 *partp,
        VRequestSalvage_r(ec, vp, SALVSYNC_ERROR, VOL_SALVAGE_NO_OFFLINE);
        VChangeState_r(vp, VOL_STATE_ERROR);
        vp->nUsers = 0;
+       forcefree = 1;
 #endif /* AFS_DEMAND_ATTACH_FS */
        Log("VAttachVolume: volume %s is junk; it should be destroyed at next salvage\n", path);
        *ec = VNOVOL;
-       forcefree = 1;
        goto locked_error;
     }
 
@@ -4470,12 +4470,12 @@ VOffline(Volume * vp, char *message)
 void
 VDetachVolume_r(Error * ec, Volume * vp)
 {
+#ifdef FSSYNC_BUILD_CLIENT
     VolumeId volume;
     struct DiskPartition64 *tpartp;
     int notifyServer = 0;
     int  useDone = FSYNC_VOL_ON;
 
-    *ec = 0;                   /* always "succeeds" */
     if (VCanUseFSSYNC()) {
        notifyServer = vp->needsPutBack;
        if (V_destroyMe(vp) == DESTROY_ME)
@@ -4493,6 +4493,8 @@ VDetachVolume_r(Error * ec, Volume * vp)
 # endif
     tpartp = vp->partition;
     volume = V_id(vp);
+#endif /* FSSYNC_BUILD_CLIENT */
+    *ec = 0;                   /* always "succeeds" */
     DeleteVolumeFromHashTable(vp);
     vp->shuttingDown = 1;
 #ifdef AFS_DEMAND_ATTACH_FS
@@ -8632,7 +8634,7 @@ VVByPListWait_r(struct DiskPartition64 * dp)
 void
 VPrintCacheStats_r(void)
 {
-    afs_uint32 get_hi, get_lo, load_hi, load_lo;
+    afs_uint32 get_hi AFS_UNUSED, get_lo, load_hi AFS_UNUSED, load_lo;
     struct VnodeClassInfo *vcp;
     vcp = &VnodeClassInfo[vLarge];
     Log("Large vnode cache, %d entries, %d allocs, %d gets (%d reads), %d writes\n", vcp->cacheSize, vcp->allocs, vcp->gets, vcp->reads, vcp->writes);
index acda92a319428bfa4eb0d1d6d737b03d077404cb..7b2cd8b23e82780ab229d78c8009dc801f5b46c8 100644 (file)
@@ -136,7 +136,7 @@ VCreateVolume_r(Error * ec, char *partname, VolId volumeId, VolId parentId)
     struct VolumeDiskHeader diskHeader;
     IHandle_t *handle;
     FdHandle_t *fdP;
-    Inode nearInode = 0;
+    Inode nearInode AFS_UNUSED = 0;
     char *part, *name;
     struct stat st;
     afs_ino_str_t stmp;
index caa2c408ca46792a2d65be7e7f364ad3539c8c3a..53aa8b8d07eae85b369078ddf8a8ab848ea90d02 100644 (file)
@@ -1312,7 +1312,7 @@ ReadVnodes(struct iod *iodp, Volume * vp, int incremental,
     struct VnodeClassInfo *vcp;
     IHandle_t *tmpH;
     FdHandle_t *fdP;
-    Inode nearInode;
+    Inode nearInode AFS_UNUSED;
     afs_int32 critical = 0;
 
     tag = iod_getc(iodp);
index f8f198e539c12562ca8d8dd63984998152fd9ba1..86d720edcd48d949c6ac5d2ebc1bea583f1ce1dd 100644 (file)
@@ -147,7 +147,7 @@ ReadDumpHeader(struct DumpHeader *dh)
 {
     int i, done;
     char tag, c;
-    afs_int32 magic;
+    afs_int32 magic AFS_UNUSED;
 
 /*  memset(&dh, 0, sizeof(dh)); */
 
index 7522b9bb3f7a6476f3ad69ad7faeeff4c5a3e64c..d486e24879154147dbf6b397960b012fc259a2f7 100644 (file)
@@ -404,7 +404,7 @@ afs_int32 copyVnodes(struct Msg *m, Volume *vol, Volume *newvol,
                ino = VNDISK_GET_INO(vnode);
                if (ino) {
                    IHandle_t *h, *newh;
-                   Inode nearInode;
+                   Inode nearInode AFS_UNUSED;
 #if defined(NEARINODE_HINT) && !defined(AFS_NAMEI_ENV)
                    V_pref(vol,nearInode)
 #endif
index c18db508af4374f3fdcef7b28386502f65fc1a57..8d1ad7fb6323a6c4531f3d60624d06ed3ed43851 100644 (file)
@@ -342,7 +342,7 @@ ViceCreateRoot(Volume *vp)
     DirHandle dir;
     struct acl_accessList *ACL;
     AFSFid did;
-    Inode inodeNumber, nearInode;
+    Inode inodeNumber, nearInode AFS_UNUSED;
     struct VnodeDiskObject *vnode;
     struct VnodeClassInfo *vcp = &VnodeClassInfo[vLarge];
     IHandle_t *h;
index 3be314e414b839db00f07c39ee0e6c5d655f9375..ba9677b57c23460a80746bc63c512c0da0ea898a 100644 (file)
@@ -279,14 +279,6 @@ PrintOverallPerfInfo(struct afs_PerfStats *a_ovP)
 void
 PrintOpTiming(int a_opIdx, struct fs_stats_opTimingData *a_opTimeP)
 {
-    double fSumTime, avg;
-
-    fSumTime =
-       ((double)(a_opTimeP->sumTime.tv_sec)) +
-       (((double)(a_opTimeP->sumTime.tv_usec)) / ((double)(1000000)));
-/*    printf("Double sum time is %f\n", fSumTime);*/
-    avg = fSumTime / ((double)(a_opTimeP->numSuccesses));
-
     printf
        ("%15s: %u ops (%u OK); sum=%lu.%06lu, sqr=%lu.%06lu, min=%lu.%06lu, max=%lu.%06lu\n",
         opNames[a_opIdx], a_opTimeP->numOps, a_opTimeP->numSuccesses,
@@ -320,14 +312,6 @@ PrintOpTiming(int a_opIdx, struct fs_stats_opTimingData *a_opTimeP)
 void
 PrintXferTiming(int a_opIdx, struct fs_stats_xferData *a_xferP)
 {
-    double fSumTime, avg;
-
-    fSumTime =
-       ((double)(a_xferP->sumTime.tv_sec)) +
-       ((double)(a_xferP->sumTime.tv_usec)) / ((double)(1000000));
-
-    avg = fSumTime / ((double)(a_xferP->numSuccesses));
-
     printf
        ("%s: %u xfers (%u OK), time sum=%lu.%06lu, sqr=%lu.%06lu, min=%lu.%06lu, max=%lu.%06lu\n",
         xferOpNames[a_opIdx], a_xferP->numXfers, a_xferP->numSuccesses,