diff options
author | Jeff King <peff@peff.net> | 2016-07-08 11:25:23 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2016-07-08 19:11:23 +0200 |
commit | fa262cac766d383c51e0ead04c62e114a79bd738 (patch) | |
tree | 2f70b803554a41d5eee0e2b5ee4f7bcd846e591e /walker.h | |
parent | Third batch of topics for 2.10 (diff) | |
download | git-fa262cac766d383c51e0ead04c62e114a79bd738.tar.xz git-fa262cac766d383c51e0ead04c62e114a79bd738.zip |
walker: let walker_say take arbitrary formats
We take a printf-style format and a single "char *"
parameter, and the format must therefore have at most one
"%s" in it. Besides being error-prone (and tickling
-Wformat-nonliteral), this is unnecessarily restrictive. We
can just provide the usual varargs interface.
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'walker.h')
-rw-r--r-- | walker.h | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -19,7 +19,8 @@ struct walker { }; /* Report what we got under get_verbosely */ -void walker_say(struct walker *walker, const char *, const char *); +__attribute__((format (printf, 2, 3))) +void walker_say(struct walker *walker, const char *fmt, ...); /* Load pull targets from stdin */ int walker_targets_stdin(char ***target, const char ***write_ref); |