Whamcloud - gitweb
LU-15492 build: fallthrough macro for pre/post gcc-7
authorShaun Tancheff <shaun.tancheff@hpe.com>
Mon, 28 Feb 2022 08:30:19 +0000 (00:30 -0800)
committerAndreas Dilger <adilger@whamcloud.com>
Wed, 9 Mar 2022 17:13:20 +0000 (17:13 +0000)
commitbdf926616a20745ca14ab2b492fb79ef03fdb6b8
tree2730df76df9706429b3d9ff9d858ab56ec60cf87
parentc72bc2ece963b41f95ada7d50b9dcab76a0ad77d
LU-15492 build: fallthrough macro for pre/post gcc-7

gcc-7.5 on openSUSE 15:
   error: this statement may fall through [-Werror=implicit-fallthrough=]

Use the __attribute__((fallthrough)) for gcc-7 and later.
and use a no op statement for earlier gcc where the fallthrough
attribute is not available.

Lustre-change: https://review.whamcloud.com/46357
Lustre-commit: TBD (from 48145f2eaed1537506bfffb1c0a44a8cfdb38254)

Test-Parameters: trivial
Fixes: 5549b1b9e0 ("LU-15220 lustre: use 'fallthrough' pseudo keyword for switch")
Signed-off-by: Shaun Tancheff <shaun.tancheff@hpe.com>
Change-Id: Ib72f5996149c738805f15e354e1e1606d981ce29
Reviewed-on: https://review.whamcloud.com/46643
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Yang Sheng <ys@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
lnet/include/lnet/lib-lnet.h
lustre/include/lustre/lustreapi.h
lustre/include/lustre_compat.h
lustre/utils/gss/gss_util.h