diff --git a/configure.ac b/configure.ac index ee6bd9af7..9dc6d8199 100644 --- a/configure.ac +++ b/configure.ac @@ -1157,7 +1157,11 @@ fi NM_COMPILER_WARNINGS(AM_CFLAGS, ${more_warnings_default}) -NM_COMPILER_WARNING_FLAG(LIBSYSTEMD_NM_CFLAGS, "-Wno-gnu-variable-sized-type-not-at-end") +for w in \ + -Wno-nonnull-compare \ + ; do + NM_COMPILER_WARNING_FLAG(LIBSYSTEMD_NM_CFLAGS, "$w") +done AC_SUBST(LIBSYSTEMD_NM_CFLAGS) CC_CHECK_FLAGS_APPEND([with_cflags], [CFLAGS], [\ diff --git a/src/libnm-systemd-core/meson.build b/src/libnm-systemd-core/meson.build index 6175e42c4..7e700e646 100644 --- a/src/libnm-systemd-core/meson.build +++ b/src/libnm-systemd-core/meson.build @@ -28,6 +28,7 @@ libnm_systemd_core = static_library( top_inc, src_inc, ], + c_args: libnm_systemd_common_cflags, dependencies: [ libnm_systemd_shared_dep_inc, glib_dep, diff --git a/src/libnm-systemd-shared/meson.build b/src/libnm-systemd-shared/meson.build index b32bd7f6e..3e5d1db85 100644 --- a/src/libnm-systemd-shared/meson.build +++ b/src/libnm-systemd-shared/meson.build @@ -58,6 +58,7 @@ libnm_systemd_shared = static_library( top_inc, src_inc, ], + c_args: libnm_systemd_common_cflags, dependencies: glib_dep, ) diff --git a/src/meson.build b/src/meson.build index 92e95e68e..ceeee6a02 100644 --- a/src/meson.build +++ b/src/meson.build @@ -69,6 +69,14 @@ libn_dhcp4 = static_library( ############################################################################### +libnm_systemd_common_cflags = [ ] + +libnm_systemd_common_cflags += cc.get_supported_arguments([ + '-Wno-nonnull-compare', +]) + +############################################################################### + subdir('libnm-std-aux') subdir('libnm-glib-aux') subdir('libnm-log-null')