summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorespie <espie@openbsd.org>2013-11-01 17:54:37 +0000
committerespie <espie@openbsd.org>2013-11-01 17:54:37 +0000
commit78809a0158f52fa22b7598d7dd39bf7ca60e56bc (patch)
tree9d3a751af720d7e3b3302af519b5fd06d4b5e6f0
parentSpacing. (diff)
downloadwireguard-openbsd-78809a0158f52fa22b7598d7dd39bf7ca60e56bc.tar.xz
wireguard-openbsd-78809a0158f52fa22b7598d7dd39bf7ca60e56bc.zip
silence warning
okay guenther@
-rw-r--r--usr.bin/make/for.c10
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;
}