Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[.joined/src/trunk]: .joined/src/usr.bin/make make: remove unused parameter f...



details:   https://anonhg.NetBSD.org/.joined/src/rev/9c50c8e0da5a
branches:  trunk
changeset: 359390:9c50c8e0da5a
user:      rillig <rillig%NetBSD.org@localhost>
date:      Sat Jan 01 21:50:29 2022 +0000

description:
make: remove unused parameter from Parse_PushInput

The parameter readMore was never NULL.

No functional change.

diffstat:

 usr.bin/make/for.c     |   6 +++---
 usr.bin/make/nonints.h |   4 ++--
 usr.bin/make/parse.c   |  14 +++++---------
 3 files changed, 10 insertions(+), 14 deletions(-)

diffs (99 lines):

diff -r 924cf37a9f4c -r 9c50c8e0da5a usr.bin/make/for.c
--- a/usr.bin/make/for.c        Sat Jan 01 21:41:50 2022 +0000
+++ b/usr.bin/make/for.c        Sat Jan 01 21:50:29 2022 +0000
@@ -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 @@
                return;
        }
 
-       Parse_PushInput(NULL, lineno, -1, ForReadMore, f);
+       Parse_PushInput(NULL, lineno, ForReadMore, f);
 }
diff -r 924cf37a9f4c -r 9c50c8e0da5a usr.bin/make/nonints.h
--- a/usr.bin/make/nonints.h    Sat Jan 01 21:41:50 2022 +0000
+++ b/usr.bin/make/nonints.h    Sat Jan 01 21:50:29 2022 +0000
@@ -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 @@
 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;
 
diff -r 924cf37a9f4c -r 9c50c8e0da5a usr.bin/make/parse.c
--- a/usr.bin/make/parse.c      Sat Jan 01 21:41:50 2022 +0000
+++ b/usr.bin/make/parse.c      Sat Jan 01 21:50:29 2022 +0000
@@ -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 @@
        (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 @@
  * 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 @@
            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 @@
 
        assert(targets == NULL);
 
-       Parse_PushInput(name, 0, -1, loadedfile_readMore, lf);
+       Parse_PushInput(name, 0, loadedfile_readMore, lf);
        CurFile()->lf = lf;
 
        do {



Home | Main Index | Thread Index | Old Index