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:48 UTC

[incubator-nuttx] branch master updated (080b2df -> e1c53ea)

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

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


    from 080b2df  arch/stm32: Fix nxstyle errors
     new 374d05a  Revert "board/sim: Remove the too strict warning"
     new 8848825  libcxx: Disable -Wshadow for barrier.cpp
     new 6481b77  libcxx: Disable -Wshadow for locale.cpp
     new b41524f  libcxx: -Wno-shadow for files including filesystem_common.h
     new e1c53ea  arch/sim/include/irq.h: Make 32-bit xcpt_reg_t unsigned

The 5 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 arch/sim/include/irq.h               |  2 +-
 boards/sim/sim/sim/scripts/Make.defs |  4 ++--
 libs/libxx/libcxx.defs               | 15 +++++++++++++++
 3 files changed, 18 insertions(+), 3 deletions(-)


[incubator-nuttx] 04/05: libcxx: -Wno-shadow for files including filesystem_common.h

Posted by xi...@apache.org.
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 b41524f0e6cb24918bbb77433c0511cd7d20916d
Author: YAMAMOTO Takashi <ya...@midokura.com>
AuthorDate: Fri Oct 23 11:49:52 2020 +0900

    libcxx: -Wno-shadow for files including filesystem_common.h
    
    This might be specific to gcc or Linux
    as I didn't see it with clang + macOS.
---
 libs/libxx/libcxx.defs | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/libs/libxx/libcxx.defs b/libs/libxx/libcxx.defs
index 0076302..21ca57f 100644
--- a/libs/libxx/libcxx.defs
+++ b/libs/libxx/libcxx.defs
@@ -58,6 +58,9 @@ CXXFLAGS += ${shell $(DEFINE) "$(CC)" _LIBCPP_BUILDING_LIBRARY}
 libcxx/src/barrier.cpp_CXXFLAGS += -Wno-shadow
 libcxx/src/locale.cpp_CXXFLAGS += -Wno-shadow
 
+libcxx/src/filesystem/directory_iterator.cpp_CXXFLAGS += -Wno-shadow
+libcxx/src/filesystem/operations.cpp_CXXFLAGS += -Wno-shadow
+
 CPPSRCS += $(notdir $(wildcard libcxx/src/*.cpp))
 CPPSRCS += $(notdir $(wildcard libcxx/src/experimental/*.cpp))
 CPPSRCS += $(notdir $(wildcard libcxx/src/filesystem/*.cpp))


[incubator-nuttx] 05/05: arch/sim/include/irq.h: Make 32-bit xcpt_reg_t unsigned

Posted by xi...@apache.org.
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 e1c53eaeb0e7b5c524af8ac09c0af805ac3f8bb2
Author: YAMAMOTO Takashi <ya...@midokura.com>
AuthorDate: Tue Dec 22 16:34:55 2020 +0900

    arch/sim/include/irq.h: Make 32-bit xcpt_reg_t unsigned
    
    * 64-bit version is already unsigned
    
    * up_copyfullstate uses unsigned for 32-bit
    
     Error: sim/up_unblocktask.c:107:33: error: pointer targets in passing argument 1 of 'up_copyfullstate' differ in signedness [-Werror=pointer-sign]
      107 |           up_savestate(rtcb->xcp.regs);
          |                        ~~~~~~~~~^~~~~
          |                                 |
          |                                 xcpt_reg_t * {aka int *}
    sim/up_internal.h:133:45: note: in definition of macro 'up_savestate'
      133 | #define up_savestate(regs) up_copyfullstate(regs, (xcpt_reg_t *)CURRENT_REGS)
          |                                             ^~~~
    sim/up_internal.h:205:33: note: expected 'uint32_t *' {aka 'unsigned int *'} but argument is of type 'xcpt_reg_t *' {aka 'int *'}
      205 | void up_copyfullstate(uint32_t *dest, uint32_t *src);
          |                       ~~~~~~~~~~^~~~
---
 arch/sim/include/irq.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/sim/include/irq.h b/arch/sim/include/irq.h
index bec1d78..604d463 100644
--- a/arch/sim/include/irq.h
+++ b/arch/sim/include/irq.h
@@ -69,7 +69,7 @@
 #if defined(CONFIG_HOST_X86_64) && !defined(CONFIG_SIM_M32)
 typedef unsigned long xcpt_reg_t;
 #else
-typedef int xcpt_reg_t;
+typedef unsigned int xcpt_reg_t;
 #endif
 
 /* This struct defines the way the registers are stored */


[incubator-nuttx] 02/05: libcxx: Disable -Wshadow for barrier.cpp

Posted by xi...@apache.org.
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 884882501cb295a887bea52ad0c2f001f2e7fce7
Author: YAMAMOTO Takashi <ya...@midokura.com>
AuthorDate: Fri Oct 23 08:12:47 2020 +0900

    libcxx: Disable -Wshadow for barrier.cpp
    
    This might be specific to gcc or Linux
    as I didn't see it with clang + macOS.
    
    libcxx/src/barrier.cpp: In constructor 'std::__1::__barrier_algorithm_base::__barrier_algorithm_base(ptrdiff_t&)':
    libcxx/src/barrier.cpp:35:9: warning: declaration of '__expected' shadows a member of 'std::__1::__barrier_algorithm_base' [-Wshadow]
       35 |         : __expected(__expected)
          |         ^
    libcxx/src/barrier.cpp:29:24: note: shadowed declaration is here
       29 |     ptrdiff_t&         __expected;
          |                        ^~~~~~~~~~
    libcxx/src/barrier.cpp: In constructor 'std::__1::__barrier_algorithm_base::__barrier_algorithm_base(ptrdiff_t&)':
    libcxx/src/barrier.cpp:44:5: warning: declaration of '__expected' shadows a member of 'std::__1::__barrier_algorithm_base' [-Wshadow]
       44 |     }
          |     ^
    libcxx/src/barrier.cpp:29:24: note: shadowed declaration is here
       29 |     ptrdiff_t&         __expected;
          |                        ^~~~~~~~~~
    libcxx/src/barrier.cpp: In constructor 'std::__1::__barrier_algorithm_base::__barrier_algorithm_base(ptrdiff_t&)':
    libcxx/src/barrier.cpp:44:5: warning: declaration of '__expected' shadows a member of 'std::__1::__barrier_algorithm_base' [-Wshadow]
       44 |     }
          |     ^
    libcxx/src/barrier.cpp:29:24: note: shadowed declaration is here
       29 |     ptrdiff_t&         __expected;
          |                        ^~~~~~~~~~
    CXX:  libcxx/src/new.cpp
    In file included from libcxx/src/new.cpp:19:
    /usr/include/c++/9/cxxabi.h: In member function 'virtual bool __cxxabiv1::__pbase_type_info::__pointer_catch(const __cxxabiv1::__pbase_type_info*, void**, unsigned int) const':
    /usr/include/c++/9/cxxabi.h:308:23: error: 'const class std::type_info' has no member named '__do_catch'
      308 |     return __pointee->__do_catch (thrown_type->__pointee, thr_obj, outer + 2);
          |                       ^~~~~~~~~~
---
 libs/libxx/libcxx.defs | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/libs/libxx/libcxx.defs b/libs/libxx/libcxx.defs
index 13a8450..9bcd74e 100644
--- a/libs/libxx/libcxx.defs
+++ b/libs/libxx/libcxx.defs
@@ -46,6 +46,17 @@ distclean::
 CXXFLAGS += ${shell $(DEFINE) "$(CC)" __GLIBCXX__}
 CXXFLAGS += ${shell $(DEFINE) "$(CC)" _LIBCPP_BUILDING_LIBRARY}
 
+# Workaround the following warning with "c++ (Ubuntu 9.3.0-10ubuntu2) 9.3.0"
+#
+# libcxx/src/barrier.cpp: In constructor 'std::__1::__barrier_algorithm_base::__barrier_algorithm_base(ptrdiff_t&)':
+# libcxx/src/barrier.cpp:35:9: warning: declaration of '__expected' shadows a member of 'std::__1::__barrier_algorithm_base' [-Wshadow]
+#    35 |         : __expected(__expected)
+#       |         ^
+# libcxx/src/barrier.cpp:29:24: note: shadowed declaration is here
+#    29 |     ptrdiff_t&         __expected;
+#       |                        ^~~~~~~~~~
+libcxx/src/barrier.cpp_CXXFLAGS += -Wno-shadow
+
 CPPSRCS += $(notdir $(wildcard libcxx/src/*.cpp))
 CPPSRCS += $(notdir $(wildcard libcxx/src/experimental/*.cpp))
 CPPSRCS += $(notdir $(wildcard libcxx/src/filesystem/*.cpp))


[incubator-nuttx] 03/05: libcxx: Disable -Wshadow for locale.cpp

Posted by xi...@apache.org.
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 6481b774e454d392960729d8240a0e7956dbc200
Author: YAMAMOTO Takashi <ya...@midokura.com>
AuthorDate: Fri Oct 23 09:16:07 2020 +0900

    libcxx: Disable -Wshadow for locale.cpp
    
    This might be specific to gcc or Linux
    as I didn't see it with clang + macOS.
    
    libcxx/src/locale.cpp: In member function 'void std::__1::locale::__install_ctor(const std::__1::locale&, std::__1::locale::facet*, long int)':
    libcxx/src/locale.cpp:576:62: warning: declaration of 'id' shadows a member of 'std::__1::locale' [-Wshadow]
      576 | locale::__install_ctor(const locale& other, facet* f, long id)
          |                                                              ^
    In file included from /Users/yamamoto/git/nuttx/nuttx/include/libcxx/locale:181,
                     from libcxx/src/locale.cpp:16:
    /Users/yamamoto/git/nuttx/nuttx/include/libcxx/__locale:203:32: note: shadowed declaration is here
      203 | class _LIBCPP_TYPE_VIS locale::id
          |                                ^~
---
 libs/libxx/libcxx.defs | 1 +
 1 file changed, 1 insertion(+)

diff --git a/libs/libxx/libcxx.defs b/libs/libxx/libcxx.defs
index 9bcd74e..0076302 100644
--- a/libs/libxx/libcxx.defs
+++ b/libs/libxx/libcxx.defs
@@ -56,6 +56,7 @@ CXXFLAGS += ${shell $(DEFINE) "$(CC)" _LIBCPP_BUILDING_LIBRARY}
 #    29 |     ptrdiff_t&         __expected;
 #       |                        ^~~~~~~~~~
 libcxx/src/barrier.cpp_CXXFLAGS += -Wno-shadow
+libcxx/src/locale.cpp_CXXFLAGS += -Wno-shadow
 
 CPPSRCS += $(notdir $(wildcard libcxx/src/*.cpp))
 CPPSRCS += $(notdir $(wildcard libcxx/src/experimental/*.cpp))


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

Posted by xi...@apache.org.
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