]> git.michaelhowe.org Git - packages/o/openafs.git/commit
libadmin: overlap warning in strcpy with gcc9
authorCheyenne Wills <cwills@sinenomine.net>
Fri, 5 Jul 2019 14:23:10 +0000 (08:23 -0600)
committerStephan Wiesand <stephan.wiesand@desy.de>
Fri, 9 Aug 2019 14:59:29 +0000 (10:59 -0400)
commita6ee134f7f5da47022145bdb4a8bceff08414465
treeff41b60007f4bd9c5092a07a4724a3ce6a97e1cc
parent033b66b0d688dd12f929475a0686149df63f8a70
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'.

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>
(cherry picked from commit 79dffe29c8a0ec55c4231a18077efdfa7c1edf53)

Change-Id: I19a192ecea86314851e6889274eb030c5caff8cb
Reviewed-on: https://gerrit.openafs.org/13724
Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
src/libadmin/adminutil/afs_utilAdmin.c