mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-11-01 05:25:20 +00:00
lib: fix "may be used uninitialized" build warning
We are already handling all possible four cases from the "nb_event" enumeration, so this problem can't happen in practice. Initialize the "ref" variable to zero to silence the warning. Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
This commit is contained in:
parent
e4587bc559
commit
ec348d4344
@ -719,7 +719,6 @@ static int nb_configuration_callback(const enum nb_event event,
|
||||
const struct lyd_node *dnode = change->cb.dnode;
|
||||
union nb_resource *resource;
|
||||
int ret = NB_ERR;
|
||||
enum lib_log_refs ref;
|
||||
|
||||
if (debug_northbound) {
|
||||
const char *value = "(none)";
|
||||
@ -753,6 +752,8 @@ static int nb_configuration_callback(const enum nb_event event,
|
||||
}
|
||||
|
||||
if (ret != NB_OK) {
|
||||
enum lib_log_refs ref = 0;
|
||||
|
||||
switch (event) {
|
||||
case NB_EV_VALIDATE:
|
||||
ref = EC_LIB_NB_CB_CONFIG_VALIDATE;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user