Source-Changes-HG archive

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

[src/trunk]: src/usr.bin/make make: fix lint warnings for strict bool mode



details:   https://anonhg.NetBSD.org/src/rev/e7f14aa77d1a
branches:  trunk
changeset: 985885:e7f14aa77d1a
user:      rillig <rillig%NetBSD.org@localhost>
date:      Sun Sep 12 08:03:48 2021 +0000

description:
make: fix lint warnings for strict bool mode

In strict bool mode, lint does not consider 'x & y' as having type bool,
if x and y have integer type, it only allows this for enums.

No functional change.

diffstat:

 usr.bin/make/nonints.h |  4 ++--
 usr.bin/make/targ.c    |  6 +++---
 2 files changed, 5 insertions(+), 5 deletions(-)

diffs (45 lines):

diff -r ab28298504b7 -r e7f14aa77d1a usr.bin/make/nonints.h
--- a/usr.bin/make/nonints.h    Sun Sep 12 07:52:21 2021 +0000
+++ b/usr.bin/make/nonints.h    Sun Sep 12 08:03:48 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: nonints.h,v 1.214 2021/08/14 13:32:12 rillig Exp $     */
+/*     $NetBSD: nonints.h,v 1.215 2021/09/12 08:03:48 rillig Exp $     */
 
 /*
  * Copyright (c) 1988, 1989, 1990, 1993
@@ -203,7 +203,7 @@
 void Targ_PrintNode(GNode *, int);
 void Targ_PrintNodes(GNodeList *, int);
 const char *Targ_FmtTime(time_t);
-void Targ_PrintType(int);
+void Targ_PrintType(GNodeType);
 void Targ_PrintGraph(int);
 void Targ_Propagate(void);
 const char *GNodeMade_Name(GNodeMade);
diff -r ab28298504b7 -r e7f14aa77d1a usr.bin/make/targ.c
--- a/usr.bin/make/targ.c       Sun Sep 12 07:52:21 2021 +0000
+++ b/usr.bin/make/targ.c       Sun Sep 12 08:03:48 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: targ.c,v 1.170 2021/09/12 07:52:21 rillig Exp $        */
+/*     $NetBSD: targ.c,v 1.171 2021/09/12 08:03:48 rillig Exp $        */
 
 /*
  * Copyright (c) 1988, 1989, 1990, 1993
@@ -113,7 +113,7 @@
 #include "dir.h"
 
 /*     "@(#)targ.c     8.2 (Berkeley) 3/19/94" */
-MAKE_RCSID("$NetBSD: targ.c,v 1.170 2021/09/12 07:52:21 rillig Exp $");
+MAKE_RCSID("$NetBSD: targ.c,v 1.171 2021/09/12 08:03:48 rillig Exp $");
 
 /*
  * All target nodes that appeared on the left-hand side of one of the
@@ -416,7 +416,7 @@
 
 /* Print out a type field giving only those attributes the user can set. */
 void
-Targ_PrintType(int type)
+Targ_PrintType(GNodeType type)
 {
        static const struct {
                GNodeType bit;



Home | Main Index | Thread Index | Old Index