diff options
author | Marc Espie <espie@cvs.openbsd.org> | 2013-11-01 17:54:38 +0000 |
---|---|---|
committer | Marc Espie <espie@cvs.openbsd.org> | 2013-11-01 17:54:38 +0000 |
commit | 3ac149c24ece67600d7881a5dba3053395c1a197 (patch) | |
tree | df1d83c138d4b9bbaf4c9888ecc97cdf7f4433b8 /usr.bin/make/for.c | |
parent | e5b844f84ddda5a02e7aaeb53014f34735445834 (diff) |
silence warning
okay guenther@
Diffstat (limited to 'usr.bin/make/for.c')
-rw-r--r-- | usr.bin/make/for.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/usr.bin/make/for.c b/usr.bin/make/for.c index 96827134221..d89e743c358 100644 --- a/usr.bin/make/for.c +++ b/usr.bin/make/for.c @@ -1,4 +1,4 @@ -/* $OpenBSD: for.c,v 1.43 2013/05/06 11:29:18 espie Exp $ */ +/* $OpenBSD: for.c,v 1.44 2013/11/01 17:54:37 espie Exp $ */ /* $NetBSD: for.c,v 1.4 1996/11/06 17:59:05 christos Exp $ */ /* @@ -185,11 +185,15 @@ For_Eval(const char *line) free(sub); if (arg->nvars != 1 && n % arg->nvars != 0) { LstNode ln; + Parse_Error(PARSE_FATAL, "Wrong number of items in for loop"); (void)fprintf(stderr, "%lu items for %d variables:", n, arg->nvars); - for (ln = Lst_First(&arg->lst); ln != NULL; ln = Lst_Adv(ln)) - (void)fprintf(stderr, " %s", Lst_Datum(ln)); + for (ln = Lst_First(&arg->lst); ln != NULL; ln = Lst_Adv(ln)) { + char *p = Lst_Datum(ln); + + (void)fprintf(stderr, " %s", p); + } (void)fprintf(stderr, "\n"); return 0; } |