From b46413647fa0be35273b787bab687458e28dc584 Mon Sep 17 00:00:00 2001 From: amallia Date: Thu, 15 Jun 2017 20:33:23 +0100 Subject: [PATCH] Assert statement calls a function which has side effects --- async.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/async.c b/async.c index d955203..ac343b5 100644 --- a/async.c +++ b/async.c @@ -336,7 +336,8 @@ static void __redisAsyncDisconnect(redisAsyncContext *ac) { if (ac->err == 0) { /* For clean disconnects, there should be no pending callbacks. */ - assert(__redisShiftCallback(&ac->replies,NULL) == REDIS_ERR); + int ret = __redisShiftCallback(&ac->replies,NULL); + assert(ret == REDIS_ERR); } else { /* Disconnection is caused by an error, make sure that pending * callbacks cannot call new commands. */