debug: suppress nonnull-compare warnings in CHECK
This commit is contained in:
parent
654f391cba
commit
1d387ea323
14
debug.hpp
14
debug.hpp
@ -8,6 +8,8 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "platform.hpp"
|
||||
|
||||
//#include "maths.hpp" // XXX: See notes at the end of file for maths.hpp inclusion
|
||||
#include <cmath>
|
||||
#include <algorithm>
|
||||
@ -110,12 +112,24 @@
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
#ifdef COMPILER_GCC
|
||||
#define CHECK(C) do { \
|
||||
_Pragma("GCC diagnostic push") \
|
||||
_Pragma("GCC diagnostic ignored \"-Wnonnull-compare\"") \
|
||||
DEBUG_ONLY ( \
|
||||
if (!(C)) \
|
||||
panic (#C); \
|
||||
); \
|
||||
_Pragma("GCC diagnostic pop") \
|
||||
} while (0)
|
||||
#else
|
||||
#define CHECK(C) do { \
|
||||
DEBUG_ONLY ( \
|
||||
if (!(C)) \
|
||||
panic (#C); \
|
||||
); \
|
||||
} while (0)
|
||||
#endif
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
Loading…
x
Reference in New Issue
Block a user