diff options
author | Christian Göttsche <cgzones@googlemail.com> | 2020-04-06 16:27:42 +0200 |
---|---|---|
committer | Christian Göttsche <cgzones@googlemail.com> | 2020-04-11 14:16:30 +0200 |
commit | 26e2a97b1cbb099fae5a7b613ea1edbb342a4061 (patch) | |
tree | 08b9705d1c1805cf4a536e0835205d15be2136a6 /contrib/hiredis | |
parent | 765813e908e0f23e98ec6224b0408a152a9d3ec0 (diff) | |
download | rspamd-26e2a97b1cbb099fae5a7b613ea1edbb342a4061.tar.gz rspamd-26e2a97b1cbb099fae5a7b613ea1edbb342a4061.zip |
[Minor] enable Wmissing-format-attribute
Diffstat (limited to 'contrib/hiredis')
-rw-r--r-- | contrib/hiredis/async.h | 6 | ||||
-rw-r--r-- | contrib/hiredis/hiredis.h | 18 | ||||
-rw-r--r-- | contrib/hiredis/sds.h | 3 |
3 files changed, 27 insertions, 0 deletions
diff --git a/contrib/hiredis/async.h b/contrib/hiredis/async.h index 3d20241c6..40a5a49c8 100644 --- a/contrib/hiredis/async.h +++ b/contrib/hiredis/async.h @@ -119,7 +119,13 @@ void redisAsyncHandleWrite(redisAsyncContext *ac); /* Command functions for an async context. Write the command to the * output buffer and register the provided callback. */ +#ifdef __GNUC__ +__attribute__((format(printf, 4, 0))) +#endif int redisvAsyncCommand(redisAsyncContext *ac, redisCallbackFn *fn, void *privdata, const char *format, va_list ap); +#ifdef __GNUC__ +__attribute__((format(printf, 4, 5))) +#endif int redisAsyncCommand(redisAsyncContext *ac, redisCallbackFn *fn, void *privdata, const char *format, ...); int redisAsyncCommandArgv(redisAsyncContext *ac, redisCallbackFn *fn, void *privdata, int argc, const char **argv, const size_t *argvlen); int redisAsyncFormattedCommand(redisAsyncContext *ac, redisCallbackFn *fn, void *privdata, const char *cmd, size_t len); diff --git a/contrib/hiredis/hiredis.h b/contrib/hiredis/hiredis.h index 153bfd7a6..6b531b910 100644 --- a/contrib/hiredis/hiredis.h +++ b/contrib/hiredis/hiredis.h @@ -125,7 +125,13 @@ redisReader *redisReaderCreate(void); void freeReplyObject(void *reply); /* Functions to format a command according to the protocol. */ +#ifdef __GNUC__ +__attribute__((format(printf, 2, 0))) +#endif int redisvFormatCommand(char **target, const char *format, va_list ap); +#ifdef __GNUC__ +__attribute__((format(printf, 2, 3))) +#endif int redisFormatCommand(char **target, const char *format, ...); int redisFormatCommandArgv(char **target, int argc, const char **argv, const size_t *argvlen); int redisFormatSdsCommandArgv(sds *target, int argc, const char ** argv, const size_t *argvlen); @@ -204,7 +210,13 @@ int redisAppendFormattedCommand(redisContext *c, const char *cmd, size_t len); /* Write a command to the output buffer. Use these functions in blocking mode * to get a pipeline of commands. */ +#ifdef __GNUC__ +__attribute__((format(printf, 2, 0))) +#endif int redisvAppendCommand(redisContext *c, const char *format, va_list ap); +#ifdef __GNUC__ +__attribute__((format(printf, 2, 3))) +#endif int redisAppendCommand(redisContext *c, const char *format, ...); int redisAppendCommandArgv(redisContext *c, int argc, const char **argv, const size_t *argvlen); @@ -213,7 +225,13 @@ int redisAppendCommandArgv(redisContext *c, int argc, const char **argv, const s * NULL if there was an error in performing the request, otherwise it will * return the reply. In a non-blocking context, it is identical to calling * only redisAppendCommand and will always return NULL. */ +#ifdef __GNUC__ +__attribute__((format(printf, 2, 0))) +#endif void *redisvCommand(redisContext *c, const char *format, va_list ap); +#ifdef __GNUC__ +__attribute__((format(printf, 2, 3))) +#endif void *redisCommand(redisContext *c, const char *format, ...); void *redisCommandArgv(redisContext *c, int argc, const char **argv, const size_t *argvlen); diff --git a/contrib/hiredis/sds.h b/contrib/hiredis/sds.h index 19a2abd31..a494f2efc 100644 --- a/contrib/hiredis/sds.h +++ b/contrib/hiredis/sds.h @@ -71,6 +71,9 @@ sds sdscatsds(sds s, const sds t); sds sdscpylen(sds s, const char *t, size_t len); sds sdscpy(sds s, const char *t); +#ifdef __GNUC__ +__attribute__((format(printf, 2, 0))) +#endif sds sdscatvprintf(sds s, const char *fmt, va_list ap); #ifdef __GNUC__ sds sdscatprintf(sds s, const char *fmt, ...) |