diff options
author | antirez <antirez@gmail.com> | 2011-10-23 10:57:01 +0200 |
---|---|---|
committer | antirez <antirez@gmail.com> | 2011-10-23 10:57:01 +0200 |
commit | f013f40003e5709203e31dcba4485f8342e2cccc (patch) | |
tree | ff1f3c1d69a495122dc4c4bf927f54996a3c56d6 | |
parent | 9e6a9f30ea72445740a26599d50ed63a14a59f7f (diff) | |
download | redis-f013f40003e5709203e31dcba4485f8342e2cccc.tar.gz |
Fixed a few warnings compiling on Linux.
-rw-r--r-- | src/cluster.c | 2 | ||||
-rw-r--r-- | src/rio.c | 2 | ||||
-rw-r--r-- | src/t_zset.c | 2 | ||||
-rw-r--r-- | src/ziplist.c | 4 |
4 files changed, 7 insertions, 3 deletions
diff --git a/src/cluster.c b/src/cluster.c index 42b011136..fadce42ea 100644 --- a/src/cluster.c +++ b/src/cluster.c @@ -439,7 +439,7 @@ void clusterProcessGossipSection(clusterMsg *hdr, clusterLink *link) { * time PONG figure if it is newer than our figure. * Note that it's not a problem if we have a PING already * in progress against this node. */ - if (node->pong_received < ntohl(g->pong_received)) { + if (node->pong_received < (signed) ntohl(g->pong_received)) { redisLog(REDIS_DEBUG,"Node pong_received updated by gossip"); node->pong_received = ntohl(g->pong_received); } @@ -1,4 +1,6 @@ +#include "fmacros.h" #include <string.h> +#include <stdio.h> #include "rio.h" #include "util.h" diff --git a/src/t_zset.c b/src/t_zset.c index a7ee18390..5dab64dc0 100644 --- a/src/t_zset.c +++ b/src/t_zset.c @@ -929,7 +929,7 @@ void zaddGenericCommand(redisClient *c, int incr) { } else { znode = zslInsert(zs->zsl,score,ele); incrRefCount(ele); /* Inserted in skiplist. */ - redisAssertWithInfo(c,curobj,dictAdd(zs->dict,ele,&znode->score) == DICT_OK); + redisAssertWithInfo(c,NULL,dictAdd(zs->dict,ele,&znode->score) == DICT_OK); incrRefCount(ele); /* Added to dictionary. */ signalModifiedKey(c->db,key); diff --git a/src/ziplist.c b/src/ziplist.c index f5f9e9a64..639e4b61e 100644 --- a/src/ziplist.c +++ b/src/ziplist.c @@ -489,7 +489,9 @@ static unsigned char *__ziplistInsert(unsigned char *zl, unsigned char *p, unsig size_t offset; int nextdiff = 0; unsigned char encoding = 0; - long long value; + long long value = 123456789; /* initialized to avoid warning. Using a value + that is easy to see if for some reason + we use it uninitialized. */ zlentry entry, tail; /* Find out prevlen for the entry that is inserted. */ |