Fix code to allow usage of -Wall in libpayload and the sample (trivial).
This even fixes two bugs: - get_cpu_speed() didn't return a value. - The line win->_color - PAIR_NUMBER(0); should actually be win->_color = PAIR_NUMBER(0); Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de> Acked-by: Uwe Hermann <uwe@hermann-uwe.de> git-svn-id: svn://svn.coreboot.org/coreboot/trunk@3182 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
This commit is contained in:
@@ -83,7 +83,7 @@ static int cb_parse_header(void *addr, int len, struct sysinfo_t *info)
|
||||
|
||||
for (i = 0; i < len; i += 16, ptr += 16) {
|
||||
header = (struct cb_header *)ptr;
|
||||
if (!strncmp(header->signature, "LBIO", 4))
|
||||
if (!strncmp((const char *)header->signature, "LBIO", 4))
|
||||
break;
|
||||
}
|
||||
|
||||
|
@@ -27,7 +27,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include <arch/types.h>
|
||||
#include <libpayload.h>
|
||||
|
||||
/*
|
||||
* This structure seeds the stack. We provide the return address of our main
|
||||
|
@@ -62,6 +62,8 @@ unsigned int get_cpu_speed(void)
|
||||
* Multiply that by the number of measured clocks to get the kHz value.
|
||||
*/
|
||||
cpu_khz = (unsigned int)((end - start) * 1193180U / (1000 * 0xffff));
|
||||
|
||||
return cpu_khz;
|
||||
}
|
||||
|
||||
static inline void _delay(unsigned int delta)
|
||||
|
Reference in New Issue
Block a user