Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/usr.bin/xlint/lint1 lint: make lint's own code pass the stri...



details:   https://anonhg.NetBSD.org/src/rev/d5b3fa63dd84
branches:  trunk
changeset: 981769:d5b3fa63dd84
user:      rillig <rillig%NetBSD.org@localhost>
date:      Sat Mar 20 19:33:25 2021 +0000

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

No functional change.

diffstat:

 usr.bin/xlint/lint1/Makefile |   3 ++-
 usr.bin/xlint/lint1/lex.c    |   6 +++---
 usr.bin/xlint/lint1/oper.c   |  14 +++++++++-----
 3 files changed, 14 insertions(+), 9 deletions(-)

diffs (72 lines):

diff -r 2d06ccb5a287 -r d5b3fa63dd84 usr.bin/xlint/lint1/Makefile
--- a/usr.bin/xlint/lint1/Makefile      Sat Mar 20 19:24:56 2021 +0000
+++ b/usr.bin/xlint/lint1/Makefile      Sat Mar 20 19:33:25 2021 +0000
@@ -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 @@
 #LFLAGS+=-d
 
 CWARNFLAGS.clang+=     -Wno-error=implicit-int-float-conversion
+LINTFLAGS+=            -T
 
 CPPFLAGS+=     -I${.CURDIR} -I. -DPASS=\"${PROG}.h\"
 CPPFLAGS+=     ${DEBUG:D-DDEBUG}
diff -r 2d06ccb5a287 -r d5b3fa63dd84 usr.bin/xlint/lint1/lex.c
--- a/usr.bin/xlint/lint1/lex.c Sat Mar 20 19:24:56 2021 +0000
+++ b/usr.bin/xlint/lint1/lex.c Sat Mar 20 19:33:25 2021 +0000
@@ -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 @@
        char buf[256];
        const char *name;
 
-       if (!(kw->kw_deco & deco))
+       if ((kw->kw_deco & deco) == 0)
                return;
 
        switch (deco) {
diff -r 2d06ccb5a287 -r d5b3fa63dd84 usr.bin/xlint/lint1/oper.c
--- a/usr.bin/xlint/lint1/oper.c        Sat Mar 20 19:24:56 2021 +0000
+++ b/usr.bin/xlint/lint1/oper.c        Sat Mar 20 19:33:25 2021 +0000
@@ -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 @@
 #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"
 



Home | Main Index | Thread Index | Old Index