diff --git a/arch/arm/src/gd32f4/gd32f4xx_syscfg.c b/arch/arm/src/gd32f4/gd32f4xx_syscfg.c index 84f32ddf2f..145a4ff1ad 100644 --- a/arch/arm/src/gd32f4/gd32f4xx_syscfg.c +++ b/arch/arm/src/gd32f4/gd32f4xx_syscfg.c @@ -107,7 +107,7 @@ void gd32_syscfg_exmc_swap_config(uint32_t syscfg_exmc_swap) void gd32_syscfg_exti_line_config(uint8_t exti_port, uint8_t exti_pin) { uint32_t regval; - uint32_t regaddr; + uint32_t regaddr = 0; switch (exti_pin / SYSCFG_EXTI_SS_JSTEP) { @@ -135,6 +135,7 @@ void gd32_syscfg_exti_line_config(uint8_t exti_port, uint8_t exti_pin) regaddr = GD32_SYSCFG_EXTISS3; break; default: + DEBUGASSERT(false); break; }