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 0d8d7f106a
commit d2a37badc2
5 changed files with 91 additions and 82 deletions

View File

@ -886,7 +886,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());
@ -935,7 +935,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;
}