diff options
author | Kevin O'Connor <kevin@koconnor.net> | 2021-12-18 12:08:53 -0500 |
---|---|---|
committer | Kevin O'Connor <kevin@koconnor.net> | 2021-12-18 12:08:53 -0500 |
commit | 98dd53b99442ae15d78125b4453b1adc926e9ff3 (patch) | |
tree | 40a6f30e42a3484c065c8503ff13bb0d7b279569 | |
parent | 0a1e7675f7672b29f7bca3cceb8238b4a28d2b00 (diff) | |
download | seabios-98dd53b99442ae15d78125b4453b1adc926e9ff3.tar.gz |
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 <kevin@koconnor.net>
-rw-r--r-- | src/memmap.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/memmap.h b/src/memmap.h index 22bd4bcb..32ca2653 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 |