Browse Source

Improved warning message: hint to line causing the warning.

pre-master-46
Holger Vogt 2 years ago
parent
commit
dd6089c4fc
  1. 7
      src/frontend/device.c

7
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 == '#') {

Loading…
Cancel
Save