From 5003906d633dd4b96a3a60d1f63188ffaca3140e Mon Sep 17 00:00:00 2001 From: Michael Grunder Date: Fri, 31 Jul 2020 13:23:28 -0700 Subject: [PATCH] Define a no op assert if we detect NDEBUG (#861) Addresses #642 --- async.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/async.c b/async.c index 020cb09..18a4a09 100644 --- a/async.c +++ b/async.c @@ -47,6 +47,11 @@ #include "async_private.h" +#ifdef NDEBUG +#undef assert +#define assert(e) (void)(e) +#endif + /* Forward declarations of hiredis.c functions */ int __redisAppendCommand(redisContext *c, const char *cmd, size_t len); void __redisSetError(redisContext *c, int type, const char *str);