Browse Source

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>
maint
Junio C Hamano 15 years ago
parent
commit
c1909e7295
  1. 2
      wt-status.c

2
wt-status.c

@ -741,7 +741,7 @@ static void wt_shortstatus_other(int null_termination, struct string_list_item * @@ -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);
}

Loading…
Cancel
Save