summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMike Yuan <me@yhndnzj.com>2025-01-15 19:16:06 +0100
committerMike Yuan <me@yhndnzj.com>2025-01-16 02:26:56 +0100
commit347eb8fbe3cfb5960995c86cd91065a37552ab6f (patch)
treeacca80155d9af9584781abaca597e2d379de4756 /src
parentRevert "OBS: build Fedora/Debian/Ubuntu x86_64 packages on PRs" (diff)
downloadsystemd-347eb8fbe3cfb5960995c86cd91065a37552ab6f.tar.xz
systemd-347eb8fbe3cfb5960995c86cd91065a37552ab6f.zip
tree-wide: remove unnecessary gcc >= 7 version check
Our baseline is gcc 8.4.
Diffstat (limited to 'src')
-rw-r--r--src/basic/MurmurHash2.c2
-rw-r--r--src/core/load-fragment-gperf.gperf.in2
-rw-r--r--src/fundamental/macro-fundamental.h6
-rw-r--r--src/home/homed-gperf.gperf2
-rw-r--r--src/journal/journald-gperf.gperf2
-rw-r--r--src/libsystemd/sd-journal/lookup3.c2
-rw-r--r--src/login/logind-gperf.gperf2
-rw-r--r--src/network/netdev/netdev-gperf.gperf2
-rw-r--r--src/network/networkd-gperf.gperf2
-rw-r--r--src/network/networkd-network-gperf.gperf2
-rw-r--r--src/nspawn/nspawn-gperf.gperf2
-rwxr-xr-xsrc/resolve/generate-dns_type-gperf.py2
-rw-r--r--src/resolve/resolved-gperf.gperf2
-rw-r--r--src/timesync/timesyncd-gperf.gperf2
-rwxr-xr-xsrc/udev/generate-keyboard-keys-gperf.sh2
-rw-r--r--src/udev/net/link-config-gperf.gperf2
16 files changed, 3 insertions, 33 deletions
diff --git a/src/basic/MurmurHash2.c b/src/basic/MurmurHash2.c
index 43a89a0820..bb4cd6b906 100644
--- a/src/basic/MurmurHash2.c
+++ b/src/basic/MurmurHash2.c
@@ -16,9 +16,7 @@
#include "MurmurHash2.h"
-#if __GNUC__ >= 7
_Pragma("GCC diagnostic ignored \"-Wimplicit-fallthrough\"")
-#endif
//-----------------------------------------------------------------------------
// Platform-specific functions and macros
diff --git a/src/core/load-fragment-gperf.gperf.in b/src/core/load-fragment-gperf.gperf.in
index 04a560110e..a5656a42b3 100644
--- a/src/core/load-fragment-gperf.gperf.in
+++ b/src/core/load-fragment-gperf.gperf.in
@@ -268,9 +268,7 @@
{%- endmacro -%}
%{
-#if __GNUC__ >= 7
_Pragma("GCC diagnostic ignored \"-Wimplicit-fallthrough\"")
-#endif
#include <stddef.h>
#include "all-units.h"
#include "conf-parser.h"
diff --git a/src/fundamental/macro-fundamental.h b/src/fundamental/macro-fundamental.h
index 35758b5b18..709657dd28 100644
--- a/src/fundamental/macro-fundamental.h
+++ b/src/fundamental/macro-fundamental.h
@@ -84,10 +84,10 @@
# define _alloc_(...) __attribute__((__alloc_size__(__VA_ARGS__)))
#endif
-#if __GNUC__ >= 7 || (defined(__clang__) && __clang_major__ >= 10)
-# define _fallthrough_ __attribute__((__fallthrough__))
-#else
+#if defined(__clang__) && __clang_major__ < 10
# define _fallthrough_
+#else
+# define _fallthrough_ __attribute__((__fallthrough__))
#endif
#define XSTRINGIFY(x) #x
diff --git a/src/home/homed-gperf.gperf b/src/home/homed-gperf.gperf
index 39aca35b08..9c1028642e 100644
--- a/src/home/homed-gperf.gperf
+++ b/src/home/homed-gperf.gperf
@@ -1,8 +1,6 @@
/* SPDX-License-Identifier: LGPL-2.1-or-later */
%{
-#if __GNUC__ >= 7
_Pragma("GCC diagnostic ignored \"-Wimplicit-fallthrough\"")
-#endif
#include <stddef.h>
#include "conf-parser.h"
#include "homed-conf.h"
diff --git a/src/journal/journald-gperf.gperf b/src/journal/journald-gperf.gperf
index 49987f5fae..7163c402aa 100644
--- a/src/journal/journald-gperf.gperf
+++ b/src/journal/journald-gperf.gperf
@@ -1,8 +1,6 @@
/* SPDX-License-Identifier: LGPL-2.1-or-later */
%{
-#if __GNUC__ >= 7
_Pragma("GCC diagnostic ignored \"-Wimplicit-fallthrough\"")
-#endif
#include <stddef.h>
#include <sys/socket.h>
#include "conf-parser.h"
diff --git a/src/libsystemd/sd-journal/lookup3.c b/src/libsystemd/sd-journal/lookup3.c
index c2a640687c..8e3dac05af 100644
--- a/src/libsystemd/sd-journal/lookup3.c
+++ b/src/libsystemd/sd-journal/lookup3.c
@@ -55,9 +55,7 @@ on 1 byte), but shoehorning those bytes into integers efficiently is messy.
# include <endian.h> /* attempt to define endianness */
#endif
-#if __GNUC__ >= 7
_Pragma("GCC diagnostic ignored \"-Wimplicit-fallthrough\"")
-#endif
/*
* My best guess at if you are big-endian or little-endian. This may
diff --git a/src/login/logind-gperf.gperf b/src/login/logind-gperf.gperf
index e7f39fed2a..da9fda6d4a 100644
--- a/src/login/logind-gperf.gperf
+++ b/src/login/logind-gperf.gperf
@@ -1,8 +1,6 @@
/* SPDX-License-Identifier: LGPL-2.1-or-later */
%{
-#if __GNUC__ >= 7
_Pragma("GCC diagnostic ignored \"-Wimplicit-fallthrough\"")
-#endif
#include <stddef.h>
#include "conf-parser.h"
#include "logind.h"
diff --git a/src/network/netdev/netdev-gperf.gperf b/src/network/netdev/netdev-gperf.gperf
index be010665c5..5cef68caa1 100644
--- a/src/network/netdev/netdev-gperf.gperf
+++ b/src/network/netdev/netdev-gperf.gperf
@@ -1,8 +1,6 @@
/* SPDX-License-Identifier: LGPL-2.1-or-later */
%{
-#if __GNUC__ >= 7
_Pragma("GCC diagnostic ignored \"-Wimplicit-fallthrough\"")
-#endif
#include <stddef.h>
#include "bareudp.h"
#include "batadv.h"
diff --git a/src/network/networkd-gperf.gperf b/src/network/networkd-gperf.gperf
index 21e8d12690..e2b84f1384 100644
--- a/src/network/networkd-gperf.gperf
+++ b/src/network/networkd-gperf.gperf
@@ -1,8 +1,6 @@
/* SPDX-License-Identifier: LGPL-2.1-or-later */
%{
-#if __GNUC__ >= 7
_Pragma("GCC diagnostic ignored \"-Wimplicit-fallthrough\"")
-#endif
#include <stddef.h>
#include "conf-parser.h"
#include "networkd-address-label.h"
diff --git a/src/network/networkd-network-gperf.gperf b/src/network/networkd-network-gperf.gperf
index dc462b690c..891a96cc60 100644
--- a/src/network/networkd-network-gperf.gperf
+++ b/src/network/networkd-network-gperf.gperf
@@ -1,8 +1,6 @@
/* SPDX-License-Identifier: LGPL-2.1-or-later */
%{
-#if __GNUC__ >= 7
_Pragma("GCC diagnostic ignored \"-Wimplicit-fallthrough\"")
-#endif
#include <netinet/icmp6.h>
#include <stddef.h>
diff --git a/src/nspawn/nspawn-gperf.gperf b/src/nspawn/nspawn-gperf.gperf
index 123ef0c6c8..12b865299d 100644
--- a/src/nspawn/nspawn-gperf.gperf
+++ b/src/nspawn/nspawn-gperf.gperf
@@ -1,8 +1,6 @@
/* SPDX-License-Identifier: LGPL-2.1-or-later */
%{
-#if __GNUC__ >= 7
_Pragma("GCC diagnostic ignored \"-Wimplicit-fallthrough\"")
-#endif
#include <stddef.h>
#include "conf-parser.h"
#include "nspawn-settings.h"
diff --git a/src/resolve/generate-dns_type-gperf.py b/src/resolve/generate-dns_type-gperf.py
index 0d818fb3d9..b1837c7449 100755
--- a/src/resolve/generate-dns_type-gperf.py
+++ b/src/resolve/generate-dns_type-gperf.py
@@ -10,9 +10,7 @@ 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; }};
diff --git a/src/resolve/resolved-gperf.gperf b/src/resolve/resolved-gperf.gperf
index 68839352f5..543115ea9e 100644
--- a/src/resolve/resolved-gperf.gperf
+++ b/src/resolve/resolved-gperf.gperf
@@ -1,8 +1,6 @@
/* SPDX-License-Identifier: LGPL-2.1-or-later */
%{
-#if __GNUC__ >= 7
_Pragma("GCC diagnostic ignored \"-Wimplicit-fallthrough\"")
-#endif
#include <stddef.h>
#include "conf-parser.h"
#include "resolved-conf.h"
diff --git a/src/timesync/timesyncd-gperf.gperf b/src/timesync/timesyncd-gperf.gperf
index 731dea12e3..37eb56eed5 100644
--- a/src/timesync/timesyncd-gperf.gperf
+++ b/src/timesync/timesyncd-gperf.gperf
@@ -1,8 +1,6 @@
/* SPDX-License-Identifier: LGPL-2.1-or-later */
%{
-#if __GNUC__ >= 7
_Pragma("GCC diagnostic ignored \"-Wimplicit-fallthrough\"")
-#endif
#include <stddef.h>
#include "conf-parser.h"
#include "timesyncd-conf.h"
diff --git a/src/udev/generate-keyboard-keys-gperf.sh b/src/udev/generate-keyboard-keys-gperf.sh
index 9f4364c172..6d2f3606b8 100755
--- a/src/udev/generate-keyboard-keys-gperf.sh
+++ b/src/udev/generate-keyboard-keys-gperf.sh
@@ -6,9 +6,7 @@ set -eu
awk '
BEGIN {
print "%{\n\
-#if __GNUC__ >= 7\n\
_Pragma(\"GCC diagnostic ignored \\\"-Wimplicit-fallthrough\\\"\")\n\
-#endif\n\
%}"
print "struct key_name { const char* name; unsigned short id; };"
print "%null-strings"
diff --git a/src/udev/net/link-config-gperf.gperf b/src/udev/net/link-config-gperf.gperf
index e4db56e844..a313818e01 100644
--- a/src/udev/net/link-config-gperf.gperf
+++ b/src/udev/net/link-config-gperf.gperf
@@ -1,8 +1,6 @@
/* SPDX-License-Identifier: LGPL-2.1-or-later */
%{
-#if __GNUC__ >= 7
_Pragma("GCC diagnostic ignored \"-Wimplicit-fallthrough\"")
-#endif
#include <stddef.h>
#include "conf-parser.h"
#include "ethtool-util.h"