Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

-Wunused-variable compiler warnings #923

Open
zfields opened this issue Jul 18, 2024 · 1 comment
Open

-Wunused-variable compiler warnings #923

zfields opened this issue Jul 18, 2024 · 1 comment

Comments

@zfields
Copy link
Contributor

zfields commented Jul 18, 2024

~/.arduino15/packages/arduino/hardware/mbed_opta/4.1.5/libraries/STM32H747_System/src/STM32H747_System.cpp: In member function 'uint8_t STM32H747::readReg(uint8_t)':
~/.arduino15/packages/arduino/hardware/mbed_opta/4.1.5/libraries/STM32H747_System/src/STM32H747_System.cpp:9:8: warning: unused variable 'response' [-Wunused-variable]
   char response = 0xFF;
        ^~~~~~~~
In file included from ~/.arduino15/packages/arduino/hardware/mbed_opta/4.1.5/cores/arduino/mbed/targets/TARGET_STM/TARGET_STM32H7/STM32Cube_FW/STM32H7xx_HAL_Driver/stm32h7xx_hal_rcc.h:29:0,
                 from ~/.arduino15/packages/arduino/hardware/mbed_opta/4.1.5/cores/arduino/mbed/targets/TARGET_STM/TARGET_STM32H7/STM32Cube_FW/stm32h7xx_hal_conf.h:398,
                 from ~/.arduino15/packages/arduino/hardware/mbed_opta/4.1.5/cores/arduino/mbed/targets/TARGET_STM/TARGET_STM32H7/STM32Cube_FW/STM32H7xx_HAL_Driver/stm32h7xx_hal.h:30,
                 from ~/.arduino15/packages/arduino/hardware/mbed_opta/4.1.5/cores/arduino/mbed/targets/TARGET_STM/TARGET_STM32H7/STM32Cube_FW/CMSIS/stm32h7xx.h:223,
                 from ~/.arduino15/packages/arduino/hardware/mbed_opta/4.1.5/cores/arduino/mbed/targets/TARGET_STM/TARGET_STM32H7/cmsis.h:22,
                 from ~/.arduino15/packages/arduino/hardware/mbed_opta/4.1.5/cores/arduino/mbed/targets/TARGET_STM/PinNamesTypes.h:33,
                 from ~/.arduino15/packages/arduino/hardware/mbed_opta/4.1.5/variants/OPTA/pinmode_arduino.h:24,
                 from ~/.arduino15/packages/arduino/hardware/mbed_opta/4.1.5/cores/arduino/Arduino.h:26,
                 from ~/.arduino15/packages/arduino/hardware/mbed_opta/4.1.5/libraries/STM32H747_System/src/STM32H747_System.h:4,
                 from ~/.arduino15/packages/arduino/hardware/mbed_opta/4.1.5/libraries/STM32H747_System/src/STM32H747_System.cpp:1:
~/.arduino15/packages/arduino/hardware/mbed_opta/4.1.5/libraries/STM32H747_System/src/STM32H747_System.cpp: In member function 'bool STM32H747::useInternalOscillator(bool)':
~/.arduino15/packages/arduino/hardware/mbed_opta/4.1.5/cores/arduino/mbed/targets/TARGET_STM/TARGET_STM32H7/STM32Cube_FW/STM32H7xx_HAL_Driver/stm32h7xx_hal_pwr.h:286:14: warning: conversion to void will not access object of type 'volatile uint32_t {aka volatile long unsigned int}'
       UNUSED(tmpreg);                                                          \
~/.arduino15/packages/arduino/hardware/mbed_opta/4.1.5/cores/arduino/mbed/targets/TARGET_STM/TARGET_STM32H7/STM32Cube_FW/STM32H7xx_HAL_Driver/stm32h7xx_hal_def.h:70:27: note: in definition of macro 'UNUSED'
 #define UNUSED(x) ((void)(x))
                           ^
~/.arduino15/packages/arduino/hardware/mbed_opta/4.1.5/libraries/STM32H747_System/src/STM32H747_System.cpp:109:5: note: in expansion of macro '__HAL_PWR_VOLTAGESCALING_CONFIG'
     __HAL_PWR_VOLTAGESCALING_CONFIG(PWR_REGULATOR_VOLTAGE_SCALE3);
     ^
~/.arduino15/packages/arduino/hardware/mbed_opta/4.1.5/cores/arduino/mbed/targets/TARGET_STM/TARGET_STM32H7/STM32Cube_FW/STM32H7xx_HAL_Driver/stm32h7xx_hal_pwr.h:286:14: warning: conversion to void will not access object of type 'volatile uint32_t {aka volatile long unsigned int}'
       UNUSED(tmpreg);                                                          \
~/.arduino15/packages/arduino/hardware/mbed_opta/4.1.5/cores/arduino/mbed/targets/TARGET_STM/TARGET_STM32H7/STM32Cube_FW/STM32H7xx_HAL_Driver/stm32h7xx_hal_def.h:70:27: note: in definition of macro 'UNUSED'
 #define UNUSED(x) ((void)(x))
                           ^
~/.arduino15/packages/arduino/hardware/mbed_opta/4.1.5/libraries/STM32H747_System/src/STM32H747_System.cpp:111:5: note: in expansion of macro '__HAL_PWR_VOLTAGESCALING_CONFIG'
     __HAL_PWR_VOLTAGESCALING_CONFIG(PWR_REGULATOR_VOLTAGE_SCALE1);
     ^
~/.arduino15/packages/arduino/hardware/mbed_opta/4.1.5/libraries/STM32H747_System/src/STM32H747_System.cpp:47:28: warning: unused variable 'PeriphClkInitStruct' [-Wunused-variable]
   RCC_PeriphCLKInitTypeDef PeriphClkInitStruct = {0};
                            ^~~~~~~~~~~~~~~~~~~
@zfields
Copy link
Contributor Author

zfields commented Jul 18, 2024

arduino-cli compile --verbose --warnings=all --build-property "build.extra_flags=-Wno-implicit-fallthrough -Wno-psabi -Wno-deprecated-copy -Wno-missing-field-initializers -Wno-vla -Wno-delete-non-virtual-dtor -Wno-sign-compare -Og -g" --fqbn arduino:mbed_opta:opta <dev folder>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant