[rtems commit] qemuppc/start/cmain.c: Cast args to memcpy and bzero to fix warnings
Joel Sherrill
joel at rtems.org
Fri Oct 19 18:03:55 UTC 2018
Module: rtems
Branch: master
Commit: c1233a334b81c7cc5585ee7c22fb4ed7820a068e
Changeset: http://git.rtems.org/rtems/commit/?id=c1233a334b81c7cc5585ee7c22fb4ed7820a068e
Author: Joel Sherrill <joel at rtems.org>
Date: Tue Sep 4 08:35:37 2018 -0500
qemuppc/start/cmain.c: Cast args to memcpy and bzero to fix warnings
---
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"); */
More information about the vc
mailing list