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 a few lint warnings about type mismat...
details: https://anonhg.NetBSD.org/src/rev/b137080be991
branches: trunk
changeset: 1026565:b137080be991
user: rillig <rillig%NetBSD.org@localhost>
date: Sun Nov 28 23:12:51 2021 +0000
description:
make: fix a few lint warnings about type mismatch in enum comparisons
These warnings were triggered with the lint flag '-e', which enables
additional checks on enums. This check would have detected the type
mismatch from the previous commit.
The check has a few strange warnings though, complaining about
initialization of 'unsigned long' with 'unsigned long', so don't enable
it for the official builds.
No functional change.
diffstat:
usr.bin/make/compat.c | 8 ++++----
usr.bin/make/make.c | 6 +++---
usr.bin/make/make.h | 4 ++--
3 files changed, 9 insertions(+), 9 deletions(-)
diffs (81 lines):
diff -r 029f568ddaf6 -r b137080be991 usr.bin/make/compat.c
--- a/usr.bin/make/compat.c Sun Nov 28 22:58:55 2021 +0000
+++ b/usr.bin/make/compat.c Sun Nov 28 23:12:51 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: compat.c,v 1.228 2021/11/28 19:51:06 rillig Exp $ */
+/* $NetBSD: compat.c,v 1.229 2021/11/28 23:12:51 rillig Exp $ */
/*
* Copyright (c) 1988, 1989, 1990 The Regents of the University of California.
@@ -96,7 +96,7 @@
#include "pathnames.h"
/* "@(#)compat.c 8.2 (Berkeley) 3/19/94" */
-MAKE_RCSID("$NetBSD: compat.c,v 1.228 2021/11/28 19:51:06 rillig Exp $");
+MAKE_RCSID("$NetBSD: compat.c,v 1.229 2021/11/28 23:12:51 rillig Exp $");
static GNode *curTarg = NULL;
static pid_t compatChild;
@@ -237,7 +237,7 @@
* using a shell */
const char *volatile cmd = cmdp;
- silent = (gn->type & OP_SILENT) != 0;
+ silent = (gn->type & OP_SILENT) != OP_NONE;
errCheck = !(gn->type & OP_IGNORE);
doIt = false;
@@ -562,7 +562,7 @@
RunCommands(gn);
curTarg = NULL;
} else {
- Job_Touch(gn, (gn->type & OP_SILENT) != 0);
+ Job_Touch(gn, (gn->type & OP_SILENT) != OP_NONE);
}
} else {
gn->made = ERROR;
diff -r 029f568ddaf6 -r b137080be991 usr.bin/make/make.c
--- a/usr.bin/make/make.c Sun Nov 28 22:58:55 2021 +0000
+++ b/usr.bin/make/make.c Sun Nov 28 23:12:51 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: make.c,v 1.247 2021/11/28 22:48:06 rillig Exp $ */
+/* $NetBSD: make.c,v 1.248 2021/11/28 23:12:51 rillig Exp $ */
/*
* Copyright (c) 1988, 1989, 1990, 1993
@@ -104,7 +104,7 @@
#include "job.h"
/* "@(#)make.c 8.1 (Berkeley) 6/6/93" */
-MAKE_RCSID("$NetBSD: make.c,v 1.247 2021/11/28 22:48:06 rillig Exp $");
+MAKE_RCSID("$NetBSD: make.c,v 1.248 2021/11/28 23:12:51 rillig Exp $");
/* Sequence # to detect recursion. */
static unsigned int checked_seqno = 1;
@@ -144,7 +144,7 @@
Buffer buf;
Buf_InitSize(&buf, 32);
-#define ADD(flag) Buf_AddFlag(&buf, (type & (flag)) != 0, #flag)
+#define ADD(flag) Buf_AddFlag(&buf, (type & (flag)) != OP_NONE, #flag)
ADD(OP_DEPENDS);
ADD(OP_FORCE);
ADD(OP_DOUBLEDEP);
diff -r 029f568ddaf6 -r b137080be991 usr.bin/make/make.h
--- a/usr.bin/make/make.h Sun Nov 28 22:58:55 2021 +0000
+++ b/usr.bin/make/make.h Sun Nov 28 23:12:51 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: make.h,v 1.269 2021/11/28 20:11:45 rillig Exp $ */
+/* $NetBSD: make.h,v 1.270 2021/11/28 23:12:51 rillig Exp $ */
/*
* Copyright (c) 1988, 1989, 1990, 1993
@@ -706,7 +706,7 @@
MAKE_INLINE bool
GNode_IsTarget(const GNode *gn)
{
- return (gn->type & OP_OPMASK) != 0;
+ return (gn->type & OP_OPMASK) != OP_NONE;
}
MAKE_INLINE const char *
Home |
Main Index |
Thread Index |
Old Index