Fix gd32f4xx_syscfg.c:137:5: error: variable 'regaddr' is used uninitialized whenever switch default is taken [-Werror,-Wsometimes-uninitialized]
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
This commit is contained in:
parent
513904d1df
commit
202408c6e7
|
@ -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)
|
void gd32_syscfg_exti_line_config(uint8_t exti_port, uint8_t exti_pin)
|
||||||
{
|
{
|
||||||
uint32_t regval;
|
uint32_t regval;
|
||||||
uint32_t regaddr;
|
uint32_t regaddr = 0;
|
||||||
|
|
||||||
switch (exti_pin / SYSCFG_EXTI_SS_JSTEP)
|
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;
|
regaddr = GD32_SYSCFG_EXTISS3;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
DEBUGASSERT(false);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue