aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2019-07-22 13:01:40 +0200
committerPaolo Bonzini <pbonzini@redhat.com>2019-07-22 13:03:41 +0200
commitf6631241cb83b03c0b4d51f19fadb485a995b19b (patch)
tree2740b65ed102204332723cce32eaf74c37926589
parenta56aa64ed030a30377931a13a3da98a8419326ca (diff)
downloadqboot-f6631241cb83b03c0b4d51f19fadb485a995b19b.zip
qboot-f6631241cb83b03c0b4d51f19fadb485a995b19b.tar.gz
qboot-f6631241cb83b03c0b4d51f19fadb485a995b19b.tar.bz2
avoid out-of-bounds warnings with recent compilers
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
-rw-r--r--hwsetup.c4
1 files 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;