OpenAFS Master Repository branch, master, updated. BP-openafs-stable-1_8_x-553-g18a0ea2

Gerrit Code Review gerrit@openafs.org
Fri, 27 Mar 2020 12:14:00 -0400


The following commit has been merged in the master branch:
commit 18a0ea2f31e70e1bdbd7af40022ab107560ac0d0
Author: Andrew Deason <adeason@sinenomine.net>
Date:   Tue Mar 24 11:34:51 2020 -0500

    LINUX: Clear lock 'pid' fields with NULL
    
    Currently, when we release a lock, we set the e.g. pid_writer field to
    0, to clear out any previous pid that was set. On Linux, the
    pid_writer field is a pointer, and sparse(1) complains about using a
    plain integer 0 in this way:
    
          CHECK   [...]/afs_axscache.c
        [...]/afs_axscache.c:24:19: warning: Using plain integer as NULL pointer
        [...]/afs_axscache.c:68:9: warning: Using plain integer as NULL pointer
        [...]/afs_axscache.c:88:5: warning: Using plain integer as NULL pointer
        [...]/afs_axscache.c:111:13: warning: Using plain integer as NULL pointer
        [...]/afs_axscache.c:121:17: warning: Using plain integer as NULL pointer
        [...]/afs_axscache.c:126:17: warning: Using plain integer as NULL pointer
        [...]/afs_axscache.c:154:13: warning: Using plain integer as NULL pointer
        [...]/afs_axscache.c:165:9: warning: Using plain integer as NULL pointer
    
    This doesn't break anything, but it spews out quite a lot of warnings
    when building with sparse(1) available. To just reduce this noise a
    bit, assign these fields to actual NULL.
    
    Since some other platforms do use a plain integer in these fields
    (they are an actual pid), define 'MyPid_NULL' to use '0' or 'NULL'
    depending on the platform. Define MyPid_NULL to NULL only on Linux;
    this causes us to still assign 0 to a pointer on some platforms, but
    Linux is the only one that complains, so only bother using NULL on
    Linux for now.
    
    Change-Id: I35fcb896ceaa346c330622cfc2913b2975295836
    Reviewed-on: https://gerrit.openafs.org/14108
    Tested-by: BuildBot <buildbot@rampaginggeek.com>
    Reviewed-by: Cheyenne Wills <cwills@sinenomine.net>
    Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>

 src/afs/lock.h |   15 ++++++++++-----
 1 files changed, 10 insertions(+), 5 deletions(-)

-- 
OpenAFS Master Repository