Browse Source

removed GCC warnings when NDEBUG

master
Mathieu Serandour 9 months ago
parent
commit
be97fe7808
  1. 3
      kernel/lib/assert.h

3
kernel/lib/assert.h

@ -10,7 +10,8 @@ void __assert(const char* __restrict__ expression,
#define assert_aligned(ADDR, ALIGNMENT) assert(((uint64_t)(ADDR) & ((ALIGNMENT)-1)) == 0)
#else
#define assert(EX)
#define assert(x) do { (void)sizeof(x);} while (0)
#define assert_aligned(ADDR, ALIGNMENT)
#endif
#define static_assert(EX) _Static_assert((EX), #EX)

Loading…
Cancel
Save