Module Name:    src
Committed By:   rillig
Date:           Sat Jan  1 21:50:29 UTC 2022

Modified Files:
        src/usr.bin/make: for.c nonints.h parse.c

Log Message:
make: remove unused parameter from Parse_PushInput

The parameter readMore was never NULL.

No functional change.


To generate a diff of this commit:
cvs rdiff -u -r1.151 -r1.152 src/usr.bin/make/for.c
cvs rdiff -u -r1.227 -r1.228 src/usr.bin/make/nonints.h
cvs rdiff -u -r1.613 -r1.614 src/usr.bin/make/parse.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/for.c
diff -u src/usr.bin/make/for.c:1.151 src/usr.bin/make/for.c:1.152
--- src/usr.bin/make/for.c:1.151	Wed Dec 15 12:58:01 2021
+++ src/usr.bin/make/for.c	Sat Jan  1 21:50:29 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: for.c,v 1.151 2021/12/15 12:58:01 rillig Exp $	*/
+/*	$NetBSD: for.c,v 1.152 2022/01/01 21:50:29 rillig Exp $	*/
 
 /*
  * Copyright (c) 1992, The Regents of the University of California.
@@ -58,7 +58,7 @@
 #include "make.h"
 
 /*	"@(#)for.c	8.1 (Berkeley) 6/6/93"	*/
-MAKE_RCSID("$NetBSD: for.c,v 1.151 2021/12/15 12:58:01 rillig Exp $");
+MAKE_RCSID("$NetBSD: for.c,v 1.152 2022/01/01 21:50:29 rillig Exp $");
 
 
 /* One of the variables to the left of the "in" in a .for loop. */
@@ -519,5 +519,5 @@ For_Run(int lineno)
 		return;
 	}
 
-	Parse_PushInput(NULL, lineno, -1, ForReadMore, f);
+	Parse_PushInput(NULL, lineno, ForReadMore, f);
 }

Index: src/usr.bin/make/nonints.h
diff -u src/usr.bin/make/nonints.h:1.227 src/usr.bin/make/nonints.h:1.228
--- src/usr.bin/make/nonints.h:1.227	Fri Dec 31 00:18:06 2021
+++ src/usr.bin/make/nonints.h	Sat Jan  1 21:50:29 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: nonints.h,v 1.227 2021/12/31 00:18:06 rillig Exp $	*/
+/*	$NetBSD: nonints.h,v 1.228 2022/01/01 21:50:29 rillig Exp $	*/
 
 /*
  * Copyright (c) 1988, 1989, 1990, 1993
@@ -147,7 +147,7 @@ void Parse_Error(ParseErrorLevel, const 
 bool Parse_VarAssign(const char *, bool, GNode *) MAKE_ATTR_USE;
 void Parse_AddIncludeDir(const char *);
 void Parse_File(const char *, int);
-void Parse_PushInput(const char *, int, int, ReadMoreProc, void *);
+void Parse_PushInput(const char *, int, ReadMoreProc, void *);
 void Parse_MainName(GNodeList *);
 int Parse_NumErrors(void) MAKE_ATTR_USE;
 

Index: src/usr.bin/make/parse.c
diff -u src/usr.bin/make/parse.c:1.613 src/usr.bin/make/parse.c:1.614
--- src/usr.bin/make/parse.c:1.613	Sat Jan  1 21:41:50 2022
+++ src/usr.bin/make/parse.c	Sat Jan  1 21:50:29 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: parse.c,v 1.613 2022/01/01 21:41:50 rillig Exp $	*/
+/*	$NetBSD: parse.c,v 1.614 2022/01/01 21:50:29 rillig Exp $	*/
 
 /*
  * Copyright (c) 1988, 1989, 1990, 1993
@@ -110,7 +110,7 @@
 #include "pathnames.h"
 
 /*	"@(#)parse.c	8.3 (Berkeley) 3/19/94"	*/
-MAKE_RCSID("$NetBSD: parse.c,v 1.613 2022/01/01 21:41:50 rillig Exp $");
+MAKE_RCSID("$NetBSD: parse.c,v 1.614 2022/01/01 21:50:29 rillig Exp $");
 
 /* types and constants */
 
@@ -2034,7 +2034,7 @@ IncludeFile(const char *file, bool isSys
 	(void)close(fd);
 
 	/* Start reading from this file next */
-	Parse_PushInput(fullname, 0, -1, loadedfile_readMore, lf);
+	Parse_PushInput(fullname, 0, loadedfile_readMore, lf);
 	CurFile()->lf = lf;
 	if (depinc)
 		doing_depend = depinc;	/* only turn it on */
@@ -2215,7 +2215,7 @@ TrackInput(const char *name)
  * The given file is added to the includes stack.
  */
 void
-Parse_PushInput(const char *name, int lineno, int fd,
+Parse_PushInput(const char *name, int lineno,
 	       ReadMoreProc readMore, void *readMoreArg)
 {
 	IFile *curFile;
@@ -2232,10 +2232,6 @@ Parse_PushInput(const char *name, int li
 	    readMore == loadedfile_readMore ? "file" : ".for loop in",
 	    name, lineno);
 
-	if (fd == -1 && readMore == NULL)
-		/* sanity */
-		return;
-
 	curFile = Vector_Push(&includes);
 	curFile->name = FStr_InitOwn(bmake_strdup(name));
 	curFile->fromForLoop = fromForLoop;
@@ -3025,7 +3021,7 @@ Parse_File(const char *name, int fd)
 
 	assert(targets == NULL);
 
-	Parse_PushInput(name, 0, -1, loadedfile_readMore, lf);
+	Parse_PushInput(name, 0, loadedfile_readMore, lf);
 	CurFile()->lf = lf;
 
 	do {

Reply via email to