From 9387a52ec032cb3dfcac77a5b1918c7ca59f8743 Mon Sep 17 00:00:00 2001 From: NRK Date: Sun, 2 Jan 2022 12:31:21 +0600 Subject: don't print argv0 imo a good linter should be concise and helpful. printing argv0 doesn't add much value but instead adds noise to the output. i've left printerrorf untouched however, since it calls exit. --- ui.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ui.c b/ui.c index 1afff76..337a7a8 100644 --- a/ui.c +++ b/ui.c @@ -14,7 +14,7 @@ static void vxprintwarningf(enum warning_class class, int severity, const char *fmt, va_list ap) { if (warning_classes[class].action != IGNORE) { - fprintf(stderr, "%s: [%s] ", argv0, + fprintf(stderr, "[%s] ", warning_classes[class].action == INFORM ? "info" : warning_classes[class].action == WARN_STYLE ? "style" : "warning"); vfprintf(stderr, fmt, ap); @@ -54,7 +54,7 @@ printtipf(enum warning_class class, const char *fmt, ...) va_list ap; if (warning_classes[class].action != IGNORE) { va_start(ap, fmt); - fprintf(stderr, "%s: [tip] ", argv0); + fprintf(stderr, "[tip] "); vfprintf(stderr, fmt, ap); va_end(ap); } -- cgit v1.2.3-70-g09d2