]> git.ipfire.org Git - thirdparty/systemd.git/commit
fundamental-macro: conditionalize several gcc warning pragmas 36051/head
authorYu Watanabe <watanabe.yu+github@gmail.com>
Thu, 16 Jan 2025 19:27:36 +0000 (04:27 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Thu, 16 Jan 2025 19:35:09 +0000 (04:35 +0900)
commit9c881fa867f184e80293ee86974f2c0c0b5fb7a3
treeabae437c4a5f2c8713a575c4003c2c5a505dde96
parent83a3018e20d7e637e662fb98e05b41162aef54ac
fundamental-macro: conditionalize several gcc warning pragmas

This fixes the following error:

In file included from ../src/basic/macro.h:13,
                 from ../src/basic/env-util.h:9,
                 from ../src/nss-systemd/nss-systemd.c:7:
../src/fundamental/macro-fundamental.h:61:9: error: option ‘-Wzero-as-null-pointer-constant’ is valid for C++/ObjC++ but not for C [-Werror=pragmas]
   61 |         _Pragma("GCC diagnostic ignored \"-Wzero-as-null-pointer-constant\"")
      |         ^~~~~~~
../src/nss-systemd/nss-systemd.c:106:1: note: in expansion of macro ‘DISABLE_WARNING_ZERO_AS_NULL_POINTER_CONSTANT’
  106 | DISABLE_WARNING_ZERO_AS_NULL_POINTER_CONSTANT;
      | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
meson.build
src/boot/meson.build
src/fundamental/macro-fundamental.h