summaryrefslogtreecommitdiff
path: root/contrib
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2021-07-28 13:17:59 -0700
committerLibravatar Junio C Hamano <gitster@pobox.com>2021-07-28 13:17:59 -0700
commitdd6d3c90eeff56770f2f4b88fb61cc44bf01d890 (patch)
tree55b66b254ad151323682e834c8eef5cf55eac6d5 /contrib
parentMerge branch 'jk/log-decorate-optim' (diff)
parentadvice.h: add missing __attribute__((format)) & fix usage (diff)
downloadtgif-dd6d3c90eeff56770f2f4b88fb61cc44bf01d890.tar.xz
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 'contrib')
-rw-r--r--contrib/credential/osxkeychain/git-credential-osxkeychain.c1
-rw-r--r--contrib/credential/wincred/git-credential-wincred.c1
2 files changed, 2 insertions, 0 deletions
diff --git a/contrib/credential/osxkeychain/git-credential-osxkeychain.c b/contrib/credential/osxkeychain/git-credential-osxkeychain.c
index bcd3f575a3..0b44a9b7cc 100644
--- a/contrib/credential/osxkeychain/git-credential-osxkeychain.c
+++ b/contrib/credential/osxkeychain/git-credential-osxkeychain.c
@@ -10,6 +10,7 @@ static char *username;
static char *password;
static UInt16 port;
+__attribute__((format (printf, 1, 2)))
static void die(const char *err, ...)
{
char msg[4096];
diff --git a/contrib/credential/wincred/git-credential-wincred.c b/contrib/credential/wincred/git-credential-wincred.c
index 5bdad41de1..5091048f9c 100644
--- a/contrib/credential/wincred/git-credential-wincred.c
+++ b/contrib/credential/wincred/git-credential-wincred.c
@@ -11,6 +11,7 @@
#define ARRAY_SIZE(x) (sizeof(x)/sizeof(x[0]))
+__attribute__((format (printf, 1, 2)))
static void die(const char *err, ...)
{
char msg[4096];