OpenAFS Master Repository branch, master, updated. openafs-devel-1_9_1-175-g1d1a20c

Gerrit Code Review
Thu, 23 Jun 2022 18:02:22 -0400

The following commit has been merged in the master branch:
commit 1d1a20c33258a9285a16e85a55df9c0fbf4a3ac2
Author: Cheyenne Wills <>
Date:   Tue Jun 21 09:57:40 2022 -0600

    afs: Avoid always-false NULL test on AFSTOV(avc)
    GCC-12 is flagging a comparison with the following diagnostic:
     src/afs/afs_vcache.c:3161:25: error: the comparison will always
        evaluate as ‘false’ for the address of ‘v’ will never be NULL
     3161 |             AFSTOV(avc) == NULL || vType(avc) == VDIR ||
          |                         ^~
    When the vcache structure does not have the vnode embedded the expansion
    of the AFSTOV macro results in:
    which tests contents of a 'v'.
    When the vcache structure does have the vnode embedded, the expansion of
    the macro results in:
    which tests the address of 'v', which will never be NULL in this case.
    Update afs.h to add a new define 'AFS_VCACHE_EMBEDDED_VNODE' when the
    vcache structure contains an embedded vnode structure.  Restructure the
    preprocessor statements for the AFSTOV definition
    Avoid testing AFSTOV(x) against NULL when AFS_VCACHE_EMBEDDED_VNODE is
    The diagnostic is changed from a warning to an error when configured
    with --enable-checking.
    Change-Id: Ib72647fa23e5a7ecd96772b04c6ef76540f44535
    Reviewed-by: Michael Meffie <>
    Tested-by: BuildBot <>
    Reviewed-by: Andrew Deason <>
    Reviewed-by: Benjamin Kaduk <>

 src/afs/afs.h        | 7 ++++---
 src/afs/afs_vcache.c | 5 ++++-
 2 files changed, 8 insertions(+), 4 deletions(-)

OpenAFS Master Repository