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: reduce negations in ParseVErrorInternal



details:   https://anonhg.NetBSD.org/src/rev/45ff2761914b
branches:  trunk
changeset: 359468:45ff2761914b
user:      rillig <rillig%NetBSD.org@localhost>
date:      Fri Jan 07 08:37:23 2022 +0000

description:
make: reduce negations in ParseVErrorInternal

No functional change.

diffstat:

 usr.bin/make/parse.c |  21 ++++++++++-----------
 1 files changed, 10 insertions(+), 11 deletions(-)

diffs (44 lines):

diff -r 4aed0763d390 -r 45ff2761914b usr.bin/make/parse.c
--- a/usr.bin/make/parse.c      Fri Jan 07 08:30:04 2022 +0000
+++ b/usr.bin/make/parse.c      Fri Jan 07 08:37:23 2022 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: parse.c,v 1.620 2022/01/07 08:20:00 rillig Exp $       */
+/*     $NetBSD: parse.c,v 1.621 2022/01/07 08:37:23 rillig Exp $       */
 
 /*
  * Copyright (c) 1988, 1989, 1990, 1993
@@ -106,7 +106,7 @@
 #include "pathnames.h"
 
 /*     "@(#)parse.c    8.3 (Berkeley) 3/19/94" */
-MAKE_RCSID("$NetBSD: parse.c,v 1.620 2022/01/07 08:20:00 rillig Exp $");
+MAKE_RCSID("$NetBSD: parse.c,v 1.621 2022/01/07 08:37:23 rillig Exp $");
 
 /*
  * Structure for a file being read ("included file")
@@ -470,17 +470,16 @@
        (void)fprintf(f, "\n");
        (void)fflush(f);
 
-       if (type == PARSE_INFO)
-               goto print_stack_trace;
-       if (type == PARSE_WARNING && !opts.parseWarnFatal)
-               goto print_stack_trace;
-       parseErrors++;
-       if (type == PARSE_WARNING && !fatal_warning_error_printed) {
-               Error("parsing warnings being treated as errors");
-               fatal_warning_error_printed = true;
+       if (type == PARSE_FATAL)
+               parseErrors++;
+       if (type == PARSE_WARNING && opts.parseWarnFatal) {
+               if (!fatal_warning_error_printed) {
+                       Error("parsing warnings being treated as errors");
+                       fatal_warning_error_printed = true;
+               }
+               parseErrors++;
        }
 
-print_stack_trace:
        PrintStackTrace();
 }
 



Home | Main Index | Thread Index | Old Index