Use GCC printf format attribute for redisLog().

This commit also fixes redisLog() statements producing warnings.
This commit is contained in:
antirez
2013-02-27 12:27:15 +01:00
parent c35b065a64
commit f9b5ca29fd
6 changed files with 93 additions and 84 deletions

View File

@ -912,7 +912,7 @@ int serverCron(struct aeEventLoop *eventLoop, long long id, void *clientData) {
if (!server.sentinel_mode) {
run_with_period(5000) {
redisLog(REDIS_VERBOSE,
"%d clients connected (%d slaves), %zu bytes in use",
"%lu clients connected (%lu slaves), %zu bytes in use",
listLength(server.clients)-listLength(server.slaves),
listLength(server.slaves),
zmalloc_used_memory());
@ -961,7 +961,7 @@ int serverCron(struct aeEventLoop *eventLoop, long long id, void *clientData) {
if (server.dirty >= sp->changes &&
server.unixtime-server.lastsave > sp->seconds) {
redisLog(REDIS_NOTICE,"%d changes in %d seconds. Saving...",
sp->changes, sp->seconds);
sp->changes, (int)sp->seconds);
rdbSaveBackground(server.rdb_filename);
break;
}