clang-13: remove unused variables flagged by clang 75/14775/4
authorCheyenne Wills <cwills@sinenomine.net>
Fri, 27 Aug 2021 14:20:42 +0000 (08:20 -0600)
committerBenjamin Kaduk <kaduk@mit.edu>
Wed, 1 Sep 2021 23:58:13 +0000 (19:58 -0400)
commit8333e8e6020331013af912acb92a308e4f5a1dd2
tree627811accd341f1450ced334f15a0ac88c65b097
parentd91b92e308dc2ac2e489581839c1fc1bf9147e16
clang-13: remove unused variables flagged by clang

Clang-13 changed the default for the unused-but-set-variable resulting
in build warnings/errors with the following type of messages

vsprocs.c:3493:25: error: variable 'tentries' set but not used
    [-Werror,-Wunused-but-set-variable]
       afs_int32 nentries, tentries = 0;

The locations where these local variables are being flagged show that
while the variables are being updated, they are actually never used for
anything (e.g. used as part of an assignment to another variable, passed
as a parameter, used for as returned value, etc.)

Remove the variables being flagged by the clang-13 compiler.

Removal of these variables will not alter the overall functionality of
the code.

Change-Id: I521ea1323837e0d293e6f45eb8c15d5e05765f19
Reviewed-on: https://gerrit.openafs.org/14775
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
src/afs/VNOPS/afs_vnop_read.c
src/afs/VNOPS/afs_vnop_write.c
src/libadmin/vos/vsprocs.c
src/ubik/disk.c
src/ubik/remote.c