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 /src/nss-systemd/nss-systemd.c | |
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 'src/nss-systemd/nss-systemd.c')
-rw-r--r-- | src/nss-systemd/nss-systemd.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/nss-systemd/nss-systemd.c b/src/nss-systemd/nss-systemd.c index d686d920fc..683352fab9 100644 --- a/src/nss-systemd/nss-systemd.c +++ b/src/nss-systemd/nss-systemd.c @@ -101,6 +101,9 @@ typedef struct GetentData { bool by_membership; } GetentData; +/* On current glibc PTHREAD_MUTEX_INITIALIZER is defined in a way incompatible with + * -Wzero-as-null-pointer-constant, work around this for now. */ +DISABLE_WARNING_ZERO_AS_NULL_POINTER_CONSTANT; static GetentData getpwent_data = { .mutex = PTHREAD_MUTEX_INITIALIZER, }; @@ -116,6 +119,7 @@ static GetentData getspent_data = { static GetentData getsgent_data = { .mutex = PTHREAD_MUTEX_INITIALIZER, }; +REENABLE_WARNING; static void setup_logging_once(void) { static pthread_once_t once = PTHREAD_ONCE_INIT; |