summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 075394e)
raw | patch | inline | side by side (parent: 075394e)
author | René Scharfe <rene.scharfe@lsrfire.ath.cx> | |
Sun, 15 Feb 2009 18:18:58 +0000 (19:18 +0100) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Sun, 15 Feb 2009 19:14:12 +0000 (11:14 -0800) |
While all of the strings passed to warning() are, in fact, literals, the
compiler doesn't recognize them as such because it doesn't see through
the loop used to iterate over them:
builtin-receive-pack.c: In function 'warn_unconfigured_deny':
builtin-receive-pack.c:247: warning: format not a string literal and no format arguments
builtin-receive-pack.c: In function 'warn_unconfigured_deny_delete_current':
builtin-receive-pack.c:273: warning: format not a string literal and no format arguments
Calm the compiler by adding easily recognizable format string literals.
Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
compiler doesn't recognize them as such because it doesn't see through
the loop used to iterate over them:
builtin-receive-pack.c: In function 'warn_unconfigured_deny':
builtin-receive-pack.c:247: warning: format not a string literal and no format arguments
builtin-receive-pack.c: In function 'warn_unconfigured_deny_delete_current':
builtin-receive-pack.c:273: warning: format not a string literal and no format arguments
Calm the compiler by adding easily recognizable format string literals.
Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin-receive-pack.c | patch | blob | history |
diff --git a/builtin-receive-pack.c b/builtin-receive-pack.c
index f7e04c45f997d433a5af4352f3dd0dee11dd43fa..849f1fe6f9c703bd7717e54548300dfe6e495061 100644 (file)
--- a/builtin-receive-pack.c
+++ b/builtin-receive-pack.c
{
int i;
for (i = 0; i < ARRAY_SIZE(warn_unconfigured_deny_msg); i++)
- warning(warn_unconfigured_deny_msg[i]);
+ warning("%s", warn_unconfigured_deny_msg[i]);
}
static char *warn_unconfigured_deny_delete_current_msg[] = {
for (i = 0;
i < ARRAY_SIZE(warn_unconfigured_deny_delete_current_msg);
i++)
- warning(warn_unconfigured_deny_delete_current_msg[i]);
+ warning("%s", warn_unconfigured_deny_delete_current_msg[i]);
}
static const char *update(struct command *cmd)