crash() replaced by ASSERT() & NOTREACHED() in lint

This commit is contained in:
dick
1988-09-26 11:37:38 +00:00
parent 6ac1c9b938
commit 74e032ef1f
7 changed files with 62 additions and 62 deletions

View File

@@ -14,8 +14,11 @@
#ifdef DEBUG
/* Note: this macro uses parameter substitution inside strings */
#define ASSERT(exp) (exp || crash("in %s, %u: assertion %s failed", \
#define ASSERT(exp) (exp || crash("in %s, %u: assertion %s failed", \
__FILE__, __LINE__, "exp"))
#define NOTREACHED() crash("in %s, %u: unreachable statement reached", \
__FILE__, __LINE__)
#else
#define ASSERT(exp)
#define NOTREACHED()
#endif DEBUG