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.
This commit is contained in:
Ben Noordhuis 2013-04-12 19:37:52 +02:00
parent 5ed1d02cc0
commit ef85bdaffb

View File

@ -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))