OpenAFS Master Repository branch, master, updated. BP-openafs-stable-1_8_x-650-g16f1b2f
Gerrit Code Review
gerrit@openafs.org
Mon, 27 Jul 2020 12:23:05 -0400
The following commit has been merged in the master branch:
commit 16f1b2f894c28614df0f096be8232b1176e87c70
Author: Cheyenne Wills <cwills@sinenomine.net>
Date: Mon Jul 27 08:33:03 2020 -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.
Change-Id: Ia5da10fc14fc1874baca035a3cf471e618e0d5f5
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>
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/asetkey.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 +
32 files changed, 113 insertions(+), 60 deletions(-)
--
OpenAFS Master Repository