Commit 2139f78c authored by not-a-robot's avatar not-a-robot
Browse files

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;
   ^
```
parents 1b8ed388 8a5fdf0c
...@@ -328,12 +328,12 @@ static void test_reply_reader(void) { ...@@ -328,12 +328,12 @@ static void test_reply_reader(void) {
} }
static void test_free_null(void) { static void test_free_null(void) {
void *redisContext = NULL; void *redisCtx = NULL;
void *reply = NULL; void *reply = NULL;
test("Don't fail when redisFree is passed a NULL value: "); test("Don't fail when redisFree is passed a NULL value: ");
redisFree(redisContext); redisFree(redisCtx);
test_cond(redisContext == NULL); test_cond(redisCtx == NULL);
test("Don't fail when freeReplyObject is passed a NULL value: "); test("Don't fail when freeReplyObject is passed a NULL value: ");
freeReplyObject(reply); freeReplyObject(reply);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment