From e61f46536e5b55153202a2a1bb0143357f76b20e Mon Sep 17 00:00:00 2001 From: Frederick Blais Date: Wed, 1 Jul 2026 10:20:54 -0400 Subject: [PATCH] interpreters/berry: Fix Wshadow build errors The pinned Berry source emits -Wshadow diagnostics in a couple of files. NuttX CI passes -Werror, so sim:berry fails when those third-party warnings are promoted to errors.\n\nAdd -Wno-shadow to Berry-specific compiler flags in both Make and CMake paths, keeping the local source patch limited to the NuttX port changes. Signed-off-by: Frederick Blais --- interpreters/berry/CMakeLists.txt | 2 +- interpreters/berry/Makefile | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/interpreters/berry/CMakeLists.txt b/interpreters/berry/CMakeLists.txt index 42a37554b..d4749851b 100644 --- a/interpreters/berry/CMakeLists.txt +++ b/interpreters/berry/CMakeLists.txt @@ -54,7 +54,7 @@ if(CONFIG_INTERPRETERS_BERRY) set(BERRY_CONFIG ${BERRY_CONFIG_DIR}/berry_conf.h) set(BERRY_GENERATE ${BERRY_DIR}/generate) set(BERRY_GEN_STAMP ${BERRY_GENERATE}/.generated) - set(BERRY_FLAGS -Wno-unused-but-set-variable) + set(BERRY_FLAGS -Wno-unused-but-set-variable -Wno-shadow) set(BERRY_INCDIR ${BERRY_CONFIG_DIR} ${BERRY_DIR}/src ${BERRY_DIR}/default) set(BERRY_CSRCS diff --git a/interpreters/berry/Makefile b/interpreters/berry/Makefile index 6fd563162..510a5e86a 100644 --- a/interpreters/berry/Makefile +++ b/interpreters/berry/Makefile @@ -56,6 +56,7 @@ CFLAGS += ${INCDIR_PREFIX}$(APPDIR)$(DELIM)interpreters$(DELIM)berry$(DELIM)incl CFLAGS += ${INCDIR_PREFIX}$(APPDIR)$(DELIM)interpreters$(DELIM)berry$(DELIM)$(BERRY_UNPACK)$(DELIM)src CFLAGS += ${INCDIR_PREFIX}$(APPDIR)$(DELIM)interpreters$(DELIM)berry$(DELIM)$(BERRY_UNPACK)$(DELIM)default CFLAGS += -Wno-unused-but-set-variable +CFLAGS += -Wno-shadow PROGNAME = $(CONFIG_INTERPRETERS_BERRY_PROGNAME) PRIORITY = $(CONFIG_INTERPRETERS_BERRY_PRIORITY)