Commit f59570db authored by Rob Shearman's avatar Rob Shearman Committed by Alexandre Julliard

include: Fix the C_ASSERT macro to not generate an unused variable warning when compiling with gcc.

Provide a fallback case for other compilers to avoid C_ASSERT being undefined and causing an error.
parent 8608e895
......@@ -282,7 +282,9 @@ extern "C" {
#if defined(_MSC_VER)
# define C_ASSERT(e) typedef char __C_ASSERT__[(e)?1:-1]
#elif defined(__GNUC__)
# define C_ASSERT(e) extern char __C_ASSERT__[(e)?1:-1]
# define C_ASSERT(e) extern char __C_ASSERT__[(e)?1:-1] __attribute__((unused))
#else
# define C_ASSERT(e)
#endif
/* Eliminate Microsoft C/C++ compiler warning 4715 */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment