Replace *CTASSERT() with _Static_assert()

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Closes #12993
This commit is contained in:
наб
2022-01-21 18:01:55 +01:00
committed by Brian Behlendorf
parent 7ada752a93
commit c70bb2f610
11 changed files with 72 additions and 66 deletions
-8
View File
@@ -111,14 +111,6 @@ do { \
#undef assert
#endif
/* Compile time assert */
#define CTASSERT_GLOBAL(x) _CTASSERT(x, __LINE__)
#define CTASSERT(x) { _CTASSERT(x, __LINE__); }
#define _CTASSERT(x, y) __CTASSERT(x, y)
#define __CTASSERT(x, y) \
typedef char __attribute__((unused)) \
__compile_time_assertion__ ## y[(x) ? 1 : -1]
#ifdef NDEBUG
#define ASSERT3B(x, y, z) \
((void) sizeof ((uintptr_t)(x)), (void) sizeof ((uintptr_t)(z)))