Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.bin/xlint/lint2 lint: force strict bool mode
details: https://anonhg.NetBSD.org/src/rev/93f694f5bea6
branches: trunk
changeset: 1022812:93f694f5bea6
user: rillig <rillig%NetBSD.org@localhost>
date: Sun Aug 08 11:56:35 2021 +0000
description:
lint: force strict bool mode
No functional change.
diffstat:
usr.bin/xlint/lint2/Makefile | 3 ++-
usr.bin/xlint/lint2/chk.c | 10 +++++-----
usr.bin/xlint/lint2/read.c | 6 +++---
3 files changed, 10 insertions(+), 9 deletions(-)
diffs (83 lines):
diff -r 53c44eade48b -r 93f694f5bea6 usr.bin/xlint/lint2/Makefile
--- a/usr.bin/xlint/lint2/Makefile Sun Aug 08 11:11:29 2021 +0000
+++ b/usr.bin/xlint/lint2/Makefile Sun Aug 08 11:56:35 2021 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.20 2021/04/18 22:51:24 rillig Exp $
+# $NetBSD: Makefile,v 1.21 2021/08/08 11:56:35 rillig Exp $
NOMAN= # defined
@@ -7,6 +7,7 @@
inittyp.c tyname.c
BINDIR= /usr/libexec
CPPFLAGS+= -I${.CURDIR}
+LINTFLAGS+= -T # strict bool mode
COPTS.msg.c+= ${${ACTIVE_CC} == "clang":? -Wno-format-nonliteral :}
diff -r 53c44eade48b -r 93f694f5bea6 usr.bin/xlint/lint2/chk.c
--- a/usr.bin/xlint/lint2/chk.c Sun Aug 08 11:11:29 2021 +0000
+++ b/usr.bin/xlint/lint2/chk.c Sun Aug 08 11:56:35 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: chk.c,v 1.42 2021/04/02 12:16:50 rillig Exp $ */
+/* $NetBSD: chk.c,v 1.43 2021/08/08 11:56:35 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: chk.c,v 1.42 2021/04/02 12:16:50 rillig Exp $");
+__RCSID("$NetBSD: chk.c,v 1.43 2021/08/08 11:56:35 rillig Exp $");
#endif
#include <ctype.h>
@@ -1085,9 +1085,9 @@
* but for now I don't want to be bothered by this warnings
* which are almost always useless.
*/
- if (hflag == 0)
+ if (!hflag)
return;
- if (hflag == 1 && bsearch(hte->h_name, ignorelist,
+ if (hflag && bsearch(hte->h_name, ignorelist,
__arraycount(ignorelist), sizeof(ignorelist[0]),
(int (*)(const void *, const void *))strcmp) != NULL)
return;
@@ -1340,7 +1340,7 @@
while (*a1 != NULL && *a2 != NULL) {
- if (eqtype(*a1, *a2, true, false, false, dowarn) == 0)
+ if (!eqtype(*a1, *a2, true, false, false, dowarn))
return false;
a1++;
diff -r 53c44eade48b -r 93f694f5bea6 usr.bin/xlint/lint2/read.c
--- a/usr.bin/xlint/lint2/read.c Sun Aug 08 11:11:29 2021 +0000
+++ b/usr.bin/xlint/lint2/read.c Sun Aug 08 11:56:35 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: read.c,v 1.48 2021/08/05 06:54:16 rillig Exp $ */
+/* $NetBSD: read.c,v 1.49 2021/08/08 11:56:35 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: read.c,v 1.48 2021/08/05 06:54:16 rillig Exp $");
+__RCSID("$NetBSD: read.c,v 1.49 2021/08/08 11:56:35 rillig Exp $");
#endif
#include <ctype.h>
@@ -402,7 +402,7 @@
sym.s_def = DECL;
break;
case 'i':
- if (sym.s_inline != NODECL)
+ if (sym.s_inline)
inperr("inline %c", c);
sym.s_inline = true;
break;
Home |
Main Index |
Thread Index |
Old Index