The following commit has been merged in the master branch: commit b1d48cbf9187a454d971cd4e9a87295f4edf2647 Author: Michael Meffie <mmef...@sinenomine.net> Date: Thu Apr 10 11:53:42 2025 -0400
volser: Avoid uninitialized 'code' in CheckVolume The CheckVolume() function can potentially use the 'code' variable before it is initialized if the volume being checked has an invalid or unknown volume type. This has been the case since commit 663be53c18 (volser: Split CheckVolume into RW/RO/BK functions); before that commit, an invalid volume type would cause us to skip most of our volumes checks in CheckVolume(). Add a check to return EINVAL and print an error message to avoid this case. This fixes the following compiler warning seen on GCC 4.4.7: vsprocs.c: In function 'CheckVolume': vsprocs.c:5859: error: 'code' may be used uninitialized in this function [-Wuninitialized] Change-Id: Ia0280d0fcac829b1ecd785de98e2405281d5caf9 Reviewed-on: https://gerrit.openafs.org/16364 Tested-by: BuildBot <build...@rampaginggeek.com> Reviewed-by: Cheyenne Wills <cwi...@sinenomine.net> Reviewed-by: Michael Meffie <mmef...@sinenomine.net> Reviewed-by: Andrew Deason <adea...@sinenomine.net> src/volser/vsprocs.c | 5 +++++ 1 file changed, 5 insertions(+) -- OpenAFS Master Repository _______________________________________________ OpenAFS-cvs mailing list OpenAFS-cvs@openafs.org https://lists.openafs.org/mailman/listinfo/openafs-cvs