From 0a81de38dc1e357210beb23549b5e67579369d0a Mon Sep 17 00:00:00 2001 From: Alex Richardson Date: Thu, 10 Sep 2020 15:37:24 +0000 Subject: [PATCH] Silence GCC's -Wno-unused-result during bootstrap Unlike clang, GCC still warns even with (void) casts (https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66425) --- tools/build/mk/Makefile.boot | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tools/build/mk/Makefile.boot b/tools/build/mk/Makefile.boot index 1d121e916a71..b83f417b524f 100644 --- a/tools/build/mk/Makefile.boot +++ b/tools/build/mk/Makefile.boot @@ -96,3 +96,6 @@ UPDATE_DEPENDFILE= no Error was caused by Makefile in ${.CURDIR} .endif .endif + +# GCC doesn't allow silencing warn_unused_result calls with (void) casts. +CFLAGS.gcc+=-Wno-unused-result