summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNRK <nrk@disroot.org>2022-01-02 12:31:21 +0600
committerMattias Andrée <maandree@kth.se>2022-01-04 20:08:03 +0100
commit9387a52ec032cb3dfcac77a5b1918c7ca59f8743 (patch)
tree23df8df24dc0ebc4a3495b75c19539a58b31beab
parentmisc (diff)
downloadmakel-9387a52ec032cb3dfcac77a5b1918c7ca59f8743.tar.gz
makel-9387a52ec032cb3dfcac77a5b1918c7ca59f8743.tar.bz2
makel-9387a52ec032cb3dfcac77a5b1918c7ca59f8743.tar.xz
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.
-rw-r--r--ui.c4
1 files 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);
}