From: cuz Date: Wed, 18 Sep 2002 20:15:49 +0000 (+0000) Subject: assert() must be an expression of type void X-Git-Tag: V2.12.0~2232 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=b2e06dbb9d1e6ed8381a8d9d67365788ffaf6fef;p=cc65 assert() must be an expression of type void git-svn-id: svn://svn.cc65.org/cc65/trunk@1396 b7a2c559-68d2-44c3-8de9-860c34a00d81 --- diff --git a/include/assert.h b/include/assert.h index 04e1fab64..bd58e2068 100644 --- a/include/assert.h +++ b/include/assert.h @@ -43,7 +43,7 @@ # define assert(expr) #else extern void _afailed (const char*, unsigned); -# define assert(expr) if ((expr) == 0) _afailed (__FILE__, __LINE__) +# define assert(expr) ((expr)? (void)0 : _afailed(__FILE__, __LINE__)) #endif