diff options
author | Junio C Hamano <gitster@pobox.com> | 2021-07-28 22:17:59 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2021-07-28 22:17:59 +0200 |
commit | dd6d3c90eeff56770f2f4b88fb61cc44bf01d890 (patch) | |
tree | 55b66b254ad151323682e834c8eef5cf55eac6d5 /imap-send.c | |
parent | Merge branch 'jk/log-decorate-optim' (diff) | |
parent | advice.h: add missing __attribute__((format)) & fix usage (diff) | |
download | git-dd6d3c90eeff56770f2f4b88fb61cc44bf01d890.tar.xz git-dd6d3c90eeff56770f2f4b88fb61cc44bf01d890.zip |
Merge branch 'ab/attribute-format'
Many "printf"-like helper functions we have have been annotated
with __attribute__() to catch placeholder/parameter mismatches.
* ab/attribute-format:
advice.h: add missing __attribute__((format)) & fix usage
*.h: add a few missing __attribute__((format))
*.c static functions: add missing __attribute__((format))
sequencer.c: move static function to avoid forward decl
*.c static functions: don't forward-declare __attribute__
Diffstat (limited to 'imap-send.c')
-rw-r--r-- | imap-send.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/imap-send.c b/imap-send.c index 9d06ef7cd2..a0540ba5cf 100644 --- a/imap-send.c +++ b/imap-send.c @@ -451,6 +451,7 @@ static int buffer_gets(struct imap_buffer *b, char **s) /* not reached */ } +__attribute__((format (printf, 1, 2))) static void imap_info(const char *msg, ...) { va_list va; @@ -463,6 +464,7 @@ static void imap_info(const char *msg, ...) } } +__attribute__((format (printf, 1, 2))) static void imap_warn(const char *msg, ...) { va_list va; @@ -504,6 +506,7 @@ static char *next_arg(char **s) return ret; } +__attribute__((format (printf, 3, 4))) static int nfsnprintf(char *buf, int blen, const char *fmt, ...) { int ret; |