meson: enable -Wzero-as-null-pointer-constant
Support for C added in gcc 15: https://github.com/gcc-mirror/gcc/commit/236c0829ee21a179c81b83f0d7f112ca23c47a4d
This commit is contained in:
@@ -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"
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
@@ -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");
|
||||
|
||||
Reference in New Issue
Block a user