OpenAFS Master Repository branch, openafs-stable-1_8_x, updated. openafs-stable-1_8_8_1-29-g7bead34

Gerrit Code Review gerrit@openafs.org
Thu, 4 Aug 2022 12:33:42 -0400


The following commit has been merged in the openafs-stable-1_8_x branch:
commit 7bead34f357ec10f287062206f4056dbfe8adfdb
Author: Cheyenne Wills <cwills@sinenomine.net>
Date:   Thu Jun 2 11:18:59 2022 -0600

    clang-10: use AFS_FALLTHROUGH for case fallthrough
    
    Clang-10 will not recognize '/* fallthrough */' as an indicator to
    turn off the fallthrough diagnostic due to the lack of a 'break' in a
    case statement.  Clang-10 requires the '__attribute__((fallthrough))'
    statement to disable the diagnostic.
    
    In addition clang-10 is finding additional locations where fall throughs
    occur.
    
    Determine if the compiler supports '__attribute__((fallthrough))' to
    disable the implicit fallthrough diagnostic.
    
    Define a new macro 'AFS_FALLTHROUGH' that will disable the fallthrough
    diagnostic. Set it as a wrapper for the Linux kernel's 'fallthrough'
    macro if available, otherwise set it as a wrapper macro for
    '__attribute__((fallthrough))' if the compiler supports it.
    
    Update CODING to document the use of AFS_FALLTHROUGH when needing to
    fallthrough between case statements.
    
    Replace the '/* fallthrough */' comments with AFS_FALLTHROUGH, and add
    AFS_FALLTHROUGH as needed.
    
    Replace some fallthroughs with a break (or goto) if the flow was was
    just to a break (or goto).
    
    e.g.   case x:                 case x:
               somestmt;               somestmt;
                                       break;
           case y:                 case y:
               break;                  break;
    
    Correct a mis-indented brace '}' in src/WINNT/afsd/smb3.c
    
    Note, the clang maintainers have rejected the use of comments as a flag
    to turn off the fall through warnings.
    
    Reviewed-on: https://gerrit.openafs.org/14274
    Tested-by: BuildBot <buildbot@rampaginggeek.com>
    Reviewed-by: Andrew Deason <adeason@sinenomine.net>
    Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
    (cherry picked from commit 16f1b2f894c28614df0f096be8232b1176e87c70)
    
    [cwills@sinenomine.net Note the fallthrough case in asetkey.c that
    exists in the original master commit is not present 1.8.x]
    
    Change-Id: I4d92d519bd168ac111f46d37bcf7dca7021e5463
    Reviewed-on: https://gerrit.openafs.org/14970
    Reviewed-by: Andrew Deason <adeason@sinenomine.net>
    Tested-by: BuildBot <buildbot@rampaginggeek.com>
    Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
    Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>

 CODING                                     | 41 ++++++++++++++++++++++++++++++
 src/WINNT/afsadmsvr/TaAfsAdmSvrGeneral.cpp |  2 +-
 src/WINNT/afsd/afskfw.c                    |  2 +-
 src/WINNT/afsd/cm_daemon.c                 |  3 ++-
 src/WINNT/afsd/cm_utils.c                  |  2 +-
 src/WINNT/afsd/rpc_srvsvc.c                | 10 ++++----
 src/WINNT/afsd/smb.c                       |  2 +-
 src/WINNT/afsd/smb3.c                      | 10 ++++----
 src/WINNT/afssvrmgr/svr_getdates.cpp       |  2 +-
 src/WINNT/afssvrmgr/svr_install.cpp        |  2 +-
 src/WINNT/afssvrmgr/svr_prune.cpp          |  2 +-
 src/afs/LINUX/osi_export.c                 |  2 +-
 src/afs/LINUX/osi_vnodeops.c               |  2 +-
 src/aklog/klog.c                           |  4 +--
 src/butc/dump.c                            |  2 +-
 src/cf/c-attribute.m4                      |  1 +
 src/cmd/cmd.c                              |  2 +-
 src/config/stds.h                          |  8 ++++++
 src/opr/jhash.h                            | 33 +++++++++++-------------
 src/rx/rx_trace.c                          |  2 ++
 src/rx/xdr.c                               |  6 ++---
 src/rxkad/ticket5.c                        |  2 +-
 src/tests/snprintf.c                       |  2 +-
 src/tools/dumpscan/parsevnode.c            |  4 +--
 src/vfsck/pass2.c                          |  4 +--
 src/vfsck/pass5.c                          |  2 +-
 src/vol/fssync-server.c                    |  5 ++--
 src/vol/salvaged.c                         |  2 +-
 src/vol/salvsync-server.c                  |  2 +-
 src/vol/volume.c                           |  7 ++---
 src/volser/volprocs.c                      |  1 +
 31 files changed, 112 insertions(+), 59 deletions(-)

-- 
OpenAFS Master Repository