summaryrefslogtreecommitdiff
path: root/lib/libc/regex
diff options
context:
space:
mode:
authorKenneth R Westerback <krw@cvs.openbsd.org>2016-12-21 15:13:51 +0000
committerKenneth R Westerback <krw@cvs.openbsd.org>2016-12-21 15:13:51 +0000
commitc2c91178baa70f7b02766ee52dd97bb552aced4c (patch)
tree2251f3c9c96357b5330bf337c443f625a0be9861 /lib/libc/regex
parente7ef01b8e76c5e1303396dd4a7b5a55ccd2f6190 (diff)
Adopt relevant part of NetBSD's r1.7 commit to discard unused results of the
expressions generated by the REQUIRE() macro. Thus eliminating from build output 100 lines or so of gcc complaints about "computed but not used". cluebat & ok tom@
Diffstat (limited to 'lib/libc/regex')
-rw-r--r--lib/libc/regex/regcomp.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/libc/regex/regcomp.c b/lib/libc/regex/regcomp.c
index d848a492614..f25ed8ce148 100644
--- a/lib/libc/regex/regcomp.c
+++ b/lib/libc/regex/regcomp.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: regcomp.c,v 1.29 2016/09/21 04:38:56 guenther Exp $ */
+/* $OpenBSD: regcomp.c,v 1.30 2016/12/21 15:13:50 krw Exp $ */
/*-
* Copyright (c) 1992, 1993, 1994 Henry Spencer.
* Copyright (c) 1992, 1993, 1994
@@ -124,7 +124,7 @@ static char nuls[10]; /* place to point scanner in event of error */
#define NEXTn(n) (p->next += (n))
#define GETNEXT() (*p->next++)
#define SETERROR(e) seterr(p, (e))
-#define REQUIRE(co, e) ((co) || SETERROR(e))
+#define REQUIRE(co, e) (void) ((co) || SETERROR(e))
#define MUSTSEE(c, e) (REQUIRE(MORE() && PEEK() == (c), e))
#define MUSTEAT(c, e) (REQUIRE(MORE() && GETNEXT() == (c), e))
#define MUSTNOTSEE(c, e) (REQUIRE(!MORE() || PEEK() != (c), e))