From f6631241cb83b03c0b4d51f19fadb485a995b19b Mon Sep 17 00:00:00 2001 From: Paolo Bonzini Date: Mon, 22 Jul 2019 13:01:40 +0200 Subject: avoid out-of-bounds warnings with recent compilers Signed-off-by: Paolo Bonzini --- hwsetup.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hwsetup.c b/hwsetup.c index e8a452e..617af06 100644 --- a/hwsetup.c +++ b/hwsetup.c @@ -97,8 +97,8 @@ void setup_pam(int bdf, int pambase) void setup_hw(void) { const int bdf = 0; - const uint8_t *bios_start = &stext + 0xfff00000; - const uint8_t *init_start = &sinit + 0xfff00000; + const uint8_t *bios_start = (void *)((uintptr_t)&stext + 0xfff00000); + const uint8_t *init_start = (void *)((uintptr_t)&sinit + 0xfff00000); volatile uint8_t *rom_check = &stext; int rom_check_value; int pambase; -- cgit v1.1