Skip to content

Commit b696486

Browse files
committed
Fix compiler warning: 'uwTimclock' may be used uninitialized
Fix #44 cores/arduino/stm32/timer.c:733:19: warning: 'uwTimclock' may be used uninitialized in this function [-Wmaybe-uninitialized] uwTimclock*=2; Signed-off-by: Frederic.Pillon <[email protected]>
1 parent 21066ce commit b696486

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cores/arduino/stm32/timer.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -672,7 +672,7 @@ uint32_t getTimerClkFreq(TIM_TypeDef* tim)
672672
{
673673
RCC_ClkInitTypeDef clkconfig = {};
674674
uint32_t pFLatency = 0U;
675-
uint32_t uwTimclock, uwAPBxPrescaler = 0U;
675+
uint32_t uwTimclock = 0U, uwAPBxPrescaler = 0U;
676676

677677
/* Get clock configuration */
678678
HAL_RCC_GetClockConfig(&clkconfig, &pFLatency);

0 commit comments

Comments
 (0)