summaryrefslogtreecommitdiff
path: root/usr.bin/make/suff.c
diff options
context:
space:
mode:
authorrillig <rillig@NetBSD.org>2021-07-31 09:30:17 +0000
committerrillig <rillig@NetBSD.org>2021-07-31 09:30:17 +0000
commitf0384cf51a0a7decc5c73f3801ac2730b3aee5a8 (patch)
tree0a7ffeab732f2d73f30ce1c5d37d471b93c57fe2 /usr.bin/make/suff.c
parent675b921214b7463e3a1020e0b9eec13351a5d630 (diff)
make: fix lint warnings
The string functions from str.h are declared as 'static __unused' when compiled with GCC, but lint explicitly undefines __GCC__ during preprocessing. Therefore, make those functions inline, to prevent warnings that they are unused. The macro UNCONST is used in a few places, and (again) since lint undefines __GCC__, that macro expanded to a simple type cast, which lint warned about. To prevent this warning, implement UNCONST as a function that works everywhere and hides the type cast. In filemon_open, the code for closing F->in was obviously unreachable. No functional change.
Diffstat (limited to 'usr.bin/make/suff.c')
-rw-r--r--usr.bin/make/suff.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/usr.bin/make/suff.c b/usr.bin/make/suff.c
index b2c926a2b8b..0dc6624b667 100644
--- a/usr.bin/make/suff.c
+++ b/usr.bin/make/suff.c
@@ -1,4 +1,4 @@
-/* $NetBSD: suff.c,v 1.350 2021/04/04 10:05:08 rillig Exp $ */
+/* $NetBSD: suff.c,v 1.351 2021/07/31 09:30:17 rillig Exp $ */
/*
* Copyright (c) 1988, 1989, 1990, 1993
@@ -115,7 +115,7 @@
#include "dir.h"
/* "@(#)suff.c 8.4 (Berkeley) 3/21/94" */
-MAKE_RCSID("$NetBSD: suff.c,v 1.350 2021/04/04 10:05:08 rillig Exp $");
+MAKE_RCSID("$NetBSD: suff.c,v 1.351 2021/07/31 09:30:17 rillig Exp $");
typedef List SuffixList;
typedef ListNode SuffixListNode;
@@ -619,6 +619,7 @@ Suff_AddTransform(const char *name)
/* TODO: Avoid the redundant parsing here. */
bool ok = ParseTransform(name, &srcSuff, &targSuff);
assert(ok);
+ /* LINTED 129 *//* expression has null effect */
(void)ok;
}