Add dummy definitions to Assert* macros for suppressing compiler warnings
main/field.c:968:23: warning: \ suggest braces around empty body in an ‘else’ statement [-Wempty-body] AssertNotReached(); Signed-off-by: Masatake YAMATO <yamato@redhat.com>
This commit is contained in:
parent
99e0f208b2
commit
33a102ee91
@ -28,8 +28,8 @@
|
|||||||
# define DebugStatement(x) x
|
# define DebugStatement(x) x
|
||||||
# define PrintStatus(x) if (debug(DEBUG_STATUS)) printf x;
|
# define PrintStatus(x) if (debug(DEBUG_STATUS)) printf x;
|
||||||
# ifdef NDEBUG
|
# ifdef NDEBUG
|
||||||
# define Assert(c)
|
# define Assert(c) do {} while(0)
|
||||||
# define AssertNotReached()
|
# define AssertNotReached() do {} while(0)
|
||||||
# else
|
# else
|
||||||
/* based on glibc's assert.h __ASSERT_FUNCTION */
|
/* based on glibc's assert.h __ASSERT_FUNCTION */
|
||||||
# if defined (__GNUC__) && (__GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 4))
|
# if defined (__GNUC__) && (__GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 4))
|
||||||
@ -45,8 +45,8 @@
|
|||||||
#else
|
#else
|
||||||
# define DebugStatement(x)
|
# define DebugStatement(x)
|
||||||
# define PrintStatus(x)
|
# define PrintStatus(x)
|
||||||
# define Assert(c)
|
# define Assert(c) do {} while(0)
|
||||||
# define AssertNotReached()
|
# define AssertNotReached() do {} while(0)
|
||||||
# ifndef NDEBUG
|
# ifndef NDEBUG
|
||||||
# define NDEBUG
|
# define NDEBUG
|
||||||
# endif
|
# endif
|
||||||
|
Loading…
x
Reference in New Issue
Block a user