You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by xi...@apache.org on 2020/12/25 03:57:49 UTC

[incubator-nuttx] 01/05: Revert "board/sim: Remove the too strict warning"

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

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

commit 374d05a05ac26757eb7fc68c5aa6ae5a13c7ac48
Author: YAMAMOTO Takashi <ya...@midokura.com>
AuthorDate: Tue Dec 22 10:31:59 2020 +0900

    Revert "board/sim: Remove the too strict warning"
    
    This reverts commit e70bff723b5e2eecb741f43bb2ecc5a220d3bf8c.
    
    * These warnings sometimes find real bugs. There are ways to disable
      the specific warnings for the specific code (eg. libcxx) selectively.
    
    * It doesn't make much sense to disable these warnings only on sim.
      There are many boards with -Wall -Wshadow. Because the sim is
      mainly for development and testing, it should be less forgiving
      than real boards.
---
 boards/sim/sim/sim/scripts/Make.defs | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/boards/sim/sim/sim/scripts/Make.defs b/boards/sim/sim/sim/scripts/Make.defs
index 663bef6..e865f0c 100644
--- a/boards/sim/sim/sim/scripts/Make.defs
+++ b/boards/sim/sim/sim/scripts/Make.defs
@@ -59,8 +59,8 @@ ifeq ($(CONFIG_CXX_EXCEPTION),)
   ARCHCPUFLAGSXX += -fno-exceptions -fcheck-new
 endif
 ARCHPICFLAGS = -fpic
-ARCHWARNINGS = -Wstrict-prototypes -Wundef
-ARCHWARNINGSXX = -Wundef
+ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef
+ARCHWARNINGSXX = -Wall -Wshadow -Wundef
 
 # Add -fvisibility=hidden
 # Because we don't want export nuttx's symbols to share libraries