From: Kevin O'Connor Date: Sat, 18 Dec 2021 17:08:53 +0000 (-0500) Subject: memmap: Fix gcc out-of-bounds warning X-Git-Tag: rel-1.16.0~13 X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=98dd53b99442ae15d78125b4453b1adc926e9ff3;p=seabios.git memmap: Fix gcc out-of-bounds warning Use a different definition for the linker script symbol to avoid a gcc warning. Signed-off-by: Kevin O'Connor --- diff --git a/src/memmap.h b/src/memmap.h index 22bd4bc..32ca265 100644 --- a/src/memmap.h +++ b/src/memmap.h @@ -15,7 +15,7 @@ static inline void *memremap(u32 addr, u32 len) { } // Return the value of a linker script symbol (see scripts/layoutrom.py) -#define SYMBOL(SYM) ({ extern char SYM; (u32)&SYM; }) +#define SYMBOL(SYM) ({ extern char SYM[]; (u32)SYM; }) #define VSYMBOL(SYM) ((void*)SYMBOL(SYM)) #endif // memmap.h