From ef85bdaffbc878b44b24f01e97f7c7e7301c6dfe Mon Sep 17 00:00:00 2001 From: Ben Noordhuis Date: Fri, 12 Apr 2013 19:37:52 +0200 Subject: [PATCH] unix: silence STATIC_ASSERT compiler warnings Newer versions of gcc complain about the definition of the zero element array. Squelch that warning by turning it into a one element array. --- src/unix/internal.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/unix/internal.h b/src/unix/internal.h index 899c972b0..61cb1ec1f 100644 --- a/src/unix/internal.h +++ b/src/unix/internal.h @@ -46,7 +46,7 @@ #endif #define STATIC_ASSERT(expr) \ - void uv__static_assert(int static_assert_failed[0 - !(expr)]) + void uv__static_assert(int static_assert_failed[1 - 2 * !(expr)]) #define ACCESS_ONCE(type, var) \ (*(volatile type*) &(var))