Module Name:    src
Committed By:   rillig
Date:           Sat Mar 20 19:33:25 UTC 2021

Modified Files:
        src/usr.bin/xlint/lint1: Makefile lex.c oper.c

Log Message:
lint: make lint's own code pass the strict bool mode

No functional change.


To generate a diff of this commit:
cvs rdiff -u -r1.62 -r1.63 src/usr.bin/xlint/lint1/Makefile
cvs rdiff -u -r1.13 -r1.14 src/usr.bin/xlint/lint1/lex.c
cvs rdiff -u -r1.5 -r1.6 src/usr.bin/xlint/lint1/oper.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/xlint/lint1/Makefile
diff -u src/usr.bin/xlint/lint1/Makefile:1.62 src/usr.bin/xlint/lint1/Makefile:1.63
--- src/usr.bin/xlint/lint1/Makefile:1.62	Sat Feb 20 18:10:22 2021
+++ src/usr.bin/xlint/lint1/Makefile	Sat Mar 20 19:33:25 2021
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.62 2021/02/20 18:10:22 rillig Exp $
+#	$NetBSD: Makefile,v 1.63 2021/03/20 19:33:25 rillig Exp $
 
 .include <bsd.own.mk>
 
@@ -15,6 +15,7 @@ YHEADER=
 #LFLAGS+=-d
 
 CWARNFLAGS.clang+=	-Wno-error=implicit-int-float-conversion
+LINTFLAGS+=		-T
 
 CPPFLAGS+=	-I${.CURDIR} -I. -DPASS=\"${PROG}.h\"
 CPPFLAGS+=	${DEBUG:D-DDEBUG}

Index: src/usr.bin/xlint/lint1/lex.c
diff -u src/usr.bin/xlint/lint1/lex.c:1.13 src/usr.bin/xlint/lint1/lex.c:1.14
--- src/usr.bin/xlint/lint1/lex.c:1.13	Sat Mar 20 19:24:56 2021
+++ src/usr.bin/xlint/lint1/lex.c	Sat Mar 20 19:33:25 2021
@@ -1,4 +1,4 @@
-/* $NetBSD: lex.c,v 1.13 2021/03/20 19:24:56 rillig Exp $ */
+/* $NetBSD: lex.c,v 1.14 2021/03/20 19:33:25 rillig Exp $ */
 
 /*
  * Copyright (c) 1996 Christopher G. Demetriou.  All Rights Reserved.
@@ -38,7 +38,7 @@
 
 #include <sys/cdefs.h>
 #if defined(__RCSID) && !defined(lint)
-__RCSID("$NetBSD: lex.c,v 1.13 2021/03/20 19:24:56 rillig Exp $");
+__RCSID("$NetBSD: lex.c,v 1.14 2021/03/20 19:33:25 rillig Exp $");
 #endif
 
 #include <ctype.h>
@@ -264,7 +264,7 @@ add_keyword(struct kwtab *kw, int deco)
 	char buf[256];
 	const char *name;
 
-	if (!(kw->kw_deco & deco))
+	if ((kw->kw_deco & deco) == 0)
 		return;
 
 	switch (deco) {

Index: src/usr.bin/xlint/lint1/oper.c
diff -u src/usr.bin/xlint/lint1/oper.c:1.5 src/usr.bin/xlint/lint1/oper.c:1.6
--- src/usr.bin/xlint/lint1/oper.c:1.5	Mon Jan 18 20:02:34 2021
+++ src/usr.bin/xlint/lint1/oper.c	Sat Mar 20 19:33:25 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: oper.c,v 1.5 2021/01/18 20:02:34 rillig Exp $	*/
+/*	$NetBSD: oper.c,v 1.6 2021/03/20 19:33:25 rillig Exp $	*/
 
 /*-
  * Copyright (c) 2021 The NetBSD Foundation, Inc.
@@ -43,10 +43,14 @@ static const struct {
 #define op(name, repr, \
 		bi, lo, tb, to, in, sc, ar, fo, va, ts, ba, se, \
 		lu, ru, pc, cm, ve, de, ew, ic, active) \
-	{ { bi + 0, lo + 0, tb + 0, to + 0, in + 0, sc + 0, ar + 0, \
-	    fo + 0, va + 0, ts + 0, ba + 0, se + 0, \
-	    lu + 0, ru + 0, pc + 0, cm + 0, ve + 0, \
-	    de + 0, ew + 0, ic + 0, repr }, active },
+	{ { \
+		bi + 0 > 0, lo + 0 > 0, tb + 0 > 0, to + 0 > 0, \
+		in + 0 > 0, sc + 0 > 0, ar + 0 > 0, fo + 0 > 0, \
+		va + 0 > 0, ts + 0 > 0, ba + 0 > 0, se + 0 > 0, \
+		lu + 0 > 0, ru + 0 > 0, pc + 0 > 0, cm + 0 > 0, \
+		ve + 0 > 0, de + 0 > 0, ew + 0 > 0, ic + 0 > 0, \
+		repr }, active > 0 \
+	},
 #define end_ops(n) };
 #include "ops.def"
 

Reply via email to