/*****************************************************************************/
/* */
-/* check.h */
+/* check.h */
/* */
-/* Assert like macros */
+/* Assert like macros */
/* */
/* */
/* */
-extern const char* MsgInternalError; /* "Internal error: " */
-extern const char* MsgPrecondition; /* "Precondition violated: " */
-extern const char* MsgCheckFailed; /* "Check failed: " */
-extern const char* MsgProgramAborted; /* "Program aborted: " */
+extern const char* MsgInternalError; /* "Internal error: " */
+extern const char* MsgPrecondition; /* "Precondition violated: " */
+extern const char* MsgCheckFailed; /* "Check failed: " */
+extern const char* MsgProgramAborted; /* "Program aborted: " */
extern void (*CheckFailed) (const char* Msg, const char* Cond,
- const char* File, unsigned Line)
- attribute ((noreturn));
+ const char* File, unsigned Line)
+ attribute ((noreturn));
/* Function pointer that is called from check if the condition code is true. */
#define ABORT(s) CheckFailed (MsgProgramAborted, s, __FILE__, __LINE__)
/* Use this one instead of FAIL if there is no internal program error but an
- * error condition that is caused by the user or operating system (FAIL and
- * ABORT are essentially the same but the message differs).
- */
+** error condition that is caused by the user or operating system (FAIL and
+** ABORT are essentially the same but the message differs).
+*/
#define PRECONDITION(c) \
- ((c)? 0 : (CheckFailed (MsgPrecondition, #c, __FILE__, __LINE__), 0))
+ ((void) ((c)? 0 : (CheckFailed (MsgPrecondition, #c, __FILE__, __LINE__), 0)))
-#define CHECK(c) \
- ((c)? 0 : (CheckFailed (MsgCheckFailed, #c, __FILE__, __LINE__), 0))
+#define CHECK(c) \
+ ((void) ((c)? 0 : (CheckFailed (MsgCheckFailed, #c, __FILE__, __LINE__), 0)))
/* End of check.h */
-#endif
-
-
+#endif