From 3ac149c24ece67600d7881a5dba3053395c1a197 Mon Sep 17 00:00:00 2001 From: Marc Espie Date: Fri, 1 Nov 2013 17:54:38 +0000 Subject: silence warning okay guenther@ --- usr.bin/make/for.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'usr.bin/make/for.c') 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; } -- cgit v1.2.3