diff options
| author | Michael Biebl <biebl@debian.org> | 2020-03-13 00:45:02 +0100 |
|---|---|---|
| committer | Michael Biebl <biebl@debian.org> | 2020-03-13 00:45:02 +0100 |
| commit | dae4785d3a29c5df3740c2676b400c0da1a72e3e (patch) | |
| tree | 9fe17185cbbcbd096c85e5973e1b909ae3f751e4 /m4 | |
| parent | 3cbb3d6ecfef1076fc757632ee8327935250afee (diff) | |
| parent | b012fa6e1d808e0736c009799c62d835cbfcc1dd (diff) | |
Update upstream source from tag 'upstream/1.22.10'
Update to upstream version '1.22.10' with Debian dir df10a9f9ccf26e17902b3dc19a866a22c47764e8
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) |