diff options
| author | Sebastien Bacher <seb128@ubuntu.com> | 2020-03-13 16:23:07 +0100 |
|---|---|---|
| committer | Sebastien Bacher <seb128@ubuntu.com> | 2020-03-13 16:23:07 +0100 |
| commit | 8f6881ac06714ef99cc470a03e7ac0ce1af49a16 (patch) | |
| tree | fcb5e39f41b8135e4b3a41b6951f21473e10fa5e /m4 | |
| parent | ee7b95167028fdbb2a4bd32aa686e27817d8dfe0 (diff) | |
| parent | b012fa6e1d808e0736c009799c62d835cbfcc1dd (diff) | |
Merge branch 'upstream/latest' of https://salsa.debian.org/utopia-team/network-manager into upstream/latest
Diffstat (limited to 'm4')
| -rw-r--r-- | m4/compiler_options.m4 | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/m4/compiler_options.m4 b/m4/compiler_options.m4 index 5235e037..1483f3ed 100644 --- a/m4/compiler_options.m4 +++ b/m4/compiler_options.m4 @@ -70,7 +70,6 @@ if test "$GCC" = "yes" -a "$set_more_warnings" != "no"; then -Wfloat-equal \ -Wformat-nonliteral \ -Wformat-security \ - -Wimplicit-fallthrough \ -Wimplicit-function-declaration \ -Winit-self \ -Wlogical-op \ @@ -136,6 +135,26 @@ if test "$GCC" = "yes" -a "$set_more_warnings" != "no"; then [G_DEFINE_TYPE (NMObject, nm_object, G_TYPE_OBJECT)] ) + dnl clang started supporting -Wimplicit-fallthrough, but it does not + dnl honor the code comments to suppress the warning. Disable the + dnl warning with clang. + dnl + NM_COMPILER_WARNING([$1], [implicit-fallthrough], + [int foo(int a); + int foo(int a) { + int r = 0; + switch (a) { + case 1: + r++; + /* fall-through */ + case 2: + r++; + break; + } + return r; + }] + ) + eval "AS_TR_SH([$1])='$CFLAGS_MORE_WARNINGS $$1'" else AC_MSG_RESULT(no) |