Module Name:    src
Committed By:   rillig
Date:           Sat Aug 22 13:49:40 UTC 2020

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

Log Message:
make(1): allow the inconsistency with Lst_OpenS to be discovered

The -dL option is intended to find bugs in Makefiles and in make itself,
therefore enabling the consistency check is ok there.  Having this check
available by default increases the chances of the bug being found and
finally fixed.


To generate a diff of this commit:
cvs rdiff -u -r1.23 -r1.24 src/usr.bin/make/lst.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/lst.c
diff -u src/usr.bin/make/lst.c:1.23 src/usr.bin/make/lst.c:1.24
--- src/usr.bin/make/lst.c:1.23	Sat Aug 22 13:28:20 2020
+++ src/usr.bin/make/lst.c	Sat Aug 22 13:49:40 2020
@@ -1,4 +1,4 @@
-/* $NetBSD: lst.c,v 1.23 2020/08/22 13:28:20 rillig Exp $ */
+/* $NetBSD: lst.c,v 1.24 2020/08/22 13:49:40 rillig Exp $ */
 
 /*
  * Copyright (c) 1988, 1989, 1990, 1993
@@ -37,11 +37,11 @@
 #include "make.h"
 
 #ifndef MAKE_NATIVE
-static char rcsid[] = "$NetBSD: lst.c,v 1.23 2020/08/22 13:28:20 rillig Exp $";
+static char rcsid[] = "$NetBSD: lst.c,v 1.24 2020/08/22 13:49:40 rillig Exp $";
 #else
 #include <sys/cdefs.h>
 #ifndef lint
-__RCSID("$NetBSD: lst.c,v 1.23 2020/08/22 13:28:20 rillig Exp $");
+__RCSID("$NetBSD: lst.c,v 1.24 2020/08/22 13:49:40 rillig Exp $");
 #endif /* not lint */
 #endif
 
@@ -712,14 +712,12 @@ void
 Lst_OpenS(Lst list)
 {
     assert(LstIsValid(list));
-#if 0
+
     /* XXX: This assertion fails for NetBSD's "build.sh -j1 tools", somewhere
      * between "dependall ===> compat" and "dependall ===> binstall".
      * Building without the "-j1" succeeds though. */
-    if (list->isOpen)
+    if (DEBUG(LINT) && list->isOpen)
 	Parse_Error(PARSE_WARNING, "Internal inconsistency: list opened twice");
-    assert(!list->isOpen);
-#endif
 
     list->isOpen = TRUE;
     list->lastAccess = LstIsEmpty(list) ? Head : Unknown;

Reply via email to