summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorantirez <antirez@gmail.com>2014-04-07 08:57:05 +0200
committerantirez <antirez@gmail.com>2014-04-16 15:26:22 +0200
commit2b1385b9ecc0cb3097e6344d7dd2f30f1cbcbcf7 (patch)
treed1dafb233d1570b435e2cf3a085cb3e745d2c6e1
parent12d1d18b590ca02c32c04d541c4d252f65348ec3 (diff)
downloadredis-2b1385b9ecc0cb3097e6344d7dd2f30f1cbcbcf7.tar.gz
Add casting to match printf format.
adjustOpenFilesLimit() and clusterUpdateSlotsWithConfig() that were assuming uint64_t is the same as unsigned long long, which is true probably for all the systems out there that we target, but still GCC emitted a warning since technically they are two different types.
-rw-r--r--src/redis.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/src/redis.c b/src/redis.c
index 4b0ad72e5..f34b648fa 100644
--- a/src/redis.c
+++ b/src/redis.c
@@ -1482,24 +1482,28 @@ void adjustOpenFilesLimit(void) {
redisLog(REDIS_WARNING,"Your current 'ulimit -n' "
"of %llu is not enough for Redis to start. "
"Please increase your open file limit to at least "
- "%llu. Exiting.", oldlimit, maxfiles);
+ "%llu. Exiting.",
+ (unsigned long long) oldlimit,
+ (unsigned long long) maxfiles);
exit(1);
}
redisLog(REDIS_WARNING,"You requested maxclients of %d "
"requiring at least %llu max file descriptors.",
- old_maxclients, maxfiles);
+ old_maxclients,
+ (unsigned long long) maxfiles);
redisLog(REDIS_WARNING,"Redis can't set maximum open files "
"to %llu because of OS error: %s.",
- maxfiles, strerror(setrlimit_error));
+ (unsigned long long) maxfiles, strerror(setrlimit_error));
redisLog(REDIS_WARNING,"Current maximum open files is %llu. "
"maxclients has been reduced to %d to compensate for "
"low ulimit. "
"If you need higher maxclients increase 'ulimit -n'.",
- oldlimit, server.maxclients);
+ (unsigned long long) oldlimit, server.maxclients);
} else {
redisLog(REDIS_NOTICE,"Increased maximum number of open files "
"to %llu (it was originally set to %llu).",
- maxfiles, oldlimit);
+ (unsigned long long) maxfiles,
+ (unsigned long long) oldlimit);
}
}
}