diff --git a/components/esp_driver_cam/test_apps/csi/CMakeLists.txt b/components/esp_driver_cam/test_apps/csi/CMakeLists.txt index 96684505a1b..1a262e9d381 100644 --- a/components/esp_driver_cam/test_apps/csi/CMakeLists.txt +++ b/components/esp_driver_cam/test_apps/csi/CMakeLists.txt @@ -7,6 +7,10 @@ set(COMPONENTS main) include($ENV{IDF_PATH}/tools/cmake/project.cmake) project(test_csi) +# TODO IDF-15784: remove +# esp_cam_sensor upstream sets locals without reading them; silence -Wunused-but-set-variable +idf_component_get_property(esp_cam_sensor_lib espressif__esp_cam_sensor COMPONENT_LIB) +target_compile_options(${esp_cam_sensor_lib} PRIVATE -Wno-unused-but-set-variable) message(STATUS "Checking camera registers are not read-write by half-word") include($ENV{IDF_PATH}/tools/ci/check_register_rw_half_word.cmake) diff --git a/components/esp_hw_support/sleep_retention.c b/components/esp_hw_support/sleep_retention.c index 2203adba39c..ba815173b39 100644 --- a/components/esp_hw_support/sleep_retention.c +++ b/components/esp_hw_support/sleep_retention.c @@ -602,7 +602,7 @@ static void check_and_destroy_final_default(void) { _lock_acquire_recursive(&s_retention.lock); assert(s_retention.highpri == SLEEP_RETENTION_REGDMA_LINK_LOWEST_PRIORITY); - uint32_t created_modules = 0; + uint32_t __attribute__((unused)) created_modules = 0; for (int i = 0; i < SLEEP_RETENTION_MODULE_BITMAP_SZ; i++) { created_modules |= s_retention.created_modules.bitmap[i]; } diff --git a/components/esp_libc/test_apps/newlib/main/test_time.c b/components/esp_libc/test_apps/newlib/main/test_time.c index 5b885dffb77..1a4d5d21a38 100644 --- a/components/esp_libc/test_apps/newlib/main/test_time.c +++ b/components/esp_libc/test_apps/newlib/main/test_time.c @@ -562,17 +562,6 @@ typedef uint64_t benchmark_tick_t; /* unit: microseconds */ #define benchmark_print_units(type, x) printf("%s us: %lu\n", type, (unsigned long)(x)) #endif -#define N 4096 -const uint32_t ro_tbl[N] = { 2 }; -uint32_t scan_tbl(const volatile uint32_t *p, size_t n) -{ - uint32_t sum = 0; - for (size_t i = 0; i < n; i++) { - sum += p[i]; - } - return sum; -} - void test_posix_timers_clock_performance(clockid_t clock_id) { const int MEASUREMENTS = 5000; @@ -584,14 +573,10 @@ void test_posix_timers_clock_performance(clockid_t clock_id) benchmark_tick_t delta; benchmark_tick_t delta_sum = 0; for (int i = 0; i < PHASE_COUNT; i++) { - volatile uint32_t table_sum = 0; if (i == PHASE_COUNT / 2) { printf("With table scan...\n"); } for (int j = 0; j < MEASUREMENTS; j++) { - if (i >= PHASE_COUNT / 2) { - table_sum += scan_tbl(ro_tbl, N); - } start = get_start(); clock_settime(clock_id, &ts); end = get_end(); diff --git a/components/lwip/CMakeLists.txt b/components/lwip/CMakeLists.txt index 310c1e5c45a..af7fbff8b67 100644 --- a/components/lwip/CMakeLists.txt +++ b/components/lwip/CMakeLists.txt @@ -208,6 +208,15 @@ if(CONFIG_LWIP_ENABLE) -Wno-array-parameter ) + # TODO IDF-15784: remove + # vars only used in LWIP_ASSERT / debug; unused when asserts disabled + set_source_files_properties( + lwip/src/core/netif.c + lwip/src/core/ipv4/ip4_napt.c + PROPERTIES COMPILE_FLAGS + -Wno-unused-but-set-variable + ) + if(CONFIG_COMPILER_STATIC_ANALYZER AND CONFIG_IDF_TOOLCHAIN_GCC) set_source_files_properties( lwip/src/core/ipv4/ip4_addr.c diff --git a/components/wpa_supplicant/CMakeLists.txt b/components/wpa_supplicant/CMakeLists.txt index 7bfd82eb501..467edcfb5c3 100644 --- a/components/wpa_supplicant/CMakeLists.txt +++ b/components/wpa_supplicant/CMakeLists.txt @@ -395,6 +395,14 @@ if(CONFIG_ESP_WIFI_ENABLE_WPA3_OWE_SOFTAP) endif() set_property(TARGET ${COMPONENT_LIB} APPEND PROPERTY LINK_INTERFACE_MULTIPLICITY 3) +# TODO IDF-15784: remove +# variables can be unused, need to patch submodule +set_source_files_properties( + esp_supplicant/src/esp_common.c + PROPERTIES COMPILE_FLAGS + -Wno-unused-but-set-variable +) + if(CONFIG_COMPILER_STATIC_ANALYZER AND CONFIG_IDF_TOOLCHAIN_GCC) set(eloop_analyzer_flags -Wno-analyzer-out-of-bounds diff --git a/examples/bluetooth/esp_ble_mesh/aligenie_demo/components/vendor_model/genie_event.c b/examples/bluetooth/esp_ble_mesh/aligenie_demo/components/vendor_model/genie_event.c index eada5364b47..8f2b4162ee7 100644 --- a/examples/bluetooth/esp_ble_mesh/aligenie_demo/components/vendor_model/genie_event.c +++ b/examples/bluetooth/esp_ble_mesh/aligenie_demo/components/vendor_model/genie_event.c @@ -1,17 +1,9 @@ // Copyright (C) 2018-2020 Alibaba Group Holding Limited -// Adaptations to ESP-IDF Copyright (c) 2020 Espressif Systems (Shanghai) Co. Ltd. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +/* + * SPDX-FileCopyrightText: 2020-2026 Espressif Systems (Shanghai) CO LTD + * + * SPDX-License-Identifier: Apache-2.0 + */ #include #include @@ -114,7 +106,7 @@ static genie_event_t genie_event_handle_hw_reset_done(void) * 1. Handle Mesh Init according esp-ble-mesh init status * 2. Start power indeicate if ble-mesh already provisioned * 3. Start PB-ADV Timer if ble-mesh not provisioned - * 4. Hardware reset ble-mesh provision information if reset flag be configed. + * 4. Hardware reset ble-mesh provision information if reset flag be configured. * * @param p_status * @@ -338,13 +330,13 @@ static genie_event_t genie_event_handle_color_action(elem_state_t *p_elem, uint8 ENTER_FUNC(); #ifdef CONFIG_MESH_MODEL_HSL_SRV - uint16_t lightness = *p_data++; + __attribute__((unused)) uint16_t lightness = *p_data++; lightness += (*p_data++ << 8); - uint16_t hue = *p_data++; + __attribute__((unused)) uint16_t hue = *p_data++; hue += (*p_data++ << 8); - uint16_t saturation = *p_data++; + __attribute__((unused)) uint16_t saturation = *p_data++; saturation += (*p_data++ << 8); ESP_LOGD(TAG, "tar lightness(%d) hue(%d) saturation(%d)", p_elem->state.lightness[VALUE_TYPE_TAR], p_elem->state.hue[VALUE_TYPE_TAR], p_elem->state.saturation[VALUE_TYPE_TAR]); diff --git a/examples/bluetooth/nimble/ble_dynamic_service/main/gatt_svr.c b/examples/bluetooth/nimble/ble_dynamic_service/main/gatt_svr.c index 4efb54ba8d7..d4acc7c368c 100644 --- a/examples/bluetooth/nimble/ble_dynamic_service/main/gatt_svr.c +++ b/examples/bluetooth/nimble/ble_dynamic_service/main/gatt_svr.c @@ -220,7 +220,6 @@ gatt_svr_register_cb(struct ble_gatt_register_ctxt *ctxt, void *arg) */ int dynamic_service(const uint8_t operation, const struct ble_gatt_svc_def *svcs, const ble_uuid_t *uuid) { int rc = 0; - int i = 0; switch(operation) { case 1: /* add services in gatt_svr_svcs */ @@ -243,7 +242,6 @@ int dynamic_service(const uint8_t operation, const struct ble_gatt_svc_def *svcs /* not able to delete service return immidietely */ return rc; } - i++; return rc; break; } diff --git a/examples/bluetooth/nimble/ble_spi_slave/main/main.c b/examples/bluetooth/nimble/ble_spi_slave/main/main.c index 0edb49ecd97..d95f874f68b 100644 --- a/examples/bluetooth/nimble/ble_spi_slave/main/main.c +++ b/examples/bluetooth/nimble/ble_spi_slave/main/main.c @@ -41,7 +41,6 @@ static void my_post_trans_cb(spi_slave_transaction_t *trans) //Main application void app_main(void) { - int n = 0; esp_err_t ret; spi_slave_transaction_t t = {0}; @@ -124,8 +123,6 @@ void app_main(void) printf("\n"); } } - - n++; } } diff --git a/examples/peripherals/camera/common_components/sensor_init/CMakeLists.txt b/examples/peripherals/camera/common_components/sensor_init/CMakeLists.txt index 04129063de5..3b30338a8fe 100644 --- a/examples/peripherals/camera/common_components/sensor_init/CMakeLists.txt +++ b/examples/peripherals/camera/common_components/sensor_init/CMakeLists.txt @@ -2,3 +2,8 @@ idf_component_register(SRCS "example_sensor_init.c" INCLUDE_DIRS "include" REQUIRES esp_driver_i2c esp_cam_sensor ) + +# TODO IDF-15784: remove +# esp_cam_sensor upstream sets locals without reading them; silence -Wunused-but-set-variable +idf_component_get_property(esp_cam_sensor_lib espressif__esp_cam_sensor COMPONENT_LIB) +target_compile_options(${esp_cam_sensor_lib} PRIVATE -Wno-unused-but-set-variable) diff --git a/examples/peripherals/i2s/i2s_advance/i2s_usb/CMakeLists.txt b/examples/peripherals/i2s/i2s_advance/i2s_usb/CMakeLists.txt index 168b2243674..4225e2f044a 100644 --- a/examples/peripherals/i2s/i2s_advance/i2s_usb/CMakeLists.txt +++ b/examples/peripherals/i2s/i2s_advance/i2s_usb/CMakeLists.txt @@ -6,3 +6,8 @@ include($ENV{IDF_PATH}/tools/cmake/project.cmake) # "Trim" the build. Include the minimal set of components, main, and anything it depends on. idf_build_set_property(MINIMAL_BUILD ON) project(i2s_usb) + +# TODO IDF-15784: remove +# esp_codec_dev upstream sets locals without reading them; silence -Wunused-but-set-variable +idf_component_get_property(esp_codec_dev_lib espressif__esp_codec_dev COMPONENT_LIB) +target_compile_options(${esp_codec_dev_lib} PRIVATE -Wno-unused-but-set-variable) diff --git a/examples/peripherals/i2s/i2s_codec/i2s_es7210_tdm/CMakeLists.txt b/examples/peripherals/i2s/i2s_codec/i2s_es7210_tdm/CMakeLists.txt index ec14014c06f..a9a06a99885 100644 --- a/examples/peripherals/i2s/i2s_codec/i2s_es7210_tdm/CMakeLists.txt +++ b/examples/peripherals/i2s/i2s_codec/i2s_es7210_tdm/CMakeLists.txt @@ -7,3 +7,8 @@ include($ENV{IDF_PATH}/tools/cmake/project.cmake) idf_build_set_property(MINIMAL_BUILD ON) project(es7210_tdm_record_example) + +# TODO IDF-15784: remove +# esp_codec_dev upstream sets locals without reading them; silence -Wunused-but-set-variable +idf_component_get_property(esp_codec_dev_lib espressif__esp_codec_dev COMPONENT_LIB) +target_compile_options(${esp_codec_dev_lib} PRIVATE -Wno-unused-but-set-variable) diff --git a/examples/peripherals/i2s/i2s_codec/i2s_es8311/CMakeLists.txt b/examples/peripherals/i2s/i2s_codec/i2s_es8311/CMakeLists.txt index bee278af491..08e8ee05369 100644 --- a/examples/peripherals/i2s/i2s_codec/i2s_es8311/CMakeLists.txt +++ b/examples/peripherals/i2s/i2s_codec/i2s_es8311/CMakeLists.txt @@ -7,3 +7,8 @@ include($ENV{IDF_PATH}/tools/cmake/project.cmake) idf_build_set_property(MINIMAL_BUILD ON) project(i2s-es8311-example) + +# TODO IDF-15784: remove +# esp_codec_dev upstream sets locals without reading them; silence -Wunused-but-set-variable +idf_component_get_property(esp_codec_dev_lib espressif__esp_codec_dev COMPONENT_LIB) +target_compile_options(${esp_codec_dev_lib} PRIVATE -Wno-unused-but-set-variable) diff --git a/examples/peripherals/isp/multi_pipelines/CMakeLists.txt b/examples/peripherals/isp/multi_pipelines/CMakeLists.txt index 7a8e7420d37..b3d8106a0df 100644 --- a/examples/peripherals/isp/multi_pipelines/CMakeLists.txt +++ b/examples/peripherals/isp/multi_pipelines/CMakeLists.txt @@ -6,3 +6,8 @@ include($ENV{IDF_PATH}/tools/cmake/project.cmake) # "Trim" the build. Include the minimal set of components, main, and anything it depends on. idf_build_set_property(MINIMAL_BUILD ON) project(isp_multi_pipelines) + +# TODO IDF-15784: remove +# esp_cam_sensor upstream sets locals without reading them; silence -Wunused-but-set-variable +idf_component_get_property(esp_cam_sensor_lib espressif__esp_cam_sensor COMPONENT_LIB) +target_compile_options(${esp_cam_sensor_lib} PRIVATE -Wno-unused-but-set-variable) diff --git a/examples/peripherals/lcd/i2c_oled/CMakeLists.txt b/examples/peripherals/lcd/i2c_oled/CMakeLists.txt index 09bea5ba6e1..20edef836ce 100644 --- a/examples/peripherals/lcd/i2c_oled/CMakeLists.txt +++ b/examples/peripherals/lcd/i2c_oled/CMakeLists.txt @@ -4,3 +4,8 @@ include($ENV{IDF_PATH}/tools/cmake/project.cmake) # "Trim" the build. Include the minimal set of components, main, and anything it depends on. idf_build_set_property(MINIMAL_BUILD ON) project(i2c_oled) + +# TODO IDF-15784: remove +# lvgl upstream sets locals without reading them; silence -Wunused-but-set-variable +idf_component_get_property(lvgl_lib lvgl__lvgl COMPONENT_LIB) +target_compile_options(${lvgl_lib} PRIVATE -Wno-unused-but-set-variable) diff --git a/examples/peripherals/lcd/i80_controller/CMakeLists.txt b/examples/peripherals/lcd/i80_controller/CMakeLists.txt index d2cb91e6840..bdc1190aa6e 100644 --- a/examples/peripherals/lcd/i80_controller/CMakeLists.txt +++ b/examples/peripherals/lcd/i80_controller/CMakeLists.txt @@ -4,3 +4,8 @@ include($ENV{IDF_PATH}/tools/cmake/project.cmake) # "Trim" the build. Include the minimal set of components, main, and anything it depends on. idf_build_set_property(MINIMAL_BUILD ON) project(i80_controller) + +# TODO IDF-15784: remove +# lvgl upstream sets locals without reading them; silence -Wunused-but-set-variable +idf_component_get_property(lvgl_lib lvgl__lvgl COMPONENT_LIB) +target_compile_options(${lvgl_lib} PRIVATE -Wno-unused-but-set-variable) diff --git a/examples/peripherals/lcd/mipi_dsi/CMakeLists.txt b/examples/peripherals/lcd/mipi_dsi/CMakeLists.txt index 41b52011506..95e84dc14af 100644 --- a/examples/peripherals/lcd/mipi_dsi/CMakeLists.txt +++ b/examples/peripherals/lcd/mipi_dsi/CMakeLists.txt @@ -4,3 +4,8 @@ include($ENV{IDF_PATH}/tools/cmake/project.cmake) # "Trim" the build. Include the minimal set of components, main, and anything it depends on. idf_build_set_property(MINIMAL_BUILD ON) project(mipi_dsi_panel) + +# TODO IDF-15784: remove +# lvgl upstream sets locals without reading them; silence -Wunused-but-set-variable +idf_component_get_property(lvgl_lib lvgl__lvgl COMPONENT_LIB) +target_compile_options(${lvgl_lib} PRIVATE -Wno-unused-but-set-variable) diff --git a/examples/peripherals/lcd/parlio_simulate/CMakeLists.txt b/examples/peripherals/lcd/parlio_simulate/CMakeLists.txt index 255851ca61d..f4e6c55efac 100644 --- a/examples/peripherals/lcd/parlio_simulate/CMakeLists.txt +++ b/examples/peripherals/lcd/parlio_simulate/CMakeLists.txt @@ -4,3 +4,8 @@ include($ENV{IDF_PATH}/tools/cmake/project.cmake) # "Trim" the build. Include the minimal set of components, main, and anything it depends on. idf_build_set_property(MINIMAL_BUILD ON) project(parlio_simulate) + +# TODO IDF-15784: remove +# lvgl upstream sets locals without reading them; silence -Wunused-but-set-variable +idf_component_get_property(lvgl_lib lvgl__lvgl COMPONENT_LIB) +target_compile_options(${lvgl_lib} PRIVATE -Wno-unused-but-set-variable) diff --git a/examples/peripherals/lcd/rgb_panel/CMakeLists.txt b/examples/peripherals/lcd/rgb_panel/CMakeLists.txt index c96fab94f7e..e31bb3639a2 100644 --- a/examples/peripherals/lcd/rgb_panel/CMakeLists.txt +++ b/examples/peripherals/lcd/rgb_panel/CMakeLists.txt @@ -4,3 +4,8 @@ include($ENV{IDF_PATH}/tools/cmake/project.cmake) # "Trim" the build. Include the minimal set of components, main, and anything it depends on. idf_build_set_property(MINIMAL_BUILD ON) project(rgb_panel) + +# TODO IDF-15784: remove +# lvgl upstream sets locals without reading them; silence -Wunused-but-set-variable +idf_component_get_property(lvgl_lib lvgl__lvgl COMPONENT_LIB) +target_compile_options(${lvgl_lib} PRIVATE -Wno-unused-but-set-variable) diff --git a/examples/peripherals/lcd/spi_lcd_touch/CMakeLists.txt b/examples/peripherals/lcd/spi_lcd_touch/CMakeLists.txt index 092a9b91715..39e4ae479e5 100644 --- a/examples/peripherals/lcd/spi_lcd_touch/CMakeLists.txt +++ b/examples/peripherals/lcd/spi_lcd_touch/CMakeLists.txt @@ -4,3 +4,8 @@ include($ENV{IDF_PATH}/tools/cmake/project.cmake) # "Trim" the build. Include the minimal set of components, main, and anything it depends on. idf_build_set_property(MINIMAL_BUILD ON) project(spi_lcd_touch) + +# TODO IDF-15784: remove +# lvgl upstream sets locals without reading them; silence -Wunused-but-set-variable +idf_component_get_property(lvgl_lib lvgl__lvgl COMPONENT_LIB) +target_compile_options(${lvgl_lib} PRIVATE -Wno-unused-but-set-variable) diff --git a/examples/peripherals/parlio/parlio_tx/advanced_rgb_led_matrix/CMakeLists.txt b/examples/peripherals/parlio/parlio_tx/advanced_rgb_led_matrix/CMakeLists.txt index d6dff81e400..248d24cde6d 100644 --- a/examples/peripherals/parlio/parlio_tx/advanced_rgb_led_matrix/CMakeLists.txt +++ b/examples/peripherals/parlio/parlio_tx/advanced_rgb_led_matrix/CMakeLists.txt @@ -8,3 +8,8 @@ include($ENV{IDF_PATH}/tools/cmake/project.cmake) # "Trim" the build. Include the minimal set of components, main, and anything it depends on. idf_build_set_property(MINIMAL_BUILD ON) project(advanced_rgb_led_matrix) + +# TODO IDF-15784: remove +# lvgl upstream sets locals without reading them; silence -Wunused-but-set-variable +idf_component_get_property(lvgl_lib lvgl__lvgl COMPONENT_LIB) +target_compile_options(${lvgl_lib} PRIVATE -Wno-unused-but-set-variable) diff --git a/examples/peripherals/parlio/parlio_tx/simple_rgb_led_matrix/CMakeLists.txt b/examples/peripherals/parlio/parlio_tx/simple_rgb_led_matrix/CMakeLists.txt index ada5994c3d4..fde52f0fa58 100644 --- a/examples/peripherals/parlio/parlio_tx/simple_rgb_led_matrix/CMakeLists.txt +++ b/examples/peripherals/parlio/parlio_tx/simple_rgb_led_matrix/CMakeLists.txt @@ -9,3 +9,8 @@ include($ENV{IDF_PATH}/tools/cmake/project.cmake) idf_build_set_property(MINIMAL_BUILD ON) project(rgb_led_matrix) + +# TODO IDF-15784: remove +# lvgl upstream sets locals without reading them; silence -Wunused-but-set-variable +idf_component_get_property(lvgl_lib lvgl__lvgl COMPONENT_LIB) +target_compile_options(${lvgl_lib} PRIVATE -Wno-unused-but-set-variable) diff --git a/examples/protocols/mqtt/CMakeLists.txt b/examples/protocols/mqtt/CMakeLists.txt index 5e53bad667f..3b804459856 100644 --- a/examples/protocols/mqtt/CMakeLists.txt +++ b/examples/protocols/mqtt/CMakeLists.txt @@ -7,3 +7,8 @@ include($ENV{IDF_PATH}/tools/cmake/project.cmake) # "Trim" the build. Include the minimal set of components, main, and anything it depends on. idf_build_set_property(MINIMAL_BUILD ON) project(mqtt_ssl) + +# TODO IDF-15784: remove +# mqtt upstream sets locals without reading them; silence -Wunused-but-set-variable +idf_component_get_property(mqtt_lib espressif__mqtt COMPONENT_LIB) +target_compile_options(${mqtt_lib} PRIVATE -Wno-unused-but-set-variable) diff --git a/examples/protocols/mqtt5/CMakeLists.txt b/examples/protocols/mqtt5/CMakeLists.txt index af81c57894a..205d11445e1 100644 --- a/examples/protocols/mqtt5/CMakeLists.txt +++ b/examples/protocols/mqtt5/CMakeLists.txt @@ -7,3 +7,8 @@ include($ENV{IDF_PATH}/tools/cmake/project.cmake) # "Trim" the build. Include the minimal set of components, main, and anything it depends on. idf_build_set_property(MINIMAL_BUILD ON) project(mqtt5) + +# TODO IDF-15784: remove +# mqtt upstream sets locals without reading them; silence -Wunused-but-set-variable +idf_component_get_property(mqtt_lib espressif__mqtt COMPONENT_LIB) +target_compile_options(${mqtt_lib} PRIVATE -Wno-unused-but-set-variable) diff --git a/tools/ci/check_copyright_ignore.txt b/tools/ci/check_copyright_ignore.txt index 4b40dcc906c..4343968a736 100644 --- a/tools/ci/check_copyright_ignore.txt +++ b/tools/ci/check_copyright_ignore.txt @@ -700,7 +700,6 @@ components/xtensa/xtensa_intr.c docs/conf_common.py docs/en/conf.py docs/zh_CN/conf.py -examples/bluetooth/esp_ble_mesh/aligenie_demo/components/vendor_model/genie_event.c examples/bluetooth/esp_ble_mesh/aligenie_demo/components/vendor_model/genie_reset.c examples/bluetooth/esp_ble_mesh/aligenie_demo/components/vendor_model/include/genie_dlist.h examples/bluetooth/esp_ble_mesh/aligenie_demo/components/vendor_model/include/genie_event.h diff --git a/tools/ci/configure_ci_environment.sh b/tools/ci/configure_ci_environment.sh index 69c7c8efaf9..e14d7e1cbdf 100644 --- a/tools/ci/configure_ci_environment.sh +++ b/tools/ci/configure_ci_environment.sh @@ -17,17 +17,13 @@ DEBUG_SHELL=${DEBUG_SHELL:-"0"} # (Depends on default options '-Wno-error=XXX' used in the IDF build system) if [ "$IDF_TOOLCHAIN" != "clang" ]; then - PEDANTIC_FLAGS="-Werror -Werror=deprecated-declarations -Werror=unused-variable -Werror=unused-function" - export PEDANTIC_CFLAGS="${PEDANTIC_FLAGS} -Wstrict-prototypes" - # TODO IDF-15784 - case "$CI_JOB_NAME" in - test_pytest_linux|test_sockets_on_host|test_transport_on_host|test_vfs_on_host|test_pytest_macos) - export PEDANTIC_CFLAGS="${PEDANTIC_CFLAGS} -Werror=unused-but-set-variable" - ;; - *) - export PEDANTIC_CFLAGS="${PEDANTIC_CFLAGS} -Werror=unused-but-set-variable=1" - ;; - esac + PEDANTIC_FLAGS="-Werror \ + -Werror=deprecated-declarations \ + -Werror=unused-variable \ + -Werror=unused-function \ + -Werror=unused-but-set-variable" + export PEDANTIC_CFLAGS="${PEDANTIC_FLAGS} \ + -Wstrict-prototypes" else export PEDANTIC_CFLAGS="-Werror" fi