[rtems commit] libbsp/powerpc/shared/uboot_getenv.c: Fix warnings

Joel Sherrill joel at rtems.org
Thu Oct 16 13:50:03 UTC 2014


Module:    rtems
Branch:    master
Commit:    e59d26fc1924b59c3ca8cec58b0b7b2898aa7609
Changeset: http://git.rtems.org/rtems/commit/?id=e59d26fc1924b59c3ca8cec58b0b7b2898aa7609

Author:    Joel Sherrill <joel.sherrill at oarcorp.com>
Date:      Wed Oct 15 14:23:30 2014 -0500

libbsp/powerpc/shared/uboot_getenv.c: Fix warnings

---

 c/src/lib/libbsp/powerpc/shared/uboot_getenv.c |   11 +++++++++--
 1 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/c/src/lib/libbsp/powerpc/shared/uboot_getenv.c b/c/src/lib/libbsp/powerpc/shared/uboot_getenv.c
index 9125601..43ef4af 100644
--- a/c/src/lib/libbsp/powerpc/shared/uboot_getenv.c
+++ b/c/src/lib/libbsp/powerpc/shared/uboot_getenv.c
@@ -7,9 +7,16 @@
  *  http://www.rtems.org/license/LICENSE.
  */
 
+#include <bsp.h>
+
+/*
+ * If the BSP variant does not have UBoot, then disable all contents
+ * of this file.
+ */
+#if defined(HAS_UBOOT)
+
 #include <stdint.h>
 #include <string.h>
-#include <bsp.h>
 
 /* Assumed to be provided by BSP */
 extern const uint8_t *uboot_environment;
@@ -64,4 +71,4 @@ const char *bsp_uboot_getenv(
   return NULL;
 }
 
-
+#endif /* defined(HAS_UBOOT) */



More information about the vc mailing list