summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorzhaozhao.zz <zhaozhao.zz@alibaba-inc.com>2018-06-28 17:22:59 +0800
committerzhaozhao.zz <zhaozhao.zz@alibaba-inc.com>2018-06-28 17:22:59 +0800
commit1fcf2737a63cfa0fba4ebc0802fff8e237855ddf (patch)
treeda6ef25fa731ecad9172805fec746b4838aa7445
parentab55f9da5eb10aabd78304941903e8657aa210e6 (diff)
downloadredis-1fcf2737a63cfa0fba4ebc0802fff8e237855ddf.tar.gz
fix some compile warnings
-rw-r--r--src/db.c2
-rw-r--r--src/sentinel.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/db.c b/src/db.c
index 95019cee7..151e948c9 100644
--- a/src/db.c
+++ b/src/db.c
@@ -1400,7 +1400,7 @@ int *georadiusGetKeys(struct redisCommand *cmd, robj **argv, int argc, int *numk
/* XREAD [BLOCK <milliseconds>] [COUNT <count>] [GROUP <groupname> <ttl>]
* STREAMS key_1 key_2 ... key_N ID_1 ID_2 ... ID_N */
int *xreadGetKeys(struct redisCommand *cmd, robj **argv, int argc, int *numkeys) {
- int i, num, *keys;
+ int i, num = 0, *keys;
UNUSED(cmd);
/* We need to parse the options of the command in order to seek the first
diff --git a/src/sentinel.c b/src/sentinel.c
index 512b224e6..c820169af 100644
--- a/src/sentinel.c
+++ b/src/sentinel.c
@@ -3525,7 +3525,7 @@ void sentinelSetCommand(client *c) {
badfmt: /* Bad format errors */
if (changes) sentinelFlushConfig();
addReplyErrorFormat(c,"Invalid argument '%s' for SENTINEL SET '%s'",
- c->argv[badarg]->ptr,option);
+ (char*)c->argv[badarg]->ptr,option);
}
/* Our fake PUBLISH command: it is actually useful only to receive hello messages