Source-Changes-HG archive

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

[src/trunk]: src/usr.bin/make make(1): fix type of local variable in FindDeps...



details:   https://anonhg.NetBSD.org/src/rev/37fc0b43b21d
branches:  trunk
changeset: 946279:37fc0b43b21d
user:      rillig <rillig%NetBSD.org@localhost>
date:      Sun Nov 22 11:11:43 2020 +0000

description:
make(1): fix type of local variable in FindDepsRegular

The compiler cannot check these since all lists and list nodes are
aliases to each other.

Maybe it's time to add type-generic lists to the code, to delegate these
checks to the compiler.

diffstat:

 usr.bin/make/suff.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (27 lines):

diff -r b010464c6c9a -r 37fc0b43b21d usr.bin/make/suff.c
--- a/usr.bin/make/suff.c       Sun Nov 22 11:05:49 2020 +0000
+++ b/usr.bin/make/suff.c       Sun Nov 22 11:11:43 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: suff.c,v 1.289 2020/11/22 10:27:56 rillig Exp $        */
+/*     $NetBSD: suff.c,v 1.290 2020/11/22 11:11:43 rillig Exp $        */
 
 /*
  * Copyright (c) 1988, 1989, 1990, 1993
@@ -114,7 +114,7 @@
 #include "dir.h"
 
 /*     "@(#)suff.c     8.4 (Berkeley) 3/21/94" */
-MAKE_RCSID("$NetBSD: suff.c,v 1.289 2020/11/22 10:27:56 rillig Exp $");
+MAKE_RCSID("$NetBSD: suff.c,v 1.290 2020/11/22 11:11:43 rillig Exp $");
 
 #define SUFF_DEBUG0(text) DEBUG0(SUFF, text)
 #define SUFF_DEBUG1(fmt, arg1) DEBUG1(SUFF, fmt, arg1)
@@ -1748,7 +1748,7 @@
      * that still contain variables or wildcards in their names.
      */
     {
-       SuffixListNode *ln, *nln;
+       GNodeListNode *ln, *nln;
        for (ln = gn->children->first; ln != NULL; ln = nln) {
            nln = ln->next;
            ExpandChildren(ln, gn);



Home | Main Index | Thread Index | Old Index