Whamcloud - gitweb
LU-15492 build: fallthrough macro for pre/post gcc-7 57/46357/4
authorShaun Tancheff <shaun.tancheff@hpe.com>
Fri, 28 Jan 2022 07:56:33 +0000 (01:56 -0600)
committerOleg Drokin <green@whamcloud.com>
Sat, 11 Jun 2022 05:33:56 +0000 (05:33 +0000)
commit7b54fc7b1615f23a1ad9da84ba8e289de1f22d70
tree429a4003d536bbbe708250d214e4a71dc418d838
parent7ec7f5af236c4bdd8f08b9a2a00453ae8189eee6
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.

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/46357
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Petros Koutoupis <petros.koutoupis@hpe.com>
Reviewed-by: Jian Yu <yujian@whamcloud.com>
Reviewed-by: Patrick Farrell <pfarrell@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lnet/include/lnet/lib-lnet.h
lustre/include/lustre/lustreapi.h
lustre/include/lustre_compat.h
lustre/utils/gss/gss_util.h