summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornot-a-robot <not-a-robot@rediger.net>2016-04-20 15:01:17 +0200
committernot-a-robot <not-a-robot@rediger.net>2016-04-20 15:01:17 +0200
commit2139f78c71a9ebfcfad27d8e7d5b6689d95aee78 (patch)
tree2b53b6de094d63613af6850e3bfe5a06af0a0daa
parent1b8ed38843319e17c54021a3b2a9b496159ebdcb (diff)
parent8a5fdf0c9eeefa7bdaac3af9ae21018ad9c2c23d (diff)
Auto merge of #409 - xor-gate:fix-shadow-in-test, r=badboy
test.c: Fix shadowed name with typedef when compiling with -Wshadow Fixes: ``` /data/files/users/jerry/github/hiredis/test.c: In function 'test_free_null': /data/files/users/jerry/github/hiredis/test.c:331:11: warning: declaration of 'redisContext' shadows a global declaration [-Wshadow] void *redisContext = NULL; ^ In file included from /data/files/users/jerry/github/hiredis/test.c:13:0: /data/files/users/jerry/github/hiredis/hiredis.h:161:3: note: shadowed declaration is here } redisContext; ^ ```
-rw-r--r--test.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/test.c b/test.c
index d5e8217..79148fd 100644
--- a/test.c
+++ b/test.c
@@ -328,12 +328,12 @@ static void test_reply_reader(void) {
}
static void test_free_null(void) {
- void *redisContext = NULL;
+ void *redisCtx = NULL;
void *reply = NULL;
test("Don't fail when redisFree is passed a NULL value: ");
- redisFree(redisContext);
- test_cond(redisContext == NULL);
+ redisFree(redisCtx);
+ test_cond(redisCtx == NULL);
test("Don't fail when freeReplyObject is passed a NULL value: ");
freeReplyObject(reply);