]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
tree-wide: remove unnecessary gcc >= 7 version check
authorMike Yuan <me@yhndnzj.com>
Wed, 15 Jan 2025 18:16:06 +0000 (19:16 +0100)
committerMike Yuan <me@yhndnzj.com>
Thu, 16 Jan 2025 01:26:56 +0000 (02:26 +0100)
Our baseline is gcc 8.4.

17 files changed:
src/basic/MurmurHash2.c
src/core/load-fragment-gperf.gperf.in
src/fundamental/macro-fundamental.h
src/home/homed-gperf.gperf
src/journal/journald-gperf.gperf
src/libsystemd/sd-journal/lookup3.c
src/login/logind-gperf.gperf
src/network/netdev/netdev-gperf.gperf
src/network/networkd-gperf.gperf
src/network/networkd-network-gperf.gperf
src/nspawn/nspawn-gperf.gperf
src/resolve/generate-dns_type-gperf.py
src/resolve/resolved-gperf.gperf
src/timesync/timesyncd-gperf.gperf
src/udev/generate-keyboard-keys-gperf.sh
src/udev/net/link-config-gperf.gperf
tools/generate-gperfs.py

index 43a89a0820bf10b76aa8cf22d8da3891b8bb2285..bb4cd6b90675a21668a7265bf2b6fb8ba378b081 100644 (file)
@@ -16,9 +16,7 @@
 
 #include "MurmurHash2.h"
 
-#if __GNUC__ >= 7
 _Pragma("GCC diagnostic ignored \"-Wimplicit-fallthrough\"")
-#endif
 
 //-----------------------------------------------------------------------------
 // Platform-specific functions and macros
index 04a560110e60105b83d3ed2cc45fe75baa4cb7f6..a5656a42b388e4d2b22d9869e7cc55ef1bebd0b3 100644 (file)
 {%- endmacro -%}
 
 %{
-#if __GNUC__ >= 7
 _Pragma("GCC diagnostic ignored \"-Wimplicit-fallthrough\"")
-#endif
 #include <stddef.h>
 #include "all-units.h"
 #include "conf-parser.h"
index 35758b5b1897436f0459cc288091ab470c6d1ee8..709657dd2852163170088983984b7de544de70ae 100644 (file)
 #  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
index 39aca35b08e5b6583ed038e3c65e2c1f4b2222d2..9c1028642e99975d57906d489f05d47338c2aede 100644 (file)
@@ -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"
index 49987f5fae3aed89b46debf3a07739deed1bc0af..7163c402aa8c214b29390cce9bd43182bb9597d2 100644 (file)
@@ -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"
index c2a640687c0df61a25156e4495271c6180da67fc..8e3dac05afaed219d26d34fc70874295b2b85de4 100644 (file)
@@ -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
index e7f39fed2a9dd7bb2c0a6cdbbb230c4942603590..da9fda6d4a59c3b8661ee3dfc1a8e182273e9faf 100644 (file)
@@ -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"
index be010665c5d153a77012b672872e8d563eb88076..5cef68caa1bbce55c2e12b63a6405bcab86c06de 100644 (file)
@@ -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"
index 21e8d12690b14f864e49edbcf4c3f1036f73c169..e2b84f13849ed053e6b30bfa5a760600cc8b7732 100644 (file)
@@ -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"
index dc462b690c2447cc8cfbaf7d887c8a89c026a611..891a96cc608089b3a687870075d3b2cedb843fce 100644 (file)
@@ -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>
 
index 123ef0c6c87c395d17316fde647c13e7c51e8c9e..12b865299dd8ef725b3679c4c757c84caaf8ae07 100644 (file)
@@ -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"
index 0d818fb3d97c841095279e247011c3e126b378bc..b1837c7449fb26323bed0a27edb0ee353f6555b7 100755 (executable)
@@ -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; }};
index 68839352f55b0c328494a1af4b7ea02dc8755e31..543115ea9ea2dbe830b6773b576fa6ffac143438 100644 (file)
@@ -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"
index 731dea12e3a54512338365f8013afab993b625d1..37eb56eed55a6d0486252de04dbd0c7e560b459f 100644 (file)
@@ -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"
index 9f4364c1725c24f1519ba47b17a898294c05019e..6d2f3606b8bfb4c787be81c9413f807e1d13c47e 100755 (executable)
@@ -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"
index e4db56e8445980311c37cee9c9e5f3f44f187403..a313818e01722c167949546e0958c88d47e96e2d 100644 (file)
@@ -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"
index 3887bb6ee9a876eb4d355c6b3d2aebba1884c3ee..e2d6e30b7a8242dc0e28ebcfc29b62fa0427ad23 100755 (executable)
@@ -16,9 +16,7 @@ if __name__ == '__main__':
 
     print("""\
 %{
-#if __GNUC__ >= 7
 _Pragma("GCC diagnostic ignored \\"-Wimplicit-fallthrough\\"")
-#endif
 %}""")
     print(f"""\
 struct {name}_name {{ const char* name; int id; }};