summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoel Sherrill <joel@rtems.org>2018-09-04 08:35:37 -0500
committerJoel Sherrill <joel@rtems.org>2018-10-18 12:05:41 -0500
commitc1233a334b81c7cc5585ee7c22fb4ed7820a068e (patch)
tree4f1b3d8775c7d873f312438d49742f99c1a4391f
parent156b77a0641b5ca82029325574122f629d2dabff (diff)
qemuppc/start/cmain.c: Cast args to memcpy and bzero to fix warnings
-rw-r--r--bsps/powerpc/qemuppc/start/cmain.c19
1 files changed, 14 insertions, 5 deletions
diff --git a/bsps/powerpc/qemuppc/start/cmain.c b/bsps/powerpc/qemuppc/start/cmain.c
index bf46d03177..b49f2404f0 100644
--- a/bsps/powerpc/qemuppc/start/cmain.c
+++ b/bsps/powerpc/qemuppc/start/cmain.c
@@ -18,15 +18,20 @@ __inb(int port)
#endif
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--)
*d++ = *s++;
}
static void
-__bzero (unsigned char *d, int len)
+__bzero (void *dv, size_t len)
{
+ unsigned char *d = (unsigned char *) dv;
+
while (len--)
*d++ = 0;
}
@@ -43,9 +48,13 @@ void cmain (void)
/*
* init variable sections
*/
- __memcpy (bsp_section_data_begin, bsp_section_data_load_begin, (int)bsp_section_data_size);
- __bzero (bsp_section_bss_begin, (int)bsp_section_bss_size);
- __bzero (bsp_section_sbss_begin, (int)bsp_section_sbss_size);
+ __memcpy(
+ (char *)bsp_section_data_begin,
+ (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"); */
boot_card(0);
/* printk( "end of BSP\n"); */