From d6b1573995120cc8167bb87032274e04bd918880 Mon Sep 17 00:00:00 2001 From: Simon Wilkinson Date: Wed, 13 Jul 2011 14:00:30 +0100 Subject: [PATCH] libadmin: Remove unused error codes A number of functions in the libadmin vos implementation set up error values, and assign them to 0, but never actually use them for anything (either further assignment, or returning to the user) So, just remove these unecessary variables, and make gcc 4.6.0 a little happier. Change-Id: Ia4a4a7d8cda855d904f2a84092928f227ea83f3b Reviewed-on: http://gerrit.openafs.org/4994 Tested-by: BuildBot Reviewed-by: Derrick Brashear --- src/libadmin/vos/vsprocs.c | 17 ++--------------- 1 file changed, 2 insertions(+), 15 deletions(-) diff --git a/src/libadmin/vos/vsprocs.c b/src/libadmin/vos/vsprocs.c index 5a857f0ca..0e5d24733 100644 --- a/src/libadmin/vos/vsprocs.c +++ b/src/libadmin/vos/vsprocs.c @@ -394,7 +394,6 @@ UV_MoveVolume(afs_cell_handle_p cellHandle, afs_uint32 afromvol, struct nvldbentry entry; int islocked; - afs_int32 error; int same; afs_int32 store_flags; @@ -409,7 +408,6 @@ UV_MoveVolume(afs_cell_handle_p cellHandle, afs_uint32 afromvol, fromtid = 0; totid = 0; clonetid = 0; - error = 0; volid = 0; backupId = 0; newVol = 0; @@ -512,7 +510,6 @@ UV_MoveVolume(afs_cell_handle_p cellHandle, afs_uint32 afromvol, } fromtid = 0; - error = 0; goto fail_UV_MoveVolume; } @@ -2091,11 +2088,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; @@ -2292,7 +2287,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; @@ -2303,7 +2297,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; @@ -3616,7 +3609,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; @@ -3627,8 +3619,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; @@ -3691,14 +3681,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; @@ -4055,12 +4044,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); -- 2.39.5