mirror of
https://github.com/opnsense/src.git
synced 2026-05-28 04:12:45 -04:00
Reimplement CTASSERT() using _Static_assert().
This commit is contained in:
parent
e2da149583
commit
867cb545da
1 changed files with 2 additions and 4 deletions
|
|
@ -92,10 +92,8 @@ enum VM_GUEST { VM_GUEST_NO = 0, VM_GUEST_VM, VM_GUEST_XEN };
|
|||
} while (0)
|
||||
#endif
|
||||
|
||||
#ifndef CTASSERT /* Allow lint to override */
|
||||
#define CTASSERT(x) _CTASSERT(x, __LINE__)
|
||||
#define _CTASSERT(x, y) __CTASSERT(x, y)
|
||||
#define __CTASSERT(x, y) typedef char __assert ## y[(x) ? 1 : -1]
|
||||
#ifndef CTASSERT /* Allow lint to override */
|
||||
#define CTASSERT(x) _Static_assert(x, "compile-time assertion failed")
|
||||
#endif
|
||||
|
||||
/*
|
||||
|
|
|
|||
Loading…
Reference in a new issue