forked from Imagelibrary/rtems
qemuppc/start/cmain.c: Cast args to memcpy and bzero to fix warnings
This commit is contained in:
@@ -18,15 +18,20 @@ __inb(int port)
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
static void
|
static void
|
||||||
__memcpy (unsigned char *d, unsigned char *s, int len)
|
__memcpy (void *dv, void *sv, size_t len)
|
||||||
{
|
{
|
||||||
|
unsigned char *d = (unsigned char *) dv;
|
||||||
|
unsigned char *s = (unsigned char *) sv;
|
||||||
|
|
||||||
while (len--)
|
while (len--)
|
||||||
*d++ = *s++;
|
*d++ = *s++;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
__bzero (unsigned char *d, int len)
|
__bzero (void *dv, size_t len)
|
||||||
{
|
{
|
||||||
|
unsigned char *d = (unsigned char *) dv;
|
||||||
|
|
||||||
while (len--)
|
while (len--)
|
||||||
*d++ = 0;
|
*d++ = 0;
|
||||||
}
|
}
|
||||||
@@ -43,9 +48,13 @@ void cmain (void)
|
|||||||
/*
|
/*
|
||||||
* init variable sections
|
* init variable sections
|
||||||
*/
|
*/
|
||||||
__memcpy (bsp_section_data_begin, bsp_section_data_load_begin, (int)bsp_section_data_size);
|
__memcpy(
|
||||||
__bzero (bsp_section_bss_begin, (int)bsp_section_bss_size);
|
(char *)bsp_section_data_begin,
|
||||||
__bzero (bsp_section_sbss_begin, (int)bsp_section_sbss_size);
|
(char *) bsp_section_data_load_begin,
|
||||||
|
(int)bsp_section_data_size
|
||||||
|
);
|
||||||
|
__bzero((char *)bsp_section_bss_begin, (int)bsp_section_bss_size);
|
||||||
|
__bzero((char *)bsp_section_sbss_begin, (int)bsp_section_sbss_size);
|
||||||
/* printk( "start of BSP\n"); */
|
/* printk( "start of BSP\n"); */
|
||||||
boot_card(0);
|
boot_card(0);
|
||||||
/* printk( "end of BSP\n"); */
|
/* printk( "end of BSP\n"); */
|
||||||
|
|||||||
Reference in New Issue
Block a user