Module Name:    src
Committed By:   rillig
Date:           Sun Sep 12 07:52:21 UTC 2021

Modified Files:
        src/usr.bin/make: targ.c

Log Message:
make: fix Targ_PrintType for pre-C99 compilers


To generate a diff of this commit:
cvs rdiff -u -r1.169 -r1.170 src/usr.bin/make/targ.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/usr.bin/make/targ.c
diff -u src/usr.bin/make/targ.c:1.169 src/usr.bin/make/targ.c:1.170
--- src/usr.bin/make/targ.c:1.169	Sun Sep 12 07:50:45 2021
+++ src/usr.bin/make/targ.c	Sun Sep 12 07:52:21 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: targ.c,v 1.169 2021/09/12 07:50:45 rillig Exp $	*/
+/*	$NetBSD: targ.c,v 1.170 2021/09/12 07:52:21 rillig Exp $	*/
 
 /*
  * Copyright (c) 1988, 1989, 1990, 1993
@@ -113,7 +113,7 @@
 #include "dir.h"
 
 /*	"@(#)targ.c	8.2 (Berkeley) 3/19/94"	*/
-MAKE_RCSID("$NetBSD: targ.c,v 1.169 2021/09/12 07:50:45 rillig Exp $");
+MAKE_RCSID("$NetBSD: targ.c,v 1.170 2021/09/12 07:52:21 rillig Exp $");
 
 /*
  * All target nodes that appeared on the left-hand side of one of the
@@ -439,8 +439,9 @@ Targ_PrintType(int type)
 		{ OP_USE,	false,	"USE"		},
 		{ OP_OPTIONAL,	false,	"OPTIONAL"	},
 	};
+	size_t i;
 
-	for (size_t i = 0; i < sizeof(names) / sizeof(names[0]); i++) {
+	for (i = 0; i < sizeof(names) / sizeof(names[0]); i++) {
 		if (type & names[i].bit) {
 			if (names[i].internal)
 				DEBUG1(TARG, " .%s", names[i].name);

Reply via email to