Module Name: src
Committed By: sjg
Date: Mon Feb 12 21:38:09 UTC 2018
Modified Files:
src/usr.bin/make: make.h parse.c
Log Message:
Do not treat .info as warning for -W
Reported by: lwhsu at FreeBSD.org
To generate a diff of this commit:
cvs rdiff -u -r1.103 -r1.104 src/usr.bin/make/make.h
cvs rdiff -u -r1.225 -r1.226 src/usr.bin/make/parse.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/make.h
diff -u src/usr.bin/make/make.h:1.103 src/usr.bin/make/make.h:1.104
--- src/usr.bin/make/make.h:1.103 Thu Jul 20 19:29:54 2017
+++ src/usr.bin/make/make.h Mon Feb 12 21:38:09 2018
@@ -1,4 +1,4 @@
-/* $NetBSD: make.h,v 1.103 2017/07/20 19:29:54 sjg Exp $ */
+/* $NetBSD: make.h,v 1.104 2018/02/12 21:38:09 sjg Exp $ */
/*
* Copyright (c) 1988, 1989, 1990, 1993
@@ -330,6 +330,7 @@ typedef struct GNode {
* once the makefile has been parsed. PARSE_WARNING means it can. Passed
* as the first argument to Parse_Error.
*/
+#define PARSE_INFO 3
#define PARSE_WARNING 2
#define PARSE_FATAL 1
Index: src/usr.bin/make/parse.c
diff -u src/usr.bin/make/parse.c:1.225 src/usr.bin/make/parse.c:1.226
--- src/usr.bin/make/parse.c:1.225 Mon Apr 17 13:29:07 2017
+++ src/usr.bin/make/parse.c Mon Feb 12 21:38:09 2018
@@ -1,4 +1,4 @@
-/* $NetBSD: parse.c,v 1.225 2017/04/17 13:29:07 maya Exp $ */
+/* $NetBSD: parse.c,v 1.226 2018/02/12 21:38:09 sjg Exp $ */
/*
* Copyright (c) 1988, 1989, 1990, 1993
@@ -69,14 +69,14 @@
*/
#ifndef MAKE_NATIVE
-static char rcsid[] = "$NetBSD: parse.c,v 1.225 2017/04/17 13:29:07 maya Exp $";
+static char rcsid[] = "$NetBSD: parse.c,v 1.226 2018/02/12 21:38:09 sjg Exp $";
#else
#include <sys/cdefs.h>
#ifndef lint
#if 0
static char sccsid[] = "@(#)parse.c 8.3 (Berkeley) 3/19/94";
#else
-__RCSID("$NetBSD: parse.c,v 1.225 2017/04/17 13:29:07 maya Exp $");
+__RCSID("$NetBSD: parse.c,v 1.226 2018/02/12 21:38:09 sjg Exp $");
#endif
#endif /* not lint */
#endif
@@ -703,6 +703,8 @@ ParseVErrorInternal(FILE *f, const char
(void)vfprintf(f, fmt, ap);
(void)fprintf(f, "\n");
(void)fflush(f);
+ if (type == PARSE_INFO)
+ return;
if (type == PARSE_FATAL || parseWarnFatal)
fatals += 1;
if (parseWarnFatal && !fatal_warning_error_printed) {
@@ -795,7 +797,7 @@ ParseMessage(char *line)
switch(*line) {
case 'i':
- mtype = 0;
+ mtype = PARSE_INFO;
break;
case 'w':
mtype = PARSE_WARNING;