You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by ac...@apache.org on 2020/01/07 22:42:12 UTC

[incubator-nuttx] branch master updated: boards/arm/lpc43xx/bambino-200e/src/lpc43_appinit.c: Eliminate a warning found in build testing.

This is an automated email from the ASF dual-hosted git repository.

acassis pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git


The following commit(s) were added to refs/heads/master by this push:
     new 208463e  boards/arm/lpc43xx/bambino-200e/src/lpc43_appinit.c: Eliminate a warning found in build testing.
208463e is described below

commit 208463e7c536b1c3fc747f9582485758838bedaa
Author: Gregory Nutt <sp...@gmail.com>
AuthorDate: Tue Jan 7 19:40:44 2020 -0300

    boards/arm/lpc43xx/bambino-200e/src/lpc43_appinit.c: Eliminate a warning found in build testing.
    
    Author: Alan Carvalho de Assis <ac...@gmail.com>
    
        Fix small typos and check against nxstyle
    
    Author: Gregory Nutt <gn...@nuttx.org>
    
        boards/arm/lpc43xx/bambino-200e/src/lpc43_appinit.c: Eliminate a warning found in build testing.
    
        The removal of (void) from all functions whose return value has been ignored has introduced several new warnings into the build test output.  For example in lpc3_appinit(), I now see this:
    
            #  define nsh_spifi_initialize() (OK)
    
        and
    
            nsh_spifi_initialize();
    
        which generaterd a new warning:  "warning: statement with no effect [-Wunused-value]".  This commit fixes that warning.
---
 boards/arm/lpc43xx/bambino-200e/src/lpc43_appinit.c | 14 +++++++++-----
 1 file changed, 9 insertions(+), 5 deletions(-)

diff --git a/boards/arm/lpc43xx/bambino-200e/src/lpc43_appinit.c b/boards/arm/lpc43xx/bambino-200e/src/lpc43_appinit.c
index 43a3cca..89cb350 100644
--- a/boards/arm/lpc43xx/bambino-200e/src/lpc43_appinit.c
+++ b/boards/arm/lpc43xx/bambino-200e/src/lpc43_appinit.c
@@ -1,9 +1,9 @@
 /****************************************************************************
  * boards/arm/lpc43xx/bambino-200e/src/lpc43_appinit.c
  *
- *   Copyright (C) 2016 Gregory Nutt. All rights reserved.
+ *   Copyright (C) 2016, 2020 Gregory Nutt. All rights reserved.
  *   Author: Gregory Nutt <gn...@nuttx.org>
- *           Alan Carvalho de Assis acassis@gmail.com [nuttx] <nu...@googlegroups.com>
+ *           Alan Carvalho de Assis acassis@gmail.com
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -135,8 +135,6 @@ static int nsh_spifi_initialize(void)
 
   return OK;
 }
-#else
-#  define nsh_spifi_initialize() (OK)
 #endif
 
 /****************************************************************************
@@ -173,9 +171,15 @@ int board_app_initialize(uintptr_t arg)
 #endif
   int ret = 0;
 
+#ifdef CONFIG_LPC43_SPIFI
   /* Initialize the SPIFI block device */
 
-  nsh_spifi_initialize();
+  ret = nsh_spifi_initialize();
+  if (ret != OK)
+    {
+      syslog(LOG_ERR, "ERROR: nsh_spifi_initialize() fails: %d\n", ret);
+    }
+#endif
 
 #ifdef HAVE_MMCSD
   /* Get an instance of the SDIO interface */