2008-07-04 Pavel Roskin <proski@gnu.org>
+ * kern/i386/linuxbios/init.c (grub_machine_init): Cast addr to
+ grub_addr_t before casting it to the void pointer to fix a
+ warning. Non-addressable regions are discarded earlier.
+ (grub_arch_modules_addr): Cast _end to grub_addr_t.
+ * kern/i386/linuxbios/table.c: Include grub/misc.h.
+ (check_signature): Don't shadow table_header.
+ (grub_linuxbios_table_iterate): Cast numeric constants to
+ grub_linuxbios_table_header_t.
+ * include/grub/i386/linuxbios/init.h: Add noreturn attribute to
+ grub_stop().
+
* kern/ieee1275/init.c: Cast _start and _end to grub_addr_t to
prevent warnings.
#include <grub/symbol.h>
#include <grub/i386/pc/memory.h>
-void EXPORT_FUNC(grub_stop) (void);
+void EXPORT_FUNC(grub_stop) (void) __attribute__ ((noreturn));
void EXPORT_FUNC(grub_stop_floppy) (void);
#endif
quarter);
}
else
- grub_mm_init_region ((void *) addr, (grub_size_t) size);
+ grub_mm_init_region ((void *) (grub_addr_t) addr, (grub_size_t) size);
return 0;
}
grub_addr_t
grub_arch_modules_addr (void)
{
- return ALIGN_UP(_end, GRUB_MOD_ALIGN);
+ return ALIGN_UP((grub_addr_t) _end, GRUB_MOD_ALIGN);
}
#include <grub/machine/memory.h>
#include <grub/types.h>
#include <grub/err.h>
+#include <grub/misc.h>
static grub_err_t
grub_linuxbios_table_iterate (int (*hook) (grub_linuxbios_table_item_t))
grub_linuxbios_table_item_t table_item;
auto int check_signature (grub_linuxbios_table_header_t);
- int check_signature (grub_linuxbios_table_header_t table_header)
+ int check_signature (grub_linuxbios_table_header_t tbl_header)
{
- if (! grub_memcmp (table_header->signature, "LBIO", 4))
+ if (! grub_memcmp (tbl_header->signature, "LBIO", 4))
return 1;
return 0;
/* Assuming table_header is aligned to its size (8 bytes). */
- for (table_header = 0x500; table_header < 0x1000; table_header++)
+ for (table_header = (grub_linuxbios_table_header_t) 0x500;
+ table_header < (grub_linuxbios_table_header_t) 0x1000; table_header++)
if (check_signature (table_header))
goto signature_found;
- for (table_header = 0xf0000; table_header < 0x100000; table_header++)
+ for (table_header = (grub_linuxbios_table_header_t) 0xf0000;
+ table_header < (grub_linuxbios_table_header_t) 0x100000; table_header++)
if (check_signature (table_header))
goto signature_found;