1
0
mirror of https://github.com/systemd/systemd.git synced 2025-01-30 01:47:42 +03:00

tree-wide: remove unnecessary gcc >= 7 version check

Our baseline is gcc 8.4.
This commit is contained in:
Mike Yuan 2025-01-15 19:16:06 +01:00
parent 35da377035
commit 347eb8fbe3
No known key found for this signature in database
GPG Key ID: 417471C0A40F58B3
17 changed files with 3 additions and 35 deletions

View File

@ -16,9 +16,7 @@
#include "MurmurHash2.h"
#if __GNUC__ >= 7
_Pragma("GCC diagnostic ignored \"-Wimplicit-fallthrough\"")
#endif
//-----------------------------------------------------------------------------
// Platform-specific functions and macros

View File

@ -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"

View File

@ -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

View 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"

View 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"

View 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

View 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"

View 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"

View 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"

View 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>

View 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"

View File

@ -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; }};

View 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"

View 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"

View File

@ -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"

View 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"

View File

@ -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; }};