diff options
author | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2025-01-16 22:41:31 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-01-16 22:41:31 +0100 |
commit | 4e97e697c048786c02ece100ec975e5c5b011358 (patch) | |
tree | cf612179f7c1b461a52e11810439356b148f1bf3 /meson.build | |
parent | Two readme tweaks (#36053) (diff) | |
parent | fundamental-macro: conditionalize several gcc warning pragmas (diff) | |
download | systemd-4e97e697c048786c02ece100ec975e5c5b011358.tar.xz systemd-4e97e697c048786c02ece100ec975e5c5b011358.zip |
Several fixlets for GCC warnings (#36051)
Replaces #36043 and #36039.
Diffstat (limited to 'meson.build')
-rw-r--r-- | meson.build | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/meson.build b/meson.build index 9e1963970c..617d6d2452 100644 --- a/meson.build +++ b/meson.build @@ -516,9 +516,6 @@ add_project_link_arguments( userspace_c_args += cc.get_supported_arguments(possible_cc_flags) userspace_c_ld_args += cc.get_supported_link_arguments(possible_link_flags) -have = cc.has_argument('-Wzero-length-bounds') -conf.set10('HAVE_ZERO_LENGTH_BOUNDS', have) - if cc.compiles(''' #include <time.h> #include <inttypes.h> @@ -538,14 +535,19 @@ endif cpp = ' '.join(cc.cmd_array() + get_option('c_args')) + ' -E' -has_wstringop_truncation = cc.has_argument('-Wstringop-truncation') +# new in GCC 10 +have = cc.has_argument('-Wzero-length-bounds') +conf.set10('HAVE_WARNING_ZERO_LENGTH_BOUNDS', have) + +# new in GCC 15 +have = cc.has_argument('-Wzero-as-null-pointer-constant') +conf.set10('HAVE_WARNING_ZERO_AS_NULL_POINTER_CONSTANT', have) ##################################################################### # compilation result tests conf.set('_GNU_SOURCE', 1) conf.set('__SANE_USERSPACE_TYPES__', true) -conf.set10('HAVE_WSTRINGOP_TRUNCATION', has_wstringop_truncation) conf.set('SIZEOF_DEV_T', cc.sizeof('dev_t', prefix : '#include <sys/types.h>')) conf.set('SIZEOF_INO_T', cc.sizeof('ino_t', prefix : '#include <sys/types.h>')) |