From f3a0ff821da765c4d8f7e904ecb90ff13c348e30 Mon Sep 17 00:00:00 2001 From: firewave Date: Wed, 18 Sep 2024 13:23:16 +0200 Subject: [PATCH] test/cfg: simplified MacOS preprocessor checks --- test/cfg/gnu.c | 4 ++-- test/cfg/posix.c | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/test/cfg/gnu.c b/test/cfg/gnu.c index 7ed8e3cf0c50..40af39944ae7 100644 --- a/test/cfg/gnu.c +++ b/test/cfg/gnu.c @@ -23,7 +23,7 @@ #include #include #include -#if !defined(__CYGWIN__) && !(defined(__APPLE__) && defined(__MACH__)) +#if !defined(__CYGWIN__) && !defined(__APPLE__) #include #endif #include @@ -492,7 +492,7 @@ void leakReturnValNotUsed() return; } -#if !defined(__CYGWIN__) && !(defined(__APPLE__) && defined(__MACH__)) +#if !defined(__CYGWIN__) && !defined(__APPLE__) int nullPointer_epoll_ctl(int epfd, int op, int fd, struct epoll_event *event) { // no warning is expected diff --git a/test/cfg/posix.c b/test/cfg/posix.c index 8823a977926b..666706dad577 100644 --- a/test/cfg/posix.c +++ b/test/cfg/posix.c @@ -39,7 +39,7 @@ #if defined(__APPLE__) #include #endif -#if !(defined(__APPLE__) && defined(__MACH__)) +#if !defined(__APPLE__) #include #endif #include @@ -49,7 +49,7 @@ #include -#if !(defined(__APPLE__) && defined(__MACH__)) +#if !defined(__APPLE__) void nullPointer_mq_timedsend(mqd_t mqdes, const char* msg_ptr, size_t msg_len, unsigned msg_prio, const struct timespec* abs_timeout) { // cppcheck-suppress nullPointer (void) mq_timedsend(mqdes, NULL, msg_len, msg_prio, abs_timeout); @@ -171,7 +171,7 @@ int nullPointer_getopt(int argc, char* const argv[], const char* optstring) return getopt(argc, argv, optstring); } -#if !(defined(__APPLE__) && defined(__MACH__)) +#if !defined(__APPLE__) int invalidFunctionArgStr_mq_send(mqd_t mqdes, const char *msg_ptr, size_t msg_len, unsigned msg_prio) { // No warning is expected for: