[PATCH 57/62] libbsp/powerpc/shared/startup/zerobss.c: Fix warnings

Joel Sherrill joel.sherrill at oarcorp.com
Wed Oct 15 20:00:47 UTC 2014


---
 c/src/lib/libbsp/powerpc/shared/startup/zerobss.c | 25 ++++++++++++++++++-----
 1 file changed, 20 insertions(+), 5 deletions(-)

diff --git a/c/src/lib/libbsp/powerpc/shared/startup/zerobss.c b/c/src/lib/libbsp/powerpc/shared/startup/zerobss.c
index e9a2516..b3ab1ad 100644
--- a/c/src/lib/libbsp/powerpc/shared/startup/zerobss.c
+++ b/c/src/lib/libbsp/powerpc/shared/startup/zerobss.c
@@ -1,7 +1,9 @@
 /*
  *  zero the various bss areas.
- *
- *  COPYRIGHT (c) 1989-1998.
+ */
+
+/*
+ *  COPYRIGHT (c) 1989-2014.
  *  On-Line Applications Research Corporation (OAR).
  *
  *  The license and distribution terms for this file may be
@@ -13,6 +15,7 @@
  */
 
 #include <string.h>
+#include <bsp.h>
 
 /* prevent these from being accessed in the short data areas */
 extern unsigned long __bss_start[], __SBSS_START__[], __SBSS_END__[];
@@ -21,7 +24,19 @@ extern unsigned long __bss_end[];
 
 void zero_bss(void)
 {
-  memset(__SBSS_START__, 0, ((unsigned) __SBSS_END__) - ((unsigned)__SBSS_START__));
-  memset(__SBSS2_START__, 0, ((unsigned) __SBSS2_END__) - ((unsigned)__SBSS2_START__));
-  memset(__bss_start, 0, ((unsigned) __bss_end) - ((unsigned)__bss_start));
+  memset(
+    __SBSS_START__,
+    0,
+    ((unsigned) __SBSS_END__) - ((unsigned)__SBSS_START__)
+  );
+  memset(
+    __SBSS2_START__,
+    0,
+    ((unsigned) __SBSS2_END__) - ((unsigned)__SBSS2_START__)
+  );
+  memset(
+    __bss_start,
+    0,
+    ((unsigned) __bss_end) - ((unsigned)__bss_start)
+  );
 }
-- 
1.9.3




More information about the devel mailing list