summaryrefslogtreecommitdiffstats
path: root/lib/libc/regex/regcomp.c
diff options
context:
space:
mode:
authorkrw <krw@openbsd.org>2016-12-21 15:13:50 +0000
committerkrw <krw@openbsd.org>2016-12-21 15:13:50 +0000
commitd4b3d3fe2366719aecc5a01b4cc0e28bfc865649 (patch)
tree6e2edb53ad750da39113a06f97ad17c54e71b8f4 /lib/libc/regex/regcomp.c
parentEnsure negative time/timeout are handled appropriately. (diff)
downloadwireguard-openbsd-d4b3d3fe2366719aecc5a01b4cc0e28bfc865649.tar.xz
wireguard-openbsd-d4b3d3fe2366719aecc5a01b4cc0e28bfc865649.zip
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/regcomp.c')
-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))