From 1701a40dca37f016516846ffd7fb7aff62399156 Mon Sep 17 00:00:00 2001 From: hyung-hwan Date: Wed, 19 Aug 2020 04:33:18 +0000 Subject: [PATCH] removed the do..while wrapper from HAWK_STATIC_ASSERT --- hawk/lib/hawk-cmn.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hawk/lib/hawk-cmn.h b/hawk/lib/hawk-cmn.h index 4d99d1bf..3645cc70 100644 --- a/hawk/lib/hawk-cmn.h +++ b/hawk/lib/hawk-cmn.h @@ -137,7 +137,7 @@ #elif defined(__cplusplus) || (defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L)) # define HAWK_STATIC_ASSERT(expr) typedef char HAWK_STATIC_JOIN(HAWK_STATIC_ASSERT_T_, __LINE__)[(expr)? 1: -1] HAWK_UNUSED #else -# define HAWK_STATIC_ASSERT(expr) do { typedef char HAWK_STATIC_JOIN(HAWK_STATIC_ASSERT_T_, __LINE__)[(expr)? 1: -1] HAWK_UNUSED; } while(0) +# define HAWK_STATIC_ASSERT(expr) typedef char HAWK_STATIC_JOIN(HAWK_STATIC_ASSERT_T_, __LINE__)[(expr)? 1: -1] HAWK_UNUSED #endif #define HAWK_STATIC_ASSERT_EXPR(expr) ((void)HAWK_SIZEOF(char[(expr)? 1: -1]))