You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
I am trying to use RadioLib as an ESP-IDF component with ESP-IDF v5.3.1, but am running into the following warning/error. Looking at the file in question, if the setIrqFlags(irq) function is called with irq=0 the return value is not well defined. I think that instead the final return (return(state);) should probably be return(RADIOLIB_ERR_NONE); as if state is not 0, the RADIOLIB_ASSERT(state) from earlier will return it. Alternatively state could be initialized to RADIOLIB_ERR_NONE.
/home/en/Documents/DroRa/components/RadioLib/src/modules/SX127x/SX127x.cpp: In member function 'virtual int16_t SX127x::setIrqFlags(uint32_t)':
/home/en/Documents/DroRa/components/RadioLib/src/modules/SX127x/SX127x.cpp:1420:15: error: 'state' may be used uninitialized [-Werror=maybe-uninitialized]
1420 | return(state);
Console output
idf.py build
Executing action: all (aliases: build)
Running cmake in directory /home/en/Documents/DroRa/build
Executing "cmake -G Ninja -DPYTHON_DEPS_CHECKED=1 -DPYTHON=/home/en/.espressif/python_env/idf5.3_py3.10_env/bin/python -DESP_PLATFORM=1 -DSDKCONFIG_DEFAULTS=sdkconfig.common;sdkconfig.ht_tracker -DCCACHE_ENABLE=0 /home/en/Documents/DroRa"... -- Found Git: /usr/bin/git (found version "2.34.1")
-- The C compiler identification is GNU 13.2.0
-- The CXX compiler identification is GNU 13.2.0
-- The ASM compiler identification is GNU
-- Found assembler: /home/en/.espressif/tools/xtensa-esp-elf/esp-13.2.0_20240530/xtensa-esp-elf/bin/xtensa-esp32
-elf-gcc -- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /home/en/.espressif/tools/xtensa-esp-elf/esp-13.2.0_20240530/xtensa-esp-elf/bin
/xtensa-esp32-elf-gcc - skipped -- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /home/en/.espressif/tools/xtensa-esp-elf/esp-13.2.0_20240530/xtensa-esp-elf/b
in/xtensa-esp32-elf-g++ - skipped -- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Building ESP-IDF components for target esp32
NOTICE: Updating lock file at /home/en/Documents/DroRa/dependencies.lock
Processing 1 dependencies:
[1/1] idf (5.3.1)
-- Project sdkconfig file /home/en/Documents/DroRa/sdkconfig
Loading defaults file /home/en/Documents/DroRa/sdkconfig.common...
Loading defaults file /home/en/Documents/DroRa/sdkconfig.ht_tracker...
-- Compiler supported targets: xtensa-esp-elf
-- Found Python3: /home/en/.espressif/python_env/idf5.3_py3.10_env/bin/python (found version "3.10.12") found co
mponents: Interpreter -- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
-- Found Threads: TRUE
-- Performing Test C_COMPILER_SUPPORTS_WFORMAT_SIGNEDNESS
-- Performing Test C_COMPILER_SUPPORTS_WFORMAT_SIGNEDNESS - Success
-- App "DroRa" version: 5cd13ff-dirty
-- Adding linker script /home/en/Documents/DroRa/build/esp-idf/esp_system/ld/memory.ld
-- Adding linker script /home/en/Documents/DroRa/build/esp-idf/esp_system/ld/sections.ld.in
-- Adding linker script /home/en/esp/v5.3.1/esp-idf/components/esp_rom/esp32/ld/esp32.rom.ld
-- Adding linker script /home/en/esp/v5.3.1/esp-idf/components/esp_rom/esp32/ld/esp32.rom.api.ld
-- Adding linker script /home/en/esp/v5.3.1/esp-idf/components/esp_rom/esp32/ld/esp32.rom.libgcc.ld
-- Adding linker script /home/en/esp/v5.3.1/esp-idf/components/esp_rom/esp32/ld/esp32.rom.newlib-data.ld
-- Adding linker script /home/en/esp/v5.3.1/esp-idf/components/esp_rom/esp32/ld/esp32.rom.syscalls.ld
-- Adding linker script /home/en/esp/v5.3.1/esp-idf/components/esp_rom/esp32/ld/esp32.rom.newlib-funcs.ld
-- Adding linker script /home/en/esp/v5.3.1/esp-idf/components/soc/esp32/ld/esp32.peripherals.ld
-- Components: DR_Console DR_Parameters RadioLib app_trace app_update bootloader bootloader_support bt cmock con
sole cxx driver efuse esp-tls esp_adc esp_app_format esp_bootloader_format esp_coex esp_common esp_driver_ana_cmpr esp_driver_cam esp_driver_dac esp_driver_gpio esp_driver_gptimer esp_driver_i2c esp_driver_i2s esp_driver_isp esp_driver_jpeg esp_driver_ledc esp_driver_mcpwm esp_driver_parlio esp_driver_pcnt esp_driver_ppa esp_driver_rmt esp_driver_sdio esp_driver_sdm esp_driver_sdmmc esp_driver_sdspi esp_driver_spi esp_driver_touch_sens esp_driver_tsens esp_driver_uart esp_driver_usb_serial_jtag esp_eth esp_event esp_gdbstub esp_hid esp_http_client esp_http_server esp_https_ota esp_https_server esp_hw_support esp_lcd esp_local_ctrl esp_mm esp_netif esp_netif_stack esp_partition esp_phy esp_pm esp_psram esp_ringbuf esp_rom esp_system esp_timer esp_vfs_console esp_wifi espcoredump esptool_py fatfs freertos hal heap http_parser idf_test ieee802154 json log lwip main mbedtls mqtt newlib nvs_flash nvs_sec_provider openthread partition_table perfmon protobuf-c protocomm pthread sdmmc soc spi_flash spiffs tcp_transport ulp unity usb vfs wear_levelling wifi_provisioning wpa_supplicant xtensa -- Component paths: /home/en/Documents/DroRa/components/DR_Console /home/en/Documents/DroRa/components/DR_Parame
ters /home/en/Documents/DroRa/components/RadioLib /home/en/esp/v5.3.1/esp-idf/components/app_trace /home/en/esp/v5.3.1/esp-idf/components/app_update /home/en/esp/v5.3.1/esp-idf/components/bootloader /home/en/esp/v5.3.1/esp-idf/components/bootloader_support /home/en/esp/v5.3.1/esp-idf/components/bt /home/en/esp/v5.3.1/esp-idf/components/cmock /home/en/esp/v5.3.1/esp-idf/components/console /home/en/esp/v5.3.1/esp-idf/components/cxx /home/en/esp/v5.3.1/esp-idf/components/driver /home/en/esp/v5.3.1/esp-idf/components/efuse /home/en/esp/v5.3.1/esp-idf/components/esp-tls /home/en/esp/v5.3.1/esp-idf/components/esp_adc /home/en/esp/v5.3.1/esp-idf/components/esp_app_format /home/en/esp/v5.3.1/esp-idf/components/esp_bootloader_format /home/en/esp/v5.3.1/esp-idf/components/esp_coex /home/en/esp/v5.3.1/esp-idf/components/esp_common /home/en/esp/v5.3.1/esp-idf/components/esp_driver_ana_cmpr /home/en/esp/v5.3.1/esp-idf/components/esp_driver_cam /home/en/esp/v5.3.1/esp-idf/components/esp_driver_dac /home/en/esp/v5.3.1/esp-idf/components/esp_driver_gpio /home/en/esp/v5.3.1/esp-idf/components/esp_driver_gptimer /home/en/esp/v5.3.1/esp-idf/components/esp_driver_i2c /home/en/esp/v5.3.1/esp-idf/components/esp_driver_i2s /home/en/esp/v5.3.1/esp-idf/components/esp_driver_isp /home/en/esp/v5.3.1/esp-idf/components/esp_driver_jpeg /home/en/esp/v5.3.1/esp-idf/components/esp_driver_ledc /home/en/esp/v5.3.1/esp-idf/components/esp_driver_mcpwm /home/en/esp/v5.3.1/esp-idf/components/esp_driver_parlio /home/en/esp/v5.3.1/esp-idf/components/esp_driver_pcnt /home/en/esp/v5.3.1/esp-idf/components/esp_driver_ppa /home/en/esp/v5.3.1/esp-idf/components/esp_driver_rmt /home/en/esp/v5.3.1/esp-idf/components/esp_driver_sdio /home/en/esp/v5.3.1/esp-idf/components/esp_driver_sdm /home/en/esp/v5.3.1/esp-idf/components/esp_driver_sdmmc /home/en/esp/v5.3.1/esp-idf/components/esp_driver_sdspi /home/en/esp/v5.3.1/esp-idf/components/esp_driver_spi /home/en/esp/v5.3.1/esp-idf/components/esp_driver_touch_sens /home/en/esp/v5.3.1/esp-idf/components/esp_driver_tsens /home/en/esp/v5.3.1/esp-idf/components/esp_driver_uart /home/en/esp/v5.3.1/esp-idf/components/esp_driver_usb_serial_jtag /home/en/esp/v5.3.1/esp-idf/components/esp_eth /home/en/esp/v5.3.1/esp-idf/components/esp_event /home/en/esp/v5.3.1/esp-idf/components/esp_gdbstub /home/en/esp/v5.3.1/esp-idf/components/esp_hid /home/en/esp/v5.3.1/esp-idf/components/esp_http_client /home/en/esp/v5.3.1/esp-idf/components/esp_http_server /home/en/esp/v5.3.1/esp-idf/components/esp_https_ota /home/en/esp/v5.3.1/esp-idf/components/esp_https_server /home/en/esp/v5.3.1/esp-idf/components/esp_hw_support /home/en/esp/v5.3.1/esp-idf/components/esp_lcd /home/en/esp/v5.3.1/esp-idf/components/esp_local_ctrl /home/en/esp/v5.3.1/esp-idf/components/esp_mm /home/en/esp/v5.3.1/esp-idf/components/esp_netif /home/en/esp/v5.3.1/esp-idf/components/esp_netif_stack /home/en/esp/v5.3.1/esp-idf/components/esp_partition /home/en/esp/v5.3.1/esp-idf/components/esp_phy /home/en/esp/v5.3.1/esp-idf/components/esp_pm /home/en/esp/v5.3.1/esp-idf/components/esp_psram /home/en/esp/v5.3.1/esp-idf/components/esp_ringbuf /home/en/esp/v5.3.1/esp-idf/components/esp_rom /home/en/esp/v5.3.1/esp-idf/components/esp_system /home/en/esp/v5.3.1/esp-idf/components/esp_timer /home/en/esp/v5.3.1/esp-idf/components/esp_vfs_console /home/en/esp/v5.3.1/esp-idf/components/esp_wifi /home/en/esp/v5.3.1/esp-idf/components/espcoredump /home/en/esp/v5.3.1/esp-idf/components/esptool_py /home/en/esp/v5.3.1/esp-idf/components/fatfs /home/en/esp/v5.3.1/esp-idf/components/freertos /home/en/esp/v5.3.1/esp-idf/components/hal /home/en/esp/v5.3.1/esp-idf/components/heap /home/en/esp/v5.3.1/esp-idf/components/http_parser /home/en/esp/v5.3.1/esp-idf/components/idf_test /home/en/esp/v5.3.1/esp-idf/components/ieee802154 /home/en/esp/v5.3.1/esp-idf/components/json /home/en/esp/v5.3.1/esp-idf/components/log /home/en/esp/v5.3.1/esp-idf/components/lwip /home/en/Documents/DroRa/main /home/en/esp/v5.3.1/esp-idf/components/mbedtls /home/en/esp/v5.3.1/esp-idf/components/mqtt /home/en/esp/v5.3.1/esp-idf/components/newlib /home/en/esp/v5.3.1/esp-idf/components/nvs_flash /home/en/esp/v5.3.1/esp-idf/components/nvs_sec_provider /home/en/esp/v5.3.1/esp-idf/components/openthread /home/en/esp/v5.3.1/esp-idf/components/partition_table /home/en/esp/v5.3.1/esp-idf/components/perfmon /home/en/esp/v5.3.1/esp-idf/components/protobuf-c /home/en/esp/v5.3.1/esp-idf/components/protocomm /home/en/esp/v5.3.1/esp-idf/components/pthread /home/en/esp/v5.3.1/esp-idf/components/sdmmc /home/en/esp/v5.3.1/esp-idf/components/soc /home/en/esp/v5.3.1/esp-idf/components/spi_flash /home/en/esp/v5.3.1/esp-idf/components/spiffs /home/en/esp/v5.3.1/esp-idf/components/tcp_transport /home/en/esp/v5.3.1/esp-idf/components/ulp /home/en/esp/v5.3.1/esp-idf/components/unity /home/en/esp/v5.3.1/esp-idf/components/usb /home/en/esp/v5.3.1/esp-idf/components/vfs /home/en/esp/v5.3.1/esp-idf/components/wear_levelling /home/en/esp/v5.3.1/esp-idf/components/wifi_provisioning /home/en/esp/v5.3.1/esp-idf/components/wpa_supplicant /home/en/esp/v5.3.1/esp-idf/components/xtensa -- Configuring done
-- Generating done
-- Build files have been written to: /home/en/Documents/DroRa/build
Running ninja in directory /home/en/Documents/DroRa/build
Executing "ninja all"...
[10/1029] Generating ../../partition_table/partition-table.bin
Partition table binary generated. Contents:
*******************************************************************************# ESP-IDF Partition Table# Name, Type, SubType, Offset, Size, Flags
nvs,data,nvs,0x9000,24K,
phy_init,data,phy,0xf000,4K,
factory,app,factory,0x10000,1M,
*******************************************************************************
[414/1029] Performing configure step for'bootloader'
-- Found Git: /usr/bin/git (found version "2.34.1")
-- The C compiler identification is GNU 13.2.0
-- The CXX compiler identification is GNU 13.2.0
-- The ASM compiler identification is GNU
-- Found assembler: /home/en/.espressif/tools/xtensa-esp-elf/esp-13.2.0_20240530/xtensa-esp-elf/bin/xtensa-esp32
-elf-gcc -- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /home/en/.espressif/tools/xtensa-esp-elf/esp-13.2.0_20240530/xtensa-esp-elf/bin
/xtensa-esp32-elf-gcc - skipped -- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /home/en/.espressif/tools/xtensa-esp-elf/esp-13.2.0_20240530/xtensa-esp-elf/b
in/xtensa-esp32-elf-g++ - skipped -- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Building ESP-IDF components for target esp32
-- Project sdkconfig file /home/en/Documents/DroRa/sdkconfig
-- Compiler supported targets: xtensa-esp-elf
-- Adding linker script /home/en/esp/v5.3.1/esp-idf/components/soc/esp32/ld/esp32.peripherals.ld
-- Bootloader project name: "bootloader" version: 1
-- Adding linker script /home/en/esp/v5.3.1/esp-idf/components/esp_rom/esp32/ld/esp32.rom.ld
-- Adding linker script /home/en/esp/v5.3.1/esp-idf/components/esp_rom/esp32/ld/esp32.rom.api.ld
-- Adding linker script /home/en/esp/v5.3.1/esp-idf/components/esp_rom/esp32/ld/esp32.rom.libgcc.ld
-- Adding linker script /home/en/esp/v5.3.1/esp-idf/components/esp_rom/esp32/ld/esp32.rom.newlib-funcs.ld
-- Adding linker script /home/en/esp/v5.3.1/esp-idf/components/bootloader/subproject/main/ld/esp32/bootloader.ld
-- Adding linker script /home/en/esp/v5.3.1/esp-idf/components/bootloader/subproject/main/ld/esp32/bootloader.ro
m.ld -- Components: bootloader bootloader_support efuse esp_app_format esp_bootloader_format esp_common esp_hw_suppor
t esp_rom esp_system esptool_py freertos hal log main micro-ecc newlib partition_table soc spi_flash xtensa -- Component paths: /home/en/esp/v5.3.1/esp-idf/components/bootloader /home/en/esp/v5.3.1/esp-idf/components/boo
tloader_support /home/en/esp/v5.3.1/esp-idf/components/efuse /home/en/esp/v5.3.1/esp-idf/components/esp_app_format /home/en/esp/v5.3.1/esp-idf/components/esp_bootloader_format /home/en/esp/v5.3.1/esp-idf/components/esp_common /home/en/esp/v5.3.1/esp-idf/components/esp_hw_support /home/en/esp/v5.3.1/esp-idf/components/esp_rom /home/en/esp/v5.3.1/esp-idf/components/esp_system /home/en/esp/v5.3.1/esp-idf/components/esptool_py /home/en/esp/v5.3.1/esp-idf/components/freertos /home/en/esp/v5.3.1/esp-idf/components/hal /home/en/esp/v5.3.1/esp-idf/components/log /home/en/esp/v5.3.1/esp-idf/components/bootloader/subproject/main /home/en/esp/v5.3.1/esp-idf/components/bootloader/subproject/components/micro-ecc /home/en/esp/v5.3.1/esp-idf/components/newlib /home/en/esp/v5.3.1/esp-idf/components/partition_table /home/en/esp/v5.3.1/esp-idf/components/soc /home/en/esp/v5.3.1/esp-idf/components/spi_flash /home/en/esp/v5.3.1/esp-idf/components/xtensa -- Configuring done
-- Generating done
-- Build files have been written to: /home/en/Documents/DroRa/build/bootloader
[107/108] Generating binary image from built executable
esptool.py v4.8.1
Creating esp32 image...
Merged 2 ELF sections
Successfully created esp32 image.
Generated /home/en/Documents/DroRa/build/bootloader/bootloader.bin
[108/108] cd /home/en/Documents/DroRa/build/bootloader...ome/en/Documents/DroRa/build/bootloader/bootloader.bin
Bootloader binary size 0x6880 bytes. 0x780 bytes (7%) free.
[1005/1029] Building CXX object esp-idf/RadioLib/CMake...s/__idf_RadioLib.dir/src/modules/SX127x/SX127x.cpp.obj
FAILED: esp-idf/RadioLib/CMakeFiles/__idf_RadioLib.dir/src/modules/SX127x/SX127x.cpp.obj
/home/en/.espressif/tools/xtensa-esp-elf/esp-13.2.0_20240530/xtensa-esp-elf/bin/xtensa-esp32-elf-g++ -DESP_PLATF
ORM -DIDF_VER=\"v5.3.1-dirty\" -DSOC_MMU_PAGE_SIZE=CONFIG_MMU_PAGE_SIZE -DSOC_XTAL_FREQ_MHZ=CONFIG_XTAL_FREQ -D_GLIBCXX_HAVE_POSIX_SEMAPHORE -D_GLIBCXX_USE_POSIX_SEMAPHORE -D_GNU_SOURCE -D_POSIX_READER_WRITER_LOCKS -I/home/en/Documents/DroRa/build/config -I/home/en/Documents/DroRa/components/RadioLib -I/home/en/Documents/DroRa/components/RadioLib/src -I/home/en/esp/v5.3.1/esp-idf/components/newlib/platform_include -I/home/en/esp/v5.3.1/esp-idf/components/freertos/config/include -I/home/en/esp/v5.3.1/esp-idf/components/freertos/config/include/freertos -I/home/en/esp/v5.3.1/esp-idf/components/freertos/config/xtensa/include -I/home/en/esp/v5.3.1/esp-idf/components/freertos/FreeRTOS-Kernel/include -I/home/en/esp/v5.3.1/esp-idf/components/freertos/FreeRTOS-Kernel/portable/xtensa/include -I/home/en/esp/v5.3.1/esp-idf/components/freertos/FreeRTOS-Kernel/portable/xtensa/include/freertos -I/home/en/esp/v5.3.1/esp-idf/components/freertos/esp_additions/include -I/home/en/esp/v5.3.1/esp-idf/components/esp_hw_support/include -I/home/en/esp/v5.3.1/esp-idf/components/esp_hw_support/include/soc -I/home/en/esp/v5.3.1/esp-idf/components/esp_hw_support/include/soc/esp32 -I/home/en/esp/v5.3.1/esp-idf/components/esp_hw_support/dma/include -I/home/en/esp/v5.3.1/esp-idf/components/esp_hw_support/ldo/include -I/home/en/esp/v5.3.1/esp-idf/components/esp_hw_support/port/esp32/. -I/home/en/esp/v5.3.1/esp-idf/components/esp_hw_support/port/esp32/include -I/home/en/esp/v5.3.1/esp-idf/components/heap/include -I/home/en/esp/v5.3.1/esp-idf/components/log/include -I/home/en/esp/v5.3.1/esp-idf/components/soc/include -I/home/en/esp/v5.3.1/esp-idf/components/soc/esp32 -I/home/en/esp/v5.3.1/esp-idf/components/soc/esp32/include -I/home/en/esp/v5.3.1/esp-idf/components/hal/platform_port/include -I/home/en/esp/v5.3.1/esp-idf/components/hal/esp32/include -I/home/en/esp/v5.3.1/esp-idf/components/hal/include -I/home/en/esp/v5.3.1/esp-idf/components/esp_rom/include -I/home/en/esp/v5.3.1/esp-idf/components/esp_rom/include/esp32 -I/home/en/esp/v5.3.1/esp-idf/components/esp_rom/esp32 -I/home/en/esp/v5.3.1/esp-idf/components/esp_common/include -I/home/en/esp/v5.3.1/esp-idf/components/esp_system/include -I/home/en/esp/v5.3.1/esp-idf/components/esp_system/port/soc -I/home/en/esp/v5.3.1/esp-idf/components/esp_system/port/include/private -I/home/en/esp/v5.3.1/esp-idf/components/xtensa/esp32/include -I/home/en/esp/v5.3.1/esp-idf/components/xtensa/include -I/home/en/esp/v5.3.1/esp-idf/components/xtensa/deprecated_include -I/home/en/esp/v5.3.1/esp-idf/components/lwip/include -I/home/en/esp/v5.3.1/esp-idf/components/lwip/include/apps -I/home/en/esp/v5.3.1/esp-idf/components/lwip/include/apps/sntp -I/home/en/esp/v5.3.1/esp-idf/components/lwip/lwip/src/include -I/home/en/esp/v5.3.1/esp-idf/components/lwip/port/include -I/home/en/esp/v5.3.1/esp-idf/components/lwip/port/freertos/include -I/home/en/esp/v5.3.1/esp-idf/components/lwip/port/esp32xx/include -I/home/en/esp/v5.3.1/esp-idf/components/lwip/port/esp32xx/include/arch -I/home/en/esp/v5.3.1/esp-idf/components/lwip/port/esp32xx/include/sys -mlongcalls -Wno-frame-address -fno-builtin-memcpy -fno-builtin-memset -fno-builtin-bzero -fno-builtin-stpcpy -fno-builtin-strncpy -fdiagnostics-color=always -ffunction-sections -fdata-sections -Wall -Werror=all -Wno-error=unused-function -Wno-error=unused-variable -Wno-error=unused-but-set-variable -Wno-error=deprecated-declarations -Wextra -Wno-unused-parameter -Wno-sign-compare -Wno-enum-conversion -gdwarf-4 -ggdb -Og -fno-shrink-wrap -fmacro-prefix-map=/home/en/Documents/DroRa=. -fmacro-prefix-map=/home/en/esp/v5.3.1/esp-idf=/IDF -fstrict-volatile-bitfields -fno-jump-tables -fno-tree-switch-conversion -std=gnu++2b -fno-exceptions -fno-rtti -MD -MT esp-idf/RadioLib/CMakeFiles/__idf_RadioLib.dir/src/modules/SX127x/SX127x.cpp.obj -MF esp-idf/RadioLib/CMakeFiles/__idf_RadioLib.dir/src/modules/SX127x/SX127x.cpp.obj.d -o esp-idf/RadioLib/CMakeFiles/__idf_RadioLib.dir/src/modules/SX127x/SX127x.cpp.obj -c /home/en/Documents/DroRa/components/RadioLib/src/modules/SX127x/SX127x.cpp /home/en/Documents/DroRa/components/RadioLib/src/modules/SX127x/SX127x.cpp: In member function 'virtual int16_t
SX127x::setIrqFlags(uint32_t)': /home/en/Documents/DroRa/components/RadioLib/src/modules/SX127x/SX127x.cpp:1420:15: error: 'state' may be used uninitialized [-Werror=maybe-uninitialized] 1420 | return(state); | ^/home/en/Documents/DroRa/components/RadioLib/src/modules/SX127x/SX127x.cpp:1327:11: note: 'state' was declared here 1327 | int16_t state; | ^~~~~cc1plus: some warnings being treated as errors[1014/1029] Building CXX object esp-idf/RadioLib/CMake...idf_RadioLib.dir/src/protocols/LoRaWAN/LoRaWAN.cpp.objninja: build stopped: subcommand failed.ninja failed with exit code 1, output of the command is in the /home/en/Documents/DroRa/build/log/idf_py_stderr_output_339958 and /home/en/Documents/DroRa/build/log/idf_py_stdout_output_339958
To Reproduce
Include RadioLib in an ESP-IDF project (running 5.3.1) either through adding to the components folder or via idf_components.yml and run a build.
Expected behavior
No errors/warnings on a clean build
Additional info (please complete):
MCU: esp32c3
ESP-IDF: 5.3.1
Library version: 7.1.0
The text was updated successfully, but these errors were encountered:
Good catch - fixed in the commit above, thanks for reporting! Though it is a bit strange that our ESP-IDF CI did not catch this. I guess ESP-IDF 5.5 doesn't have that warning enabled.
Describe the bug
I am trying to use RadioLib as an ESP-IDF component with ESP-IDF v5.3.1, but am running into the following warning/error. Looking at the file in question, if the
setIrqFlags(irq)
function is called withirq=0
the return value is not well defined. I think that instead the final return (return(state);
) should probably bereturn(RADIOLIB_ERR_NONE);
as if state is not 0, theRADIOLIB_ASSERT(state)
from earlier will return it. Alternatively state could be initialized toRADIOLIB_ERR_NONE
.Console output
To Reproduce
Include RadioLib in an ESP-IDF project (running 5.3.1) either through adding to the components folder or via
idf_components.yml
and run a build.Expected behavior
No errors/warnings on a clean build
Additional info (please complete):
The text was updated successfully, but these errors were encountered: