libadmin: overlap warning in strcpy with gcc9 60/13660/8
authorCheyenne Wills <cwills@sinenomine.net>
Fri, 5 Jul 2019 14:23:10 +0000 (08:23 -0600)
committerBenjamin Kaduk <kaduk@mit.edu>
Fri, 12 Jul 2019 15:49:29 +0000 (11:49 -0400)
commit79dffe29c8a0ec55c4231a18077efdfa7c1edf53
tree0f62185224e02845b082ed4a77d7047df7a0ce1a
parent7c60a0fba11dd24494a5f383df8bea5fdbabbdd7
libadmin: overlap warning in strcpy with gcc9

GCC 9 with --enable-checking produces a new warning/error in
afs_utilAdmin.c associated with a strcpy with the potential of an
overlap.  The index used is signed which triggers the new warning. The
source and target of the strcpy are contained within the same higher
level structure.

Change the variable 'index' from signed to unsigned to resolve the
warning/error. Change the variable 'total' in the same structure to
unsigned to be consistent with it's usage with 'index'.

Change-Id: Icaa99e278a5d8262caeaec0b2723e826a57554aa
Reviewed-on: https://gerrit.openafs.org/13660
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
src/libadmin/adminutil/afs_utilAdmin.c