mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-22 02:27:36 +03:00
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:
@@ -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)))
|
||||
|
||||
Reference in New Issue
Block a user