OpenAFS Master Repository branch, master, updated. openafs-devel-1_9_2-217-gb1d48cb

Gerrit Code Review gerrit@openafs.org
Mon, 21 Apr 2025 11:25:41 -0400


The following commit has been merged in the master branch:
commit b1d48cbf9187a454d971cd4e9a87295f4edf2647
Author: Michael Meffie <mmeffie@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 <buildbot@rampaginggeek.com>
    Reviewed-by: Cheyenne Wills <cwills@sinenomine.net>
    Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
    Reviewed-by: Andrew Deason <adeason@sinenomine.net>

 src/volser/vsprocs.c | 5 +++++
 1 file changed, 5 insertions(+)

-- 
OpenAFS Master Repository