Fixed a few warnings compiling on Linux.

This commit is contained in:
antirez 2011-10-23 10:57:01 +02:00
parent 9e6a9f30ea
commit f013f40003
4 changed files with 7 additions and 3 deletions

View File

@ -439,7 +439,7 @@ void clusterProcessGossipSection(clusterMsg *hdr, clusterLink *link) {
* time PONG figure if it is newer than our figure. * time PONG figure if it is newer than our figure.
* Note that it's not a problem if we have a PING already * Note that it's not a problem if we have a PING already
* in progress against this node. */ * 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"); redisLog(REDIS_DEBUG,"Node pong_received updated by gossip");
node->pong_received = ntohl(g->pong_received); node->pong_received = ntohl(g->pong_received);
} }

View File

@ -1,4 +1,6 @@
#include "fmacros.h"
#include <string.h> #include <string.h>
#include <stdio.h>
#include "rio.h" #include "rio.h"
#include "util.h" #include "util.h"

View File

@ -929,7 +929,7 @@ void zaddGenericCommand(redisClient *c, int incr) {
} else { } else {
znode = zslInsert(zs->zsl,score,ele); znode = zslInsert(zs->zsl,score,ele);
incrRefCount(ele); /* Inserted in skiplist. */ 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. */ incrRefCount(ele); /* Added to dictionary. */
signalModifiedKey(c->db,key); signalModifiedKey(c->db,key);

View File

@ -489,7 +489,9 @@ static unsigned char *__ziplistInsert(unsigned char *zl, unsigned char *p, unsig
size_t offset; size_t offset;
int nextdiff = 0; int nextdiff = 0;
unsigned char encoding = 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; zlentry entry, tail;
/* Find out prevlen for the entry that is inserted. */ /* Find out prevlen for the entry that is inserted. */