From 29a49f5d150911428a35943be8d9fc226865eb1b Mon Sep 17 00:00:00 2001 From: Tavian Barnes Date: Wed, 2 Jan 2019 17:00:40 -0500 Subject: color: Check format strings + args for cfprintf() %{cc} is now ${cc} to avoid warnings about an unrecognized format specifier, and %P and %L are now %pP and %pL to make them look more like standard format strings. --- diag.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'diag.c') diff --git a/diag.c b/diag.c index d45e38b..bdbf98e 100644 --- a/diag.c +++ b/diag.c @@ -56,9 +56,9 @@ void bfs_vwarning(const struct cmdline *cmdline, const char *format, va_list arg } void bfs_error_prefix(const struct cmdline *cmdline) { - cfprintf(cmdline->cerr, "%{bld}%s:%{rs} %{er}error:%{rs} ", xbasename(cmdline->argv[0])); + cfprintf(cmdline->cerr, "${bld}%s:${rs} ${er}error:${rs} ", xbasename(cmdline->argv[0])); } void bfs_warning_prefix(const struct cmdline *cmdline) { - cfprintf(cmdline->cerr, "%{bld}%s:%{rs} %{wr}warning:%{rs} ", xbasename(cmdline->argv[0])); + cfprintf(cmdline->cerr, "${bld}%s:${rs} ${wr}warning:${rs} ", xbasename(cmdline->argv[0])); } -- cgit v1.2.3