diff options
author | Matt Fleming <matt.fleming@intel.com> | 2012-04-03 13:55:51 +0100 |
---|---|---|
committer | Matt Fleming <matt.fleming@intel.com> | 2012-04-17 10:58:35 +0100 |
commit | 89a895892ee63536535a2a2af3c034559b2acb9a (patch) | |
tree | c55b4d57ec87d8f1d024b6c4b0cac8f8058779f3 | |
parent | fde7c70aece27186cc636df51d25c1099ab7e663 (diff) | |
download | syslinux-89a895892ee63536535a2a2af3c034559b2acb9a.tar.gz syslinux-89a895892ee63536535a2a2af3c034559b2acb9a.tar.xz syslinux-89a895892ee63536535a2a2af3c034559b2acb9a.zip |
init: Fix up compiler warnings
Fix up the following compiler warnings by including appropriate
headers, applying some casts, and changing some data types,
init.c:7:1: warning: large integer implicitly truncated to unsigned type
init.c: In function ‘check_escapes’:
init.c:32:10: warning: cast from pointer to integer of different size
init.c:46:4: warning: implicit declaration of function ‘writestr’
init.c: In function ‘bios_timer_init’:
init.c:57:19: warning: initialization makes pointer from integer without a cast
init.c:61:8: warning: assignment makes integer from pointer without a cast
init.c: In function ‘init’:
init.c:74:2: warning: implicit declaration of function ‘adjust_screen’
init.c:75:2: warning: implicit declaration of function ‘printf_init’
Signed-off-by: Matt Fleming <matt.fleming@intel.com>
-rw-r--r-- | core/init.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/core/init.c b/core/init.c index c1ba298e..fab1ad4f 100644 --- a/core/init.c +++ b/core/init.c @@ -4,7 +4,7 @@ #include <fs.h> #include <bios.h> -static uint16_t min_lowmem_heap = 65536; +static uint32_t min_lowmem_heap = 65536; extern char __lowmem_heap[]; uint8_t KbdFlags; /* Check for keyboard escapes */ @@ -29,7 +29,7 @@ static inline void check_escapes(void) __intcall(0x12, &ireg, &oreg); - mem = ((uint16_t)__lowmem_heap) + min_lowmem_heap + 1023; + mem = ((uint32_t)__lowmem_heap) + min_lowmem_heap + 1023; mem = mem >> 10; if (mem < oreg.eax.w[0]) { @@ -54,13 +54,14 @@ extern uint32_t timer_irq; static inline void bios_timer_init(void) { unsigned long next; - uint32_t *hook = BIOS_timer_hook; + uint32_t *hook = (uint32_t *)BIOS_timer_hook; next = *hook; BIOS_timer_next = next; - *hook = &timer_irq; + *hook = (uint32_t)&timer_irq; } +extern void printf_init(void); void init(com32sys_t *regs) { int i; |