From 05b7ccd850f02b41daffc46b7327eca472c804f4 Mon Sep 17 00:00:00 2001 From: Mert Vatansever Date: Wed, 14 Aug 2024 18:42:11 +0300 Subject: [PATCH] fix(PeriphDrivers): Fix MAX32675 timer warning Signed-off-by: Sadik Ozer --- MAX/Libraries/PeriphDrivers/Source/TMR/tmr_me16.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/MAX/Libraries/PeriphDrivers/Source/TMR/tmr_me16.c b/MAX/Libraries/PeriphDrivers/Source/TMR/tmr_me16.c index 469531f..901344e 100644 --- a/MAX/Libraries/PeriphDrivers/Source/TMR/tmr_me16.c +++ b/MAX/Libraries/PeriphDrivers/Source/TMR/tmr_me16.c @@ -25,14 +25,14 @@ int MXC_TMR_Init(mxc_tmr_regs_t *tmr, mxc_tmr_cfg_t *cfg, bool init_pins) { - uint8_t tmr_id; + uint8_t tmr_id = MXC_TMR_GET_IDX(tmr); uint8_t clockSource = MXC_TMR_CLK0; if (cfg == NULL) { return E_NULL_PTR; } - MXC_ASSERT((tmr_id = MXC_TMR_GET_IDX(tmr)) >= 0); + MXC_ASSERT(tmr_id >= 0); switch (cfg->clock) { case MXC_TMR_EXT_CLK: