The following commit has been merged in the master branch:
commit 4a8d0c4089078fb3df9cc06b595c80c9b4c2ca7f
Author: Michael Meffie <[email protected]>
Date: Mon Aug 23 15:42:52 2021 -0400
libadmin: Fix isAlias may be uninitialized warning
The cfgutil_HostNameIsAlias() function has an output parameter called
isAlias, which is used when cfgutil_HostIsAlias() returns non-zero.
However, it possible for isAlias to not be set before returning. GCC 12
issues a warning about the possible use of the uninitialized isAlias
variable:
cfginternal.c:366:32: error: ‘isAlias’ may be used uninitialized
[-Werror=maybe-uninitialized]
Initialize the cfgutil_HostNameIsAlias() isAlias output flag to false.
Also, fix the misleading code indentation around the
cfgutil_HostNameIsAlias() call.
Change-Id: I68e66ae5f9019a613187321bb792d0505959ed30
Reviewed-on: https://gerrit.openafs.org/14772
Reviewed-by: Cheyenne Wills <[email protected]>
Tested-by: BuildBot <[email protected]>
Reviewed-by: Benjamin Kaduk <[email protected]>
src/libadmin/cfg/cfginternal.c | 20 ++++++++++----------
1 file changed, 10 insertions(+), 10 deletions(-)
--
OpenAFS Master Repository
_______________________________________________
OpenAFS-cvs mailing list
[email protected]
https://lists.openafs.org/mailman/listinfo/openafs-cvs