Clean-up: fix '-Wundef' warnings on various platforms
authorMichael Jeanson <mjeanson@efficios.com>
Wed, 16 Mar 2022 15:46:49 +0000 (11:46 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Thu, 17 Mar 2022 17:17:13 +0000 (13:17 -0400)
Change-Id: I8dfffd2ad5eb55a0b8fe74d29a82a224da19f30a
Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
src/common/compat/poll.h
tests/utils/tap/tap.h
tests/utils/testapp/gen-syscall-events-callstack/gen-syscall-events-callstack.c

index 8e99a3150ddaa53691d9198b1be477b4f34dc7ab..f9fb33fc9f8c2405bac7f1b999d05f5385799bce 100644 (file)
@@ -235,7 +235,7 @@ enum {
        LPOLLRDBAND = POLLRDBAND,
        LPOLLWRNORM = POLLWRNORM,
        LPOLLWRBAND = POLLWRBAND,
-#if __linux__
+#ifdef __linux__
        LPOLLMSG = POLLMSG,
        LPOLLRDHUP = POLLRDHUP,
 #elif (defined(__FreeBSD__) || defined(__CYGWIN__) || defined(__sun__) || defined(__APPLE__))
index bba1ceadc0889f1ab886081207e7414e65f5a5e6..bc6745a73862040006ab51712ff48ade74d628bb 100644 (file)
@@ -32,7 +32,7 @@ extern "C" {
                        skip(n, fmt, ## __VA_ARGS__);   \
                        continue;                       \
                }
-#elif __STDC_VERSION__ >= 199901L /* __GNUC__ */
+#elif defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L) /* __GNUC__ */
 # define ok(e, ...) ((e) ?                                             \
                     _gen_result(1, __func__, __FILE__, __LINE__,       \
                                 __VA_ARGS__) :                         \
index c7340cb140e24335cd75b597152bc00abc4c4787..9d3e030b7f2c0079169a51c34983e14e612e1e84 100644 (file)
@@ -45,7 +45,7 @@ my_gettid(void)
         : "0"(__NR_gettid)
         : "cc", "rcx", "r11", "memory"
     );
-#elif __i386
+#elif defined(__i386)
     asm volatile
     (
         "int $0x80"
This page took 0.034331 seconds and 5 git commands to generate.