Sat Jan 30 16:05:45 2021 UTC ()
make(1): run lint with strict bool mode

The make code is not supposed to use constructs such as "if (strcmp(s1,
s2))" or "if (p && *p)", instead all boolean expressions have a form
that would be accepted by a C#, Go or Java compiler as well.  This also
ensures that pre-C99 compilers generate equivalent code as C99
compilers, at least regarding boolean expressions.


(rillig)
diff -r1.111 -r1.112 src/usr.bin/make/Makefile

cvs diff -r1.111 -r1.112 src/usr.bin/make/Makefile (expand / switch to context diff)
--- src/usr.bin/make/Makefile 2020/12/12 16:54:20 1.111
+++ src/usr.bin/make/Makefile 2021/01/30 16:05:45 1.112
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.111 2020/12/12 16:54:20 rillig Exp $
+#	$NetBSD: Makefile,v 1.112 2021/01/30 16:05:45 rillig Exp $
 #	@(#)Makefile	5.2 (Berkeley) 12/28/90
 
 PROG=	make
@@ -126,6 +126,8 @@
 .if make(obj) || make(clean)
 SUBDIR+=	unit-tests
 .endif
+
+LINTFLAGS+=	-T	# strict bool mode, available since 2021-01-11
 
 ${SRCS:M*.c:.c=.o}: ${HDRS}
 CLEANFILES+=	*.o