[PATCH 4/6] qemuppc/start/cmain.c: Cast args to memcpy and bzero to fix warnings
Joel Sherrill
joel at rtems.org
Mon Oct 8 13:26:45 UTC 2018
---
bsps/powerpc/qemuppc/start/cmain.c | 19 ++++++++++++++-----
1 file changed, 14 insertions(+), 5 deletions(-)
diff --git a/bsps/powerpc/qemuppc/start/cmain.c b/bsps/powerpc/qemuppc/start/cmain.c
index bf46d03..b49f240 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"); */
--
1.8.3.1
More information about the devel
mailing list