diff --git a/src/debug.c b/src/debug.c index 0a2e6c68..29ae860d 100644 --- a/src/debug.c +++ b/src/debug.c @@ -415,7 +415,7 @@ void _redisAssertPrintClientInfo(redisClient *c) { if (c->argv[j]->type == REDIS_STRING && sdsEncodedObject(c->argv[j])) { arg = (char*) c->argv[j]->ptr; } else { - snprintf(buf,sizeof(buf),"Object type: %d, encoding: %d", + snprintf(buf,sizeof(buf),"Object type: %u, encoding: %u", c->argv[j]->type, c->argv[j]->encoding); arg = buf; } diff --git a/src/redis-cli.c b/src/redis-cli.c index 92e29412..93a09005 100644 --- a/src/redis-cli.c +++ b/src/redis-cli.c @@ -459,7 +459,7 @@ static sds cliFormatReplyTTY(redisReply *r, char *prefix) { _prefix = sdscat(sdsnew(prefix),_prefixlen); /* Setup prefix format for every entry */ - snprintf(_prefixfmt,sizeof(_prefixfmt),"%%s%%%dd) ",idxlen); + snprintf(_prefixfmt,sizeof(_prefixfmt),"%%s%%%ud) ",idxlen); for (i = 0; i < r->elements; i++) { /* Don't use the prefix for the first element, as the parent @@ -1878,7 +1878,7 @@ void bytesToHuman(char *s, long long n) { } if (n < 1024) { /* Bytes */ - sprintf(s,"%lluB",n); + sprintf(s,"%lldB",n); return; } else if (n < (1024*1024)) { d = (double)n/(1024);