Module Name:    src
Committed By:   rillig
Date:           Sun Jan 21 14:11:52 UTC 2024

Modified Files:
        src/usr.bin/xlint/lint1: main1.c
        src/usr.bin/xlint/xlint: lint.1

Log Message:
lint: create .ln output file even when queries are enabled

This allows to configure lint flags in mk.conf globally for a whole
NetBSD build.  Previously, this would have made the build fail due to
missing .ln files.

The previous use case of rerunning lint with or without queries is easy
enough to achieve by doing a 'make clean', in the same way as for lint
warnings.


To generate a diff of this commit:
cvs rdiff -u -r1.78 -r1.79 src/usr.bin/xlint/lint1/main1.c
cvs rdiff -u -r1.64 -r1.65 src/usr.bin/xlint/xlint/lint.1

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/xlint/lint1/main1.c
diff -u src/usr.bin/xlint/lint1/main1.c:1.78 src/usr.bin/xlint/lint1/main1.c:1.79
--- src/usr.bin/xlint/lint1/main1.c:1.78	Sun Dec  3 18:17:41 2023
+++ src/usr.bin/xlint/lint1/main1.c	Sun Jan 21 14:11:52 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: main1.c,v 1.78 2023/12/03 18:17:41 rillig Exp $	*/
+/*	$NetBSD: main1.c,v 1.79 2024/01/21 14:11:52 rillig Exp $	*/
 
 /*
  * Copyright (c) 1994, 1995 Jochen Pohl
@@ -37,7 +37,7 @@
 
 #include <sys/cdefs.h>
 #if defined(__RCSID)
-__RCSID("$NetBSD: main1.c,v 1.78 2023/12/03 18:17:41 rillig Exp $");
+__RCSID("$NetBSD: main1.c,v 1.79 2024/01/21 14:11:52 rillig Exp $");
 #endif
 
 #include <sys/types.h>
@@ -213,7 +213,7 @@ main(int argc, char *argv[])
 
 
 	/* initialize output */
-	outopen(any_query_enabled ? "/dev/null" : argv[1]);
+	outopen(argv[1]);
 
 #ifdef DEBUG
 	setvbuf(stdout, NULL, _IONBF, 0);

Index: src/usr.bin/xlint/xlint/lint.1
diff -u src/usr.bin/xlint/xlint/lint.1:1.64 src/usr.bin/xlint/xlint/lint.1:1.65
--- src/usr.bin/xlint/xlint/lint.1:1.64	Sat Aug 26 10:43:53 2023
+++ src/usr.bin/xlint/xlint/lint.1	Sun Jan 21 14:11:52 2024
@@ -1,4 +1,4 @@
-.\" $NetBSD: lint.1,v 1.64 2023/08/26 10:43:53 rillig Exp $
+.\" $NetBSD: lint.1,v 1.65 2024/01/21 14:11:52 rillig Exp $
 .\"
 .\" Copyright (c) 1996 Christopher G. Demetriou.  All Rights Reserved.
 .\" Copyright (c) 1994, 1995 Jochen Pohl
@@ -30,7 +30,7 @@
 .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
 .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 .\"
-.Dd August 2, 2023
+.Dd January 21, 2024
 .Dt LINT 1
 .Os
 .Sh NAME
@@ -356,10 +356,6 @@ that may be interesting to look at on a 
 The most convenient way to run queries on a source file is to run:
 .Pp
 .Dl make LINT=\*qlint \-q3,5,7\*q source.ln
-.Pp
-To allow this command to be run repeatedly, the option
-.Fl q
-prevents creating the .ln file.
 .It Fl R Ar old=new
 Remap
 .Ar old

Reply via email to