[OpenBIOS] [PATCH 2/2] x86: remove static declaration from mbheader definition

Mark Cave-Ayland mark.cave-ayland at ilande.co.uk
Sat Jan 13 22:26:02 CET 2018

Newer versions of gcc fail to compile OpenBIOS giving a
"error: ‘multiboot_header’ defined but not used" message when the default
build with -Werror enabled is used.

Remove the static declaration to enable compilation to succeed, which
incidentally matches the other copies of multiboot.c in the OpenBIOS
source tree.

Signed-off-by: Mark Cave-Ayland <mark.cave-ayland at ilande.co.uk>
 arch/x86/multiboot.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/x86/multiboot.c b/arch/x86/multiboot.c
index 6f6b23d..7590dab 100644
--- a/arch/x86/multiboot.c
+++ b/arch/x86/multiboot.c
@@ -15,7 +15,7 @@ struct mbheader {
     unsigned int magic, flags, checksum;
-static const struct mbheader multiboot_header
+const struct mbheader multiboot_header
 	__attribute__((section (".hdr"))) =

More information about the OpenBIOS mailing list