Skip to content

Commit

Permalink
test/cfg: simplified MacOS preprocessor checks
Browse files Browse the repository at this point in the history
  • Loading branch information
firewave committed Sep 18, 2024
1 parent 0355437 commit f3a0ff8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions test/cfg/gnu.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
#include <sys/mman.h>
#include <sys/sem.h>
#include <wchar.h>
#if !defined(__CYGWIN__) && !(defined(__APPLE__) && defined(__MACH__))
#if !defined(__CYGWIN__) && !defined(__APPLE__)
#include <sys/epoll.h>
#endif
#include <strings.h>
Expand Down Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions test/cfg/posix.c
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
#if defined(__APPLE__)
#include <xlocale.h>
#endif
#if !(defined(__APPLE__) && defined(__MACH__))
#if !defined(__APPLE__)
#include <mqueue.h>
#endif
#include <stdlib.h>
Expand All @@ -49,7 +49,7 @@
#include <utime.h>


#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);
Expand Down Expand Up @@ -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:
Expand Down

0 comments on commit f3a0ff8

Please sign in to comment.