From dca65ca25417c16f89024d4d2a3619a0967139c4 Mon Sep 17 00:00:00 2001 From: Peter Jones Date: Fri, 29 Sep 2017 11:01:10 -0400 Subject: [PATCH] Make shim_cert.h able to be included more safely. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit If you build with ENABLE_SHIM_CERT=1, the include chain right now winds up meaning shim_cert is defined in a header that gets included in netboot.c as well, which never uses it: In file included from shim.h:125:0, from netboot.c:36: shim_cert.h:1:14: error: ‘shim_cert’ defined but not used [-Werror=unused-variable] static UINT8 shim_cert[] = { ^~~~~~~~~ cc1: all warnings being treated as errors So make that okay by adding __attribute__((__unused__)) to the variable decl. Signed-off-by: Peter Jones --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 91873f3..db65c45 100644 --- a/Makefile +++ b/Makefile @@ -171,7 +171,7 @@ shim.cer: shim.crt .NOTPARALLEL: shim_cert.h shim_cert.h: shim.cer - echo "static UINT8 shim_cert[] = {" > $@ + echo "static UINT8 shim_cert[] __attribute__((__unused__)) = {" > $@ $(HEXDUMP) -v -e '1/1 "0x%02x, "' $< >> $@ echo "};" >> $@