diff options
author | Shawn Landden <slandden@gmail.com> | 2017-11-24 01:08:12 -0800 |
---|---|---|
committer | Sven Eden <yamakuzure@gmx.net> | 2017-11-24 01:08:12 -0800 |
commit | 9af34b1c0aeaa0d8fa2fec6b317fa9df8a3b0e6d (patch) | |
tree | 930a64bf33376ad51717a5d5a68d792c6a5fbba8 /src | |
parent | 068d5dec5a88599e0a8a32063035ab50cd2875f7 (diff) |
__attribute__((fallthrough)) only when -Wimplicit-fallthrough (#7448)
That is version 7 or greater
https://developers.redhat.com/blog/2017/03/10/wimplicit-fallthrough-in-gcc-7/
Fix regression of https://github.com/elogind/elogind/pull/7389
82a27ba8217d09e4fef4c9550f8b733d174c5705
on older gccs
bumping to re-run CI
upstream FAIL timed out
boot-smoke FAIL non-zero exit status 1
Diffstat (limited to 'src')
-rw-r--r-- | src/basic/macro.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/basic/macro.h b/src/basic/macro.h index 34e0657ac..c5671d7db 100644 --- a/src/basic/macro.h +++ b/src/basic/macro.h @@ -47,7 +47,11 @@ #define _weakref_(x) __attribute__((weakref(#x))) #define _alignas_(x) __attribute__((aligned(__alignof(x)))) #define _cleanup_(x) __attribute__((cleanup(x))) +#if __GNUC__ >= 7 #define _fallthrough_ __attribute__((fallthrough)) +#else +#define _fallthrough_ +#endif /* Temporarily disable some warnings */ #define DISABLE_WARNING_DECLARATION_AFTER_STATEMENT \ |