From 858df113bfac4d2ebb60c3fac1538e07d56096b0 Mon Sep 17 00:00:00 2001 From: Rich Felker Date: Wed, 17 Oct 2012 02:47:11 -0400 Subject: [PATCH] assert() is supposed to have type void --- include/assert.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/assert.h b/include/assert.h index b0dc692c..c64d3e52 100644 --- a/include/assert.h +++ b/include/assert.h @@ -5,7 +5,7 @@ #ifdef NDEBUG #define assert(x) (void)0 #else -#define assert(x) ((x) || (__assert_fail(#x, __FILE__, __LINE__, __func__),0)) +#define assert(x) ((void)((x) || (__assert_fail(#x, __FILE__, __LINE__, __func__),0))) #endif #ifdef __cplusplus -- 2.25.1