]> asedeno.scripts.mit.edu Git - git.git/commitdiff
wt-status: fix 'fprintf' compilation warning
authorJunio C Hamano <gitster@pobox.com>
Sun, 2 May 2010 05:05:14 +0000 (22:05 -0700)
committerJunio C Hamano <gitster@pobox.com>
Sun, 2 May 2010 05:05:14 +0000 (22:05 -0700)
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>
wt-status.c

index 7bda9953e0bd2a9a7b803e6e341d8833aaf9dd89..84a9002b8e588a66a34e1b20a94b25bf133c8688 100644 (file)
@@ -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);
        }