From: Junio C Hamano Date: Sun, 2 May 2010 05:05:14 +0000 (-0700) Subject: wt-status: fix 'fprintf' compilation warning X-Git-Tag: v1.7.2-rc0~126^2 X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=commitdiff_plain;h=c1909e72952ec6b95f819a4ad8faa8d69f1d961d;p=git.git wt-status: fix 'fprintf' compilation warning color_fprintf() has the same function signature as fprintf() and newer gcc warns when a non-constant string is fed as the format Signed-off-by: Junio C Hamano --- diff --git a/wt-status.c b/wt-status.c index 7bda9953e..84a9002b8 100644 --- a/wt-status.c +++ b/wt-status.c @@ -741,7 +741,7 @@ static void wt_shortstatus_other(int null_termination, struct string_list_item * struct strbuf onebuf = STRBUF_INIT; const char *one; one = quote_path(it->string, -1, &onebuf, s->prefix); - color_fprintf(s->fp, color(WT_STATUS_UNTRACKED, s), sign); + color_fprintf(s->fp, color(WT_STATUS_UNTRACKED, s), "%s", sign); printf(" %s\n", one); strbuf_release(&onebuf); }