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.
This commit is contained in:
parent
2b10d2fc27
commit
a9883e8879
|
@ -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 @@ Compat_RunCommand(const char *cmdp, GNode *gn, StringListNode *ln)
|
|||
* 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 @@ MakeUnmade(GNode *gn, GNode *pgn)
|
|||
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;
|
||||
|
|
|
@ -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 @@ GNodeType_ToString(GNodeType type, void **freeIt)
|
|||
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);
|
||||
|
|
|
@ -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 @@ bool GNode_ShouldExecute(GNode *gn);
|
|||
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 *
|
||||
|
|
Loading…
Reference in New Issue