diff options
author | Nick Mathewson <nickm@torproject.org> | 2018-11-06 15:41:14 -0500 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2018-11-06 15:41:14 -0500 |
commit | 3c9dd9ef2d86463e535952528bc5151ce499a74f (patch) | |
tree | 62e3675c96371e21c179e4f67792d46d254c247a /src/lib/cc | |
parent | e69a4ad6b321dbdb63236687ac8924c301c60f9d (diff) | |
download | tor-3c9dd9ef2d86463e535952528bc5151ce499a74f.tar.gz tor-3c9dd9ef2d86463e535952528bc5151ce499a74f.zip |
Add parentheses to the ctassert macro expansions
Diffstat (limited to 'src/lib/cc')
-rw-r--r-- | src/lib/cc/ctassert.h | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/lib/cc/ctassert.h b/src/lib/cc/ctassert.h index 7307bca53a..5a1b137cba 100644 --- a/src/lib/cc/ctassert.h +++ b/src/lib/cc/ctassert.h @@ -43,7 +43,7 @@ #if __STDC_VERSION__ >= 201112L /* If C11 is available, just use _Static_assert. */ -#define CTASSERT(x) _Static_assert(x, #x) +#define CTASSERT(x) _Static_assert((x), #x) #else @@ -59,11 +59,12 @@ * error. */ #if defined(__COUNTER__) -#define CTASSERT(x) CTASSERT_EXPN(x, c, __COUNTER__) +#define CTASSERT(x) CTASSERT_EXPN((x), c, __COUNTER__) #elif defined(__INCLUDE_LEVEL__) -#define CTASSERT(x) CTASSERT_EXPN(x, __INCLUDE_LEVEL__, __LINE__) +#define CTASSERT(x) CTASSERT_EXPN((x), __INCLUDE_LEVEL__, __LINE__) #else -#define CTASSERT(x) CTASSERT_EXPN(x, l, __LINE__) /* hope it's unique enough */ +/* hope it's unique enough */ +#define CTASSERT(x) CTASSERT_EXPN((x), l, __LINE__) #endif #define CTASSERT_EXPN(x, a, b) CTASSERT_DECL(x, a, b) |