Module Name:    src
Committed By:   rillig
Date:           Sun Dec 27 10:09:53 UTC 2020

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

Log Message:
make(1): remove unnecessary VPR_UNKNOWN for error handling

There is no sensible way for a caller of Var_Parse to deal with an error
state of "maybe successful, maybe not", therefore remove the constant
for it.


To generate a diff of this commit:
cvs rdiff -u -r1.182 -r1.183 src/usr.bin/make/nonints.h
cvs rdiff -u -r1.765 -r1.766 src/usr.bin/make/var.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/nonints.h
diff -u src/usr.bin/make/nonints.h:1.182 src/usr.bin/make/nonints.h:1.183
--- src/usr.bin/make/nonints.h:1.182	Sun Dec 27 05:06:17 2020
+++ src/usr.bin/make/nonints.h	Sun Dec 27 10:09:53 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: nonints.h,v 1.182 2020/12/27 05:06:17 rillig Exp $	*/
+/*	$NetBSD: nonints.h,v 1.183 2020/12/27 10:09:53 rillig Exp $	*/
 
 /*-
  * Copyright (c) 1988, 1989, 1990, 1993
@@ -376,13 +376,8 @@ typedef enum VarParseResult {
 	 * Evaluation failed.
 	 * An error message has already been printed.
 	 */
-	VPR_EVAL_MSG	= VPR_EVAL_SILENT | VPR_ANY_MSG,
+	VPR_EVAL_MSG	= VPR_EVAL_SILENT | VPR_ANY_MSG
 
-	/*
-	 * The exact error handling status is not known yet.
-	 * Deprecated, migrate to VPR_OK or any VPE_*_MSG instead.
-	 */
-	VPR_UNKNOWN		= 0x0008
 } VarParseResult;
 
 typedef enum VarExportMode {

Index: src/usr.bin/make/var.c
diff -u src/usr.bin/make/var.c:1.765 src/usr.bin/make/var.c:1.766
--- src/usr.bin/make/var.c:1.765	Sun Dec 27 05:06:17 2020
+++ src/usr.bin/make/var.c	Sun Dec 27 10:09:53 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: var.c,v 1.765 2020/12/27 05:06:17 rillig Exp $	*/
+/*	$NetBSD: var.c,v 1.766 2020/12/27 10:09:53 rillig Exp $	*/
 
 /*
  * Copyright (c) 1988, 1989, 1990, 1993
@@ -131,7 +131,7 @@
 #include "metachar.h"
 
 /*	"@(#)var.c	8.3 (Berkeley) 3/19/94" */
-MAKE_RCSID("$NetBSD: var.c,v 1.765 2020/12/27 05:06:17 rillig Exp $");
+MAKE_RCSID("$NetBSD: var.c,v 1.766 2020/12/27 10:09:53 rillig Exp $");
 
 typedef enum VarFlags {
 	VAR_NONE	= 0,
@@ -4161,7 +4161,7 @@ Var_Parse(const char **pp, GNode *ctxt, 
 		free(v);
 	}
 	*out_val = (FStr){ value.str, value.freeIt };
-	return VPR_UNKNOWN;
+	return VPR_OK;		/* XXX: Is not correct in all cases */
 }
 
 static void

Reply via email to