lint: suppress remaining lint warnings in generated scan.c

Warning 162 about 'unsigned <= 0' feels too ambitious, it may be
restricted to the clearly wrong 'unsigned < 0' in the future.

Warnings 192 and 214 are a result of the strict bool check, but the
error messages are suppressed, which makes it hard to see why lint says
the local variable were unused and the function would not return a
value.

Warning 307 about unused static variables is OK for generated code.
This commit is contained in:
rillig 2021-09-05 16:36:56 +00:00
parent 23abc09eef
commit 0cf11ad54d
1 changed files with 4 additions and 1 deletions

View File

@ -1,4 +1,4 @@
# $NetBSD: Makefile,v 1.85 2021/09/05 13:46:31 rillig Exp $
# $NetBSD: Makefile,v 1.86 2021/09/05 16:36:56 rillig Exp $
.include <bsd.own.mk>
@ -20,6 +20,9 @@ LINTFLAGS+= -T
LOBJS.${PROG}+= ${SRCS:M*.y:.y=.ln}
LOBJS.${PROG}+= ${SRCS:M*.l:.l=.ln}
LINTFLAGS.scan.c+= -X 107,126,330,331,332,333 # strict bool mode
LINTFLAGS.scan.c+= -X 162 # comparison of 'unsigned <= 0'
LINTFLAGS.scan.c+= -X 192,214 # due to suppressed bool errors
LINTFLAGS.scan.c+= -X 307 # static variable unused
CPPFLAGS+= -DIS_LINT1
CPPFLAGS+= -I${.CURDIR}