From af58ab3dbc2bc577e9232afae7933a359340587b Mon Sep 17 00:00:00 2001 From: proski Date: Fri, 4 Jul 2008 03:01:55 +0000 Subject: [PATCH] 2008-07-04 Pavel Roskin * kern/ieee1275/init.c: Cast _start and _end to grub_addr_t to prevent warnings. --- ChangeLog | 3 +++ kern/ieee1275/init.c | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index baed5558a..f232e08fe 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ 2008-07-04 Pavel Roskin + * kern/ieee1275/init.c: Cast _start and _end to grub_addr_t to + prevent warnings. + * include/grub/misc.h (ALIGN_UP): Avoid unnecessary cast to a pointer, which can cause warnings. Support 64-bit addresses. diff --git a/kern/ieee1275/init.c b/kern/ieee1275/init.c index 26aca778e..efa7ca7ae 100644 --- a/kern/ieee1275/init.c +++ b/kern/ieee1275/init.c @@ -148,7 +148,7 @@ static void grub_claim_heap (void) as a safegard in case that doesn't happen. It does, however, not protect us from corrupting our module area, which extends up to a yet-undetermined region above _end. */ - if ((addr < _end) && ((addr + len) > _start)) + if ((addr < (grub_addr_t) _end) && ((addr + len) > (grub_addr_t) _start)) { grub_printf ("Warning: attempt to claim over our own code!\n"); len = 0; @@ -273,5 +273,5 @@ grub_get_rtc (void) grub_addr_t grub_arch_modules_addr (void) { - return ALIGN_UP(_end + GRUB_MOD_GAP, GRUB_MOD_ALIGN); + return ALIGN_UP((grub_addr_t) _end + GRUB_MOD_GAP, GRUB_MOD_ALIGN); }