]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
meson: enable -Wzero-as-null-pointer-constant 36028/head
authorMike Yuan <me@yhndnzj.com>
Wed, 15 Jan 2025 17:41:51 +0000 (18:41 +0100)
committerMike Yuan <me@yhndnzj.com>
Thu, 16 Jan 2025 01:26:56 +0000 (02:26 +0100)
Support for C added in gcc 15:
https://github.com/gcc-mirror/gcc/commit/236c0829ee21a179c81b83f0d7f112ca23c47a4d

33 files changed:
meson.build
src/basic/filesystems-gperf.gperf
src/basic/locale-util.c
src/basic/lock-util.c
src/core/load-fragment-gperf.gperf.in
src/core/manager.c
src/home/homed-gperf.gperf
src/home/homed-manager.c
src/journal/journald-gperf.gperf
src/libsystemd/sd-hwdb/sd-hwdb.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/oom/test-oomd-util.c
src/resolve/generate-dns_type-gperf.py
src/resolve/resolved-dnssd-gperf.gperf
src/resolve/resolved-gperf.gperf
src/shared/mount-util.c
src/shared/numa-util.c
src/shared/tpm2-util.c
src/shared/vpick.c
src/socket-activate/socket-activate.c
src/test/test-fileio.c
src/test/test-mempress.c
src/test/test-netlink-manual.c
src/test/test-seccomp.c
src/timesync/timesyncd-gperf.gperf
src/udev/generate-keyboard-keys-gperf.sh
src/udev/net/link-config-gperf.gperf
src/userdb/userdbctl.c
tools/generate-gperfs.py

index de92fbe771bf14909154c8bb479df4cc9f62cae0..5c364e137903e30085115dbeba8c4f570ea86446 100644 (file)
@@ -412,6 +412,7 @@ possible_common_cc_flags = [
         '-Wunterminated-string-initialization',
         '-Wunused-function',
         '-Wwrite-strings',
+        '-Wzero-as-null-pointer-constant',
         '-Wzero-length-bounds',
 
         # negative arguments are correctly detected starting with meson 0.46.
index c82fe98227b8c2e71bedbc92841b41c2cb1435eb..23c9372af23b6f237b517eedf2229f58d3297fe5 100644 (file)
@@ -1,5 +1,8 @@
 /* SPDX-License-Identifier: LGPL-2.1-or-later */
 %{
+#if __GNUC__ >= 15
+_Pragma("GCC diagnostic ignored \"-Wzero-as-null-pointer-constant\"")
+#endif
 #include <linux/magic.h>
 
 #include "filesystems.h"
index 23565273dd2fceb61dbed0c3e852de22edc21644..09bdb373007a3f3a873611ef48555c7d6e91b02a 100644 (file)
@@ -276,8 +276,7 @@ int locale_is_installed(const char *name) {
         if (STR_IN_SET(name, "C", "POSIX")) /* These ones are always OK */
                 return true;
 
-        _cleanup_(freelocalep) locale_t loc =
-                newlocale(LC_ALL_MASK, name, 0);
+        _cleanup_(freelocalep) locale_t loc = newlocale(LC_ALL_MASK, name, (locale_t) 0);
         if (loc == (locale_t) 0)
                 return errno == ENOMEM ? -ENOMEM : false;
 
index db9905cb48932065e6f939b9607857f49021e980..7dad009c1ec63dfac573ee466313f4853f759089 100644 (file)
@@ -231,7 +231,7 @@ int lock_generic_with_timeout(int fd, LockType type, int operation, usec_t timeo
                         .sigev_notify = SIGEV_SIGNAL,
                         .sigev_signo = SIGALRM,
                 };
-                timer_t id = 0;
+                timer_t id;
 
                 if (timer_create(CLOCK_MONOTONIC, &sev, &id) < 0) {
                         log_error_errno(errno, "Failed to allocate CLOCK_MONOTONIC timer: %m");
index a5656a42b388e4d2b22d9869e7cc55ef1bebd0b3..5104c107198cc25ce21bd0ad7ce64f6bc9d7efa1 100644 (file)
 
 %{
 _Pragma("GCC diagnostic ignored \"-Wimplicit-fallthrough\"")
+#if __GNUC__ >= 15
+_Pragma("GCC diagnostic ignored \"-Wzero-as-null-pointer-constant\"")
+#endif
 #include <stddef.h>
 #include "all-units.h"
 #include "conf-parser.h"
index 1b629b13780b1b9eb9a43b51829ea652314c00d7..72b9290dc021c44575cf7d8ee92f015763d587aa 100644 (file)
@@ -2002,7 +2002,7 @@ static void manager_preset_all(Manager *m) {
         UnitFilePresetMode mode =
                 ENABLE_FIRST_BOOT_FULL_PRESET ? UNIT_FILE_PRESET_FULL : UNIT_FILE_PRESET_ENABLE_ONLY;
 
-        r = unit_file_preset_all(RUNTIME_SCOPE_SYSTEM, 0, NULL, mode, NULL, 0);
+        r = unit_file_preset_all(RUNTIME_SCOPE_SYSTEM, 0, NULL, mode, NULL, NULL);
         if (r < 0)
                 log_full_errno(r == -EEXIST ? LOG_NOTICE : LOG_WARNING, r,
                                "Failed to populate /etc with preset unit settings, ignoring: %m");
index 9c1028642e99975d57906d489f05d47338c2aede..d5b798a411cf5ff50c2e0ccd4a537dc75650a7ff 100644 (file)
@@ -1,6 +1,9 @@
 /* SPDX-License-Identifier: LGPL-2.1-or-later */
 %{
 _Pragma("GCC diagnostic ignored \"-Wimplicit-fallthrough\"")
+#if __GNUC__ >= 15
+_Pragma("GCC diagnostic ignored \"-Wzero-as-null-pointer-constant\"")
+#endif
 #include <stddef.h>
 #include "conf-parser.h"
 #include "homed-conf.h"
index de7c3d8dbe13d60caabbf1e6245f6615d4f1acba..bb4ad1f99f4353ae22603ee98b7b0ee407458103 100644 (file)
@@ -1455,7 +1455,7 @@ static int manager_generate_key_pair(Manager *m) {
         if (r < 0)
                 return log_error_errno(r, "Failed to open key file for writing: %m");
 
-        if (PEM_write_PrivateKey(fprivate, m->private_key, NULL, NULL, 0, NULL, 0) <= 0)
+        if (PEM_write_PrivateKey(fprivate, m->private_key, NULL, NULL, 0, NULL, NULL) <= 0)
                 return log_error_errno(SYNTHETIC_ERRNO(EIO), "Failed to write private key pair.");
 
         r = fflush_sync_and_check(fprivate);
index 7163c402aa8c214b29390cce9bd43182bb9597d2..317cfb64268c568475ad20e61295e39e06d748fe 100644 (file)
@@ -1,6 +1,9 @@
 /* SPDX-License-Identifier: LGPL-2.1-or-later */
 %{
 _Pragma("GCC diagnostic ignored \"-Wimplicit-fallthrough\"")
+#if __GNUC__ >= 15
+_Pragma("GCC diagnostic ignored \"-Wzero-as-null-pointer-constant\"")
+#endif
 #include <stddef.h>
 #include <sys/socket.h>
 #include "conf-parser.h"
index 588fb0313bca7da65d960d38d60683c8352f7c37..90cf80f199f49bd249e70b9cac94707a9cc71e20 100644 (file)
@@ -319,7 +319,7 @@ static int hwdb_new(const char *path, sd_hwdb **ret) {
         if (file_offset_beyond_memory_size(hwdb->st.st_size))
                 return log_debug_errno(SYNTHETIC_ERRNO(EFBIG), "File %s is too long.", path);
 
-        hwdb->map = mmap(0, hwdb->st.st_size, PROT_READ, MAP_SHARED, fileno(hwdb->f), 0);
+        hwdb->map = mmap(NULL, hwdb->st.st_size, PROT_READ, MAP_SHARED, fileno(hwdb->f), 0);
         if (hwdb->map == MAP_FAILED)
                 return log_debug_errno(errno, "Failed to map %s: %m", path);
 
index da9fda6d4a59c3b8661ee3dfc1a8e182273e9faf..f09387e6a804bef47453c7ae9a9bae0ea6c3d024 100644 (file)
@@ -1,6 +1,9 @@
 /* SPDX-License-Identifier: LGPL-2.1-or-later */
 %{
 _Pragma("GCC diagnostic ignored \"-Wimplicit-fallthrough\"")
+#if __GNUC__ >= 15
+_Pragma("GCC diagnostic ignored \"-Wzero-as-null-pointer-constant\"")
+#endif
 #include <stddef.h>
 #include "conf-parser.h"
 #include "logind.h"
index 5cef68caa1bbce55c2e12b63a6405bcab86c06de..be61e208a0113e0ab2b9b304aefba813c1f15ab6 100644 (file)
@@ -1,6 +1,9 @@
 /* SPDX-License-Identifier: LGPL-2.1-or-later */
 %{
 _Pragma("GCC diagnostic ignored \"-Wimplicit-fallthrough\"")
+#if __GNUC__ >= 15
+_Pragma("GCC diagnostic ignored \"-Wzero-as-null-pointer-constant\"")
+#endif
 #include <stddef.h>
 #include "bareudp.h"
 #include "batadv.h"
index e2b84f13849ed053e6b30bfa5a760600cc8b7732..2eb847d119e97e2459b4f759fc8243769d48d41b 100644 (file)
@@ -1,6 +1,9 @@
 /* SPDX-License-Identifier: LGPL-2.1-or-later */
 %{
 _Pragma("GCC diagnostic ignored \"-Wimplicit-fallthrough\"")
+#if __GNUC__ >= 15
+_Pragma("GCC diagnostic ignored \"-Wzero-as-null-pointer-constant\"")
+#endif
 #include <stddef.h>
 #include "conf-parser.h"
 #include "networkd-address-label.h"
index 891a96cc608089b3a687870075d3b2cedb843fce..9a25be666be289542ac9d13236b56af5f9bce3de 100644 (file)
@@ -1,6 +1,9 @@
 /* SPDX-License-Identifier: LGPL-2.1-or-later */
 %{
 _Pragma("GCC diagnostic ignored \"-Wimplicit-fallthrough\"")
+#if __GNUC__ >= 15
+_Pragma("GCC diagnostic ignored \"-Wzero-as-null-pointer-constant\"")
+#endif
 #include <netinet/icmp6.h>
 #include <stddef.h>
 
index 12b865299dd8ef725b3679c4c757c84caaf8ae07..4356e0f4fade2efd6fd67a166c5aee2c93ad64de 100644 (file)
@@ -1,6 +1,9 @@
 /* SPDX-License-Identifier: LGPL-2.1-or-later */
 %{
 _Pragma("GCC diagnostic ignored \"-Wimplicit-fallthrough\"")
+#if __GNUC__ >= 15
+_Pragma("GCC diagnostic ignored \"-Wzero-as-null-pointer-constant\"")
+#endif
 #include <stddef.h>
 #include "conf-parser.h"
 #include "nspawn-settings.h"
index 53109c160d301589333c98b18ec9d992867cbaaa..d124132e0b0b60fe85fd8b563254e71f0219c23c 100644 (file)
@@ -330,7 +330,7 @@ static void test_oomd_mem_and_swap_free_below(void) {
 
 static void test_oomd_sort_cgroups(void) {
         _cleanup_hashmap_free_ Hashmap *h = NULL;
-        _cleanup_free_ OomdCGroupContext **sorted_cgroups;
+        _cleanup_free_ OomdCGroupContext **sorted_cgroups = NULL;
         char **paths = STRV_MAKE("/herp.slice",
                                  "/herp.slice/derp.scope",
                                  "/herp.slice/derp.scope/sheep.service",
@@ -408,12 +408,11 @@ static void test_oomd_sort_cgroups(void) {
         assert_se(oomd_sort_cgroup_contexts(h, compare_pgscan_rate_and_memory_usage, "/herp.slice/derp.scope", &sorted_cgroups) == 2);
         assert_se(sorted_cgroups[0] == &ctx[2]);
         assert_se(sorted_cgroups[1] == &ctx[1]);
-        assert_se(sorted_cgroups[2] == 0);
-        assert_se(sorted_cgroups[3] == 0);
-        assert_se(sorted_cgroups[4] == 0);
-        assert_se(sorted_cgroups[5] == 0);
-        assert_se(sorted_cgroups[6] == 0);
-        sorted_cgroups = mfree(sorted_cgroups);
+        ASSERT_NULL(sorted_cgroups[2]);
+        ASSERT_NULL(sorted_cgroups[3]);
+        ASSERT_NULL(sorted_cgroups[4]);
+        ASSERT_NULL(sorted_cgroups[5]);
+        ASSERT_NULL(sorted_cgroups[6]);
 }
 
 static void test_oomd_fetch_cgroup_oom_preference(void) {
index b1837c7449fb26323bed0a27edb0ee353f6555b7..0fd003a8023ae30300d77a5b5e0e80201c55b7e5 100755 (executable)
@@ -11,6 +11,9 @@ name, prefix, input = sys.argv[1:]
 print("""\
 %{
 _Pragma("GCC diagnostic ignored \\"-Wimplicit-fallthrough\\"")
+#if __GNUC__ >= 15
+_Pragma("GCC diagnostic ignored \\"-Wzero-as-null-pointer-constant\\"")
+#endif
 %}""")
 print("""\
 struct {}_name {{ const char* name; int id; }};
index a5158390c90664b828c58af134aed31cf7c1576f..b31b30ec6efe7f7d0ceecc7c2e41c2e12467adcb 100644 (file)
@@ -1,5 +1,8 @@
 /* SPDX-License-Identifier: LGPL-2.1-or-later */
 %{
+#if __GNUC__ >= 15
+_Pragma("GCC diagnostic ignored \"-Wzero-as-null-pointer-constant\"")
+#endif
 #include <stddef.h>
 #include "conf-parser.h"
 #include "resolved-dnssd.h"
index 543115ea9ea2dbe830b6773b576fa6ffac143438..d311754e767e337d81eff55d42779a97a0c66d33 100644 (file)
@@ -1,6 +1,9 @@
 /* SPDX-License-Identifier: LGPL-2.1-or-later */
 %{
 _Pragma("GCC diagnostic ignored \"-Wimplicit-fallthrough\"")
+#if __GNUC__ >= 15
+_Pragma("GCC diagnostic ignored \"-Wzero-as-null-pointer-constant\"")
+#endif
 #include <stddef.h>
 #include "conf-parser.h"
 #include "resolved-conf.h"
index 0d8a1f68ebc19b9a42fc32943bf5d05f1ecc7d34..39aa3d3ec825621e2ab1b91d42708fd3ad7c792a 100644 (file)
@@ -542,7 +542,7 @@ int mount_switch_root_full(const char *path, unsigned long mount_propagation_fla
         if (mount_propagation_flag == 0)
                 return 0;
 
-        if (mount(NULL, ".", NULL, mount_propagation_flag | MS_REC, 0) < 0)
+        if (mount(NULL, ".", NULL, mount_propagation_flag | MS_REC, NULL) < 0)
                 return log_debug_errno(errno, "Failed to turn new rootfs '%s' into %s mount: %m",
                                        mount_propagation_flag_to_string(mount_propagation_flag), path);
 
index a954ea349ee065c633395ee7536f84972cacfd01..b4f815277ae413d396d344dfe76084f3a8ea11ec 100644 (file)
@@ -72,7 +72,7 @@ int apply_numa_policy(const NUMAPolicy *policy) {
 
         assert(policy);
 
-        if (get_mempolicy(NULL, NULL, 0, 0, 0) < 0 && errno == ENOSYS)
+        if (get_mempolicy(NULL, NULL, 0, NULL, 0) < 0 && errno == ENOSYS)
                 return -EOPNOTSUPP;
 
         if (!numa_policy_is_valid(policy))
index 29d9dbbe2e5d88c52660e5c22a9b963addf80beb..b4ae74f17ac0c626890db815cea987d938ebf139 100644 (file)
@@ -5201,8 +5201,8 @@ static int tpm2_calculate_seal_ecc_seed(
         r = ecc_pkey_to_curve_x_y(
                         parent_pkey,
                         &curve_id,
-                        /* ret_x= */ NULL, /* ret_x_size= */ 0,
-                        /* ret_y= */ NULL, /* ret_y_size= */ 0);
+                        /* ret_x= */ NULL, /* ret_x_size= */ NULL,
+                        /* ret_y= */ NULL, /* ret_y_size= */ NULL);
         if (r < 0)
                 return r;
 
index c2ca800af5b4c3c0a4de629b001f55b97c29fa8d..08f6dd72d92f48d1c1cd308cf606e02e22b7451c 100644 (file)
@@ -151,7 +151,7 @@ static int pin_choice(
                 r = chaseat(toplevel_fd,
                             inode_path,
                             CHASE_AT_RESOLVE_IN_ROOT,
-                            FLAGS_SET(flags, PICK_RESOLVE) ? &resolved_path : 0,
+                            FLAGS_SET(flags, PICK_RESOLVE) ? &resolved_path : NULL,
                             inode_fd < 0 ? &inode_fd : NULL);
                 if (r < 0)
                         return r;
index 9234bb33cdc590d758b7101f80f0a804d4e6aa16..134ed3f0de29153806e82171f32d5145ad32ac90 100644 (file)
@@ -284,7 +284,7 @@ static int install_chld_handler(void) {
                 .sa_handler = sigchld_hdl,
         };
 
-        if (sigaction(SIGCHLD, &act, 0) < 0)
+        if (sigaction(SIGCHLD, &act, NULL) < 0)
                 return log_error_errno(errno, "Failed to install SIGCHLD handler: %m");
 
         return 0;
index 60b568b2d2f573b2bc91e28655a1c1df44706c09..dbd175ad7044840fb0c29ac78d1a00214ac20486 100644 (file)
@@ -955,7 +955,7 @@ TEST(read_full_file_socket) {
                 _cleanup_close_ int rfd = -EBADF;
                 /* child */
 
-                rfd = accept4(listener, NULL, 0, SOCK_CLOEXEC);
+                rfd = accept4(listener, NULL, NULL, SOCK_CLOEXEC);
                 assert_se(rfd >= 0);
 
                 assert_se(getpeername(rfd, &peer.sa, &peerlen) >= 0);
index 44f1f4cf5f0c70d61342cdf256536d6049116206..dfbd63e6014f4d26438d76d562a80e9bbae3557c 100644 (file)
@@ -43,7 +43,7 @@ static void *fake_pressure_thread(void *p) {
         ASSERT_STREQ(buf, "hello");
         assert_se(write(cfd, &(const char) { 'z' }, 1) == 1);
 
-        return 0;
+        return NULL;
 }
 
 static int fake_pressure_callback(sd_event_source *s, void *userdata) {
index 8c1b0d407e36c0275ab00ef72ce76220e61b79c6..913998ad50f4d102cf5efd55134e621450fd1c0c 100644 (file)
@@ -82,7 +82,7 @@ static int test_tunnel_configure(sd_netlink *rtnl) {
         assert_se(sd_netlink_message_close_container(m) >= 0);
         assert_se(sd_netlink_message_close_container(m) >= 0);
 
-        assert_se(sd_netlink_call(rtnl, m, -1, 0) == 1);
+        ASSERT_OK_POSITIVE(sd_netlink_call(rtnl, m, -1, NULL));
 
         ASSERT_NULL((m = sd_netlink_message_unref(m)));
 
@@ -108,7 +108,7 @@ static int test_tunnel_configure(sd_netlink *rtnl) {
         assert_se(sd_netlink_message_close_container(n) >= 0);
         assert_se(sd_netlink_message_close_container(n) >= 0);
 
-        assert_se(sd_netlink_call(rtnl, n, -1, 0) == 1);
+        ASSERT_OK_POSITIVE(sd_netlink_call(rtnl, n, -1, NULL));
 
         ASSERT_NULL((n = sd_netlink_message_unref(n)));
 
index b4009089783cd6357b9714baec3878729f0ec963..d006e8b7b0870e8c59bbb8a5b1c945117ad2cd29 100644 (file)
@@ -487,7 +487,7 @@ TEST(restrict_address_families) {
                 safe_close(fd);
 
                 assert_se(s = set_new(NULL));
-                assert_se(set_put(s, INT_TO_PTR(AF_UNIX)) >= 0);
+                ASSERT_OK(set_put(s, INT_TO_PTR(AF_UNIX)));
 
                 assert_se(seccomp_restrict_address_families(s, false) >= 0);
 
@@ -510,7 +510,7 @@ TEST(restrict_address_families) {
 
                 set_clear(s);
 
-                assert_se(set_put(s, INT_TO_PTR(AF_INET)) >= 0);
+                ASSERT_OK(set_put(s, INT_TO_PTR(AF_INET)));
 
                 assert_se(seccomp_restrict_address_families(s, true) >= 0);
 
@@ -751,7 +751,7 @@ TEST(restrict_archs) {
                 assert_se(s = set_new(NULL));
 
 #ifdef __x86_64__
-                assert_se(set_put(s, UINT32_TO_PTR(SCMP_ARCH_X86+1)) >= 0);
+                ASSERT_OK(set_put(s, UINT32_TO_PTR(SCMP_ARCH_X86+1)));
 #endif
                 assert_se(seccomp_restrict_archs(s) >= 0);
 
@@ -901,7 +901,7 @@ TEST(native_syscalls_filtered) {
                 /* Passing "native" or an empty set is equivalent, just do both here. */
                 assert_se(arch_s = set_new(NULL));
                 assert_se(seccomp_restrict_archs(arch_s) >= 0);
-                assert_se(set_put(arch_s, SCMP_ARCH_NATIVE) >= 0);
+                ASSERT_OK(set_put(arch_s, (void*) SCMP_ARCH_NATIVE));
                 assert_se(seccomp_restrict_archs(arch_s) >= 0);
 
                 assert_se(access("/", F_OK) >= 0);
index 37eb56eed55a6d0486252de04dbd0c7e560b459f..5543813f2d86f806db7b8b72dc397ca9352eb967 100644 (file)
@@ -1,6 +1,9 @@
 /* SPDX-License-Identifier: LGPL-2.1-or-later */
 %{
 _Pragma("GCC diagnostic ignored \"-Wimplicit-fallthrough\"")
+#if __GNUC__ >= 15
+_Pragma("GCC diagnostic ignored \"-Wzero-as-null-pointer-constant\"")
+#endif
 #include <stddef.h>
 #include "conf-parser.h"
 #include "timesyncd-conf.h"
index 6d2f3606b8bfb4c787be81c9413f807e1d13c47e..fc34e4bd809d14a2850cabacb9bf67ecd54ecf56 100755 (executable)
@@ -7,6 +7,9 @@ awk '
     BEGIN {
         print "%{\n\
 _Pragma(\"GCC diagnostic ignored \\\"-Wimplicit-fallthrough\\\"\")\n\
+#if __GNUC__ >= 15\n\
+_Pragma(\"GCC diagnostic ignored \\\"-Wzero-as-null-pointer-constant\\\"\")\n\
+#endif\n\
 %}"
         print "struct key_name { const char* name; unsigned short id; };"
         print "%null-strings"
index a313818e01722c167949546e0958c88d47e96e2d..61e7d624101ae25ab0e1c6f1aa0a0ecd9980752d 100644 (file)
@@ -1,6 +1,9 @@
 /* SPDX-License-Identifier: LGPL-2.1-or-later */
 %{
 _Pragma("GCC diagnostic ignored \"-Wimplicit-fallthrough\"")
+#if __GNUC__ >= 15
+_Pragma("GCC diagnostic ignored \"-Wzero-as-null-pointer-constant\"")
+#endif
 #include <stddef.h>
 #include "conf-parser.h"
 #include "ethtool-util.h"
index 74057f6593bb021d56cc1d9aa70adddce0340bf4..e47c3761d0b26f2fc6101faf237a13583a7d6c00 100644 (file)
@@ -98,7 +98,7 @@ static int show_user(UserRecord *ur, Table *table) {
                 break;
 
         case OUTPUT_JSON:
-                sd_json_variant_dump(ur->json, arg_json_format_flags, NULL, 0);
+                sd_json_variant_dump(ur->json, arg_json_format_flags, NULL, NULL);
                 break;
 
         case OUTPUT_FRIENDLY:
@@ -540,7 +540,7 @@ static int show_group(GroupRecord *gr, Table *table) {
         }
 
         case OUTPUT_JSON:
-                sd_json_variant_dump(gr->json, arg_json_format_flags, NULL, 0);
+                sd_json_variant_dump(gr->json, arg_json_format_flags, NULL, NULL);
                 break;
 
         case OUTPUT_FRIENDLY:
index e2d6e30b7a8242dc0e28ebcfc29b62fa0427ad23..1e22a6140612d488579d3622e2e5e73d7e67d4fe 100755 (executable)
@@ -17,6 +17,9 @@ if __name__ == '__main__':
     print("""\
 %{
 _Pragma("GCC diagnostic ignored \\"-Wimplicit-fallthrough\\"")
+#if __GNUC__ >= 15
+_Pragma("GCC diagnostic ignored \\"-Wzero-as-null-pointer-constant\\"")
+#endif
 %}""")
     print(f"""\
 struct {name}_name {{ const char* name; int id; }};