From dd6089c4fc388e1418a7cb6ccfc3f5fc6af174c6 Mon Sep 17 00:00:00 2001 From: Holger Vogt Date: Wed, 12 Jun 2024 23:54:33 +0200 Subject: [PATCH] Improved warning message: hint to line causing the warning. --- src/frontend/device.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/frontend/device.c b/src/frontend/device.c index a3087fabc..dbf39ffe7 100644 --- a/src/frontend/device.c +++ b/src/frontend/device.c @@ -1343,10 +1343,15 @@ com_alter_common(wordlist *wl, int do_model) dev = NULL; param = NULL; words = wl; - while (words != eqword) { + while (words && words != eqword) { char *p = words->wl_word; if (param) { fprintf(cp_err, "Warning: excess parameter name \"%s\" ignored.\n", p); + char* line = wl_flatten(wl_head->wl_prev); + if (line) { + fprintf(cp_err, " in line: %s\n", line); + tfree(line); + } } else if (dev) { param = words->wl_word; } else if (*p == '@' || *p == '#') {