Skip to content

Commit 85d127c

Browse files
committed
[IWDG] Fix unused variable
Signed-off-by: Frederic.Pillon <[email protected]>
1 parent effb47c commit 85d127c

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

libraries/IWatchdog/src/IWatchdog.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,6 @@ void IWatchdogClass::get(uint32_t *timeout, uint32_t *window)
109109
if (timeout != NULL) {
110110
uint32_t prescaler = 0;
111111
uint32_t reload = 0;
112-
uint32_t win = 0;
113112
float base = (1000000.0 / LSI_VALUE);
114113

115114
while (LL_IWDG_IsActiveFlag_RVU(IWDG));
@@ -123,7 +122,7 @@ void IWatchdogClass::get(uint32_t *timeout, uint32_t *window)
123122
#ifdef IWDG_WINR_WIN
124123
if (window != NULL) {
125124
while (LL_IWDG_IsActiveFlag_WVU(IWDG));
126-
win = LL_IWDG_GetWindow(IWDG);
125+
uint32_t win = LL_IWDG_GetWindow(IWDG);
127126
*window = (uint32_t)((4 << prescaler) * (win + 1) * base);
128127
}
129128
#else

0 commit comments

Comments
 (0)