mirror of
https://gitlab.com/qemu-project/openbios.git
synced 2024-02-13 08:34:06 +08:00
Fix x86 warnings, enable more warnings
git-svn-id: svn://coreboot.org/openbios/openbios-devel@359 f158a5a8-5612-0410-a976-696ce0be7e32
This commit is contained in:
@@ -15,11 +15,6 @@
|
||||
#include "sys_info.h"
|
||||
#include "boot.h"
|
||||
|
||||
int elf_load(struct sys_info *, const char *filename, const char *cmdline);
|
||||
int linux_load(struct sys_info *, const char *filename, const char *cmdline);
|
||||
|
||||
void boot(void);
|
||||
|
||||
struct sys_info sys_info;
|
||||
|
||||
void boot(void)
|
||||
|
||||
@@ -11,3 +11,4 @@ int elf_load(struct sys_info *info, const char *filename, const char *cmdline);
|
||||
int linux_load(struct sys_info *info, const char *file, const char *cmdline);
|
||||
|
||||
unsigned int start_elf(unsigned long entry_point, unsigned long param);
|
||||
void boot(void);
|
||||
|
||||
@@ -19,7 +19,6 @@
|
||||
#define ADDRMASK 0x00ffffff
|
||||
/* #define ADDRMASK 0xffffffff // old behavior */
|
||||
|
||||
extern unsigned int start_elf(unsigned long entry_point, unsigned long param);
|
||||
extern char _start, _end;
|
||||
|
||||
static char *image_name, *image_version;
|
||||
@@ -212,7 +211,7 @@ static int verify_image(Elf_ehdr *ehdr, Elf_phdr *phdr, int phnum,
|
||||
return 1;
|
||||
}
|
||||
|
||||
static inline unsigned const padded(unsigned s)
|
||||
static inline unsigned padded(unsigned s)
|
||||
{
|
||||
return (s + 3) & ~3;
|
||||
}
|
||||
@@ -310,7 +309,7 @@ int elf_load(struct sys_info *info, const char *filename, const char *cmdline)
|
||||
Elf_phdr *phdr = NULL;
|
||||
unsigned long phdr_size;
|
||||
unsigned long checksum_offset;
|
||||
unsigned short checksum;
|
||||
unsigned short checksum = 0;
|
||||
Elf_Bhdr *boot_notes = NULL;
|
||||
int retval = -1;
|
||||
int image_retval;
|
||||
|
||||
@@ -22,7 +22,7 @@ struct eregs {
|
||||
uint32_t eflags;
|
||||
};
|
||||
|
||||
static char *exception_names[]= {
|
||||
static const char * const exception_names[]= {
|
||||
"division by zero",
|
||||
"single step",
|
||||
"NMI",
|
||||
|
||||
@@ -45,7 +45,7 @@ void *malloc(int size)
|
||||
if(memsize>=size) {
|
||||
memsize-=size;
|
||||
ret=memptr;
|
||||
memptr+=size;
|
||||
memptr = (void *)((unsigned long)memptr + size);
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -65,7 +65,7 @@ void collect_multiboot_info(struct sys_info *info)
|
||||
mod = (module_t *) mbinfo->mods_addr;
|
||||
info->dict_start=(unsigned long *)mod->mod_start;
|
||||
info->dict_end=(unsigned long *)mod->mod_end;
|
||||
debug("multiboot: dictionary at %x-%x\n",
|
||||
debug("multiboot: dictionary at %p-%p\n",
|
||||
info->dict_start, info->dict_end);
|
||||
|
||||
if (mbinfo->flags & MULTIBOOT_MMAP_VALID) {
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
|
||||
void boot(void);
|
||||
|
||||
static char intdict[256 * 1024];
|
||||
static unsigned char intdict[256 * 1024];
|
||||
|
||||
static void init_memory(void)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user