Closed
Description
Introduced by #1550: https://github.com/stm32duino/Arduino_Core_STM32/pull/1550/files#diff-92fadde44a62db1d865755492bfafe922d6200f5006456bf738ef33692276c79R1177
C:\STM32\arduino\arduino-1.8.16\portable\packages\STMicroelectronics\hardware\stm32\2.1.0\cores\arduino\HardwareTimer.cpp:1177:7: warning: unused variable 'timAssociatedInputChannel' [-Wunused-variable]
1177 | int timAssociatedInputChannel;
| ^~~~~~~~~~~~~~~~~~~~~~~~~
Edit:
__HAL_TIM_GET_IT_SOURCE
usage also bring a warning, the interrupt
type should be checked:
C:\STM32\arduino\arduino-1.8.16\portable\packages\STMicroelectronics\hardware\stm32\2.1.0\cores\arduino\HardwareTimer.cpp: In member function 'bool HardwareTimer::isRunningChannel(uint32_t)':
C:\STM32\arduino\arduino-1.8.16\portable\packages\STMicroelectronics\hardware\stm32\2.1.0\system/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim.h:1234:62: warning: comparison of integer expressions of different signedness: 'long unsigned int' and 'int' [-Wsign-compare]
1233 | #define __HAL_TIM_GET_IT_SOURCE(__HANDLE__, __INTERRUPT__) ((((__HANDLE__)->Instance->DIER & (__INTERRUPT__)) \
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1234 | == (__INTERRUPT__)) ? SET : RESET)
| ^~~~~~~~~~~~~~~~~~
C:\STM32\arduino\arduino-1.8.16\portable\packages\STMicroelectronics\hardware\stm32\2.1.0\cores\arduino\HardwareTimer.cpp:1193:13: note: in expansion of macro '__HAL_TIM_GET_IT_SOURCE'
1193 | || (__HAL_TIM_GET_IT_SOURCE(&(_timerObj.handle), interrupt) == SET);
| ^~~~~~~~~~~~~~~~~~~~~~~
Tips: Think to enable all verbose to ensure to see all warnings 😉