common: Add support for compile time assertions.
(Allows us to check header lengths are sane)
This commit is contained in:
parent
3407c7ce22
commit
a0ca92d25b
|
@ -109,6 +109,9 @@
|
|||
/* To cheat the compiler */
|
||||
#define UNUSED(expr) do { (void)(expr); } while (0)
|
||||
|
||||
/* Compile-time assertions */
|
||||
#define STATIC_ASSERT(test_for_true) _Static_assert((test_for_true), "(" #test_for_true ") failed")
|
||||
|
||||
/* IEEE1284 ID processing */
|
||||
struct deviceid_dict {
|
||||
char *key;
|
||||
|
|
Loading…
Reference in a new issue