diff options
author | Shawn Landden <slandden@gmail.com> | 2017-11-19 10:06:10 -0800 |
---|---|---|
committer | Shawn Landden <slandden@gmail.com> | 2017-11-20 13:06:25 -0800 |
commit | 4831981d89c628606c825779c75afb03b4839618 (patch) | |
tree | 7e35cbb6e0f1fedb3e543dc14d9ac2553e8ed39e /src/resolve | |
parent | d8bd96ab54ab60de5b12aa767eeea94a4cca685c (diff) | |
download | systemd-4831981d89c628606c825779c75afb03b4839618.tar.gz |
tree-wide: adjust fall through comments so that gcc is happy
Distcc removes comments, making the comment silencing
not work.
I know there was a decision against a macro in commit
ec251fe7d5bc24b5d38b0853bc5969f3a0ba06e2
Diffstat (limited to 'src/resolve')
-rwxr-xr-x | src/resolve/generate-dns_type-gperf.py | 6 | ||||
-rw-r--r-- | src/resolve/resolved-gperf.gperf | 3 |
2 files changed, 9 insertions, 0 deletions
diff --git a/src/resolve/generate-dns_type-gperf.py b/src/resolve/generate-dns_type-gperf.py index 8a0b43c277..d4f7b94738 100755 --- a/src/resolve/generate-dns_type-gperf.py +++ b/src/resolve/generate-dns_type-gperf.py @@ -8,6 +8,12 @@ import sys name, prefix, input = sys.argv[1:] print("""\ +%{ +#if __GNUC__ >= 7 +_Pragma("GCC diagnostic ignored \\"-Wimplicit-fallthrough\\"") +#endif +%}""") +print("""\ struct {}_name {{ const char* name; int id; }}; %null-strings %%""".format(name)) diff --git a/src/resolve/resolved-gperf.gperf b/src/resolve/resolved-gperf.gperf index 5153563b99..a5865ce6c2 100644 --- a/src/resolve/resolved-gperf.gperf +++ b/src/resolve/resolved-gperf.gperf @@ -1,4 +1,7 @@ %{ +#if __GNUC__ >= 7 +_Pragma("GCC diagnostic ignored \"-Wimplicit-fallthrough\"") +#endif #include <stddef.h> #include "conf-parser.h" #include "resolved-conf.h" |