@matheusbsbs / matheus-bagliano / commits / c1909e7295
Fork 0

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 <gitster@pobox.com>

Junio C Hamano committed May 1, 2010 at 22:05 UTC c1909e72952ec6b95f819a4ad8faa8d69f1d961d
1 file changed +1 -1
wt-status.c
+1 -1
@@ -741,7 +741,7 @@ static void wt_shortstatus_other(int null_termination, struct string_list_item *
741 struct strbuf onebuf = STRBUF_INIT;
742 const char *one;
743 one = quote_path(it->string, -1, &onebuf, s->prefix);
744 - color_fprintf(s->fp, color(WT_STATUS_UNTRACKED, s), sign);
744 + color_fprintf(s->fp, color(WT_STATUS_UNTRACKED, s), "%s", sign);
745 printf(" %s\n", one);
746 strbuf_release(&onebuf);
747 }