From: Tarmigan Casebolt <tarmigan+git@gmail.com>
To: Junio C Hamano <gitster@pobox.com>
Cc: git@vger.kernel.org, Tarmigan Casebolt <tarmigan+git@gmail.com>
Subject: [PATCH] ident.c: suppress fprintf compiler warning
Date: Sat, 16 Jan 2010 22:16:14 -0800 [thread overview]
Message-ID: <1263708974-99619-1-git-send-email-tarmigan+git@gmail.com> (raw)
Compiling today's pu gave
...
CC ident.o
CC levenshtein.o
ident.c: In function 'fmt_ident':
ident.c:206: warning: format not a string literal and no format arguments
CC list-objects.o
...
This warning seems to have appeared first in 18e95f279ec6 (ident.c:
remove unused variables) which removed additional fprintf arguments.
Suppress this warning by using a literal "%s" to print the string
instead of passing the string directly to fprintf.
Signed-off-by: Tarmigan Casebolt <tarmigan+git@gmail.com>
---
ident.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/ident.c b/ident.c
index d4f6145..239112c 100644
--- a/ident.c
+++ b/ident.c
@@ -203,7 +203,7 @@ const char *fmt_ident(const char *name, const char *email,
if ((warn_on_no_name || error_on_no_name) &&
name == git_default_name && env_hint) {
- fprintf(stderr, env_hint);
+ fprintf(stderr, "%s", env_hint);
env_hint = NULL; /* warn only once */
}
if (error_on_no_name)
--
1.6.6.425.g6b174
reply other threads:[~2010-01-17 6:18 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1263708974-99619-1-git-send-email-tarmigan+git@gmail.com \
--to=tarmigan+git@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).