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

@ -1148,7 +1148,12 @@ void call(redisClient *c, int flags);
void propagate(struct redisCommand *cmd, int dbid, robj **argv, int argc, int flags);
void alsoPropagate(struct redisCommand *cmd, int dbid, robj **argv, int argc, int target);
int prepareForShutdown();
#ifdef __GNUC__
void redisLog(int level, const char *fmt, ...)
__attribute__((format(printf, 2, 3)));
#else
void redisLog(int level, const char *fmt, ...);
#endif
void redisLogRaw(int level, const char *msg);
void redisLogFromHandler(int level, const char *msg);
void usage();