diff options
author | antirez <antirez@gmail.com> | 2012-04-24 11:11:55 +0200 |
---|---|---|
committer | antirez <antirez@gmail.com> | 2012-04-29 17:20:56 +0200 |
commit | 63bae7c55382985b571457d01223bd2856856db9 (patch) | |
tree | ff68a467339d062d4c51823286a98e17bfebdcf9 | |
parent | 379ac85eed32da84588251cd8bf29d255a0e870f (diff) | |
download | redis-63bae7c55382985b571457d01223bd2856856db9.tar.gz |
A few compiler warnings suppressed.
-rw-r--r-- | src/redis-cli.c | 4 | ||||
-rw-r--r-- | src/t_zset.c | 4 |
2 files changed, 5 insertions, 3 deletions
diff --git a/src/redis-cli.c b/src/redis-cli.c index 06f51326d..c8992df97 100644 --- a/src/redis-cli.c +++ b/src/redis-cli.c @@ -800,7 +800,7 @@ static int noninteractive(int argc, char **argv) { static void latencyMode(void) { redisReply *reply; - long long start, latency, min, max, tot, count = 0; + long long start, latency, min = 0, max = 0, tot = 0, count = 0; double avg; if (!context) exit(1); @@ -887,7 +887,7 @@ static void slaveMode(void) { static void findBigKeys(void) { unsigned long long biggest[5] = {0,0,0,0,0}; unsigned long long samples = 0; - redisReply *reply1, *reply2, *reply3; + redisReply *reply1, *reply2, *reply3 = NULL; char *sizecmd, *typename[] = {"string","list","set","hash","zset"}; int type; diff --git a/src/t_zset.c b/src/t_zset.c index c3fe16e1f..081f671a8 100644 --- a/src/t_zset.c +++ b/src/t_zset.c @@ -1261,7 +1261,9 @@ int zuiNext(zsetopsrc *op, zsetopval *val) { if (op->type == REDIS_SET) { iterset *it = &op->iter.set; if (op->encoding == REDIS_ENCODING_INTSET) { - if (!intsetGet(it->is.is,it->is.ii,(int64_t*)&val->ell)) + int64_t ell = val->ell; + + if (!intsetGet(it->is.is,it->is.ii,&ell)) return 0; val->score = 1.0; |