mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-08 11:18:43 +00:00
tools: generate northbound code without warnings
Use the alternate struct instantiation that does not generates warning on old compilers. Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
This commit is contained in:
parent
88292d6959
commit
13080468b0
@ -238,17 +238,20 @@ static int generate_nb_nodes(const struct lys_node *snode, void *arg)
|
|||||||
printf("\t\t{\n"
|
printf("\t\t{\n"
|
||||||
"\t\t\t.xpath = \"%s\",\n",
|
"\t\t\t.xpath = \"%s\",\n",
|
||||||
xpath);
|
xpath);
|
||||||
|
printf("\t\t\t.cbs = {\n");
|
||||||
first = false;
|
first = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
generate_callback_name((struct lys_node *)snode, cb->operation,
|
generate_callback_name((struct lys_node *)snode, cb->operation,
|
||||||
cb_name, sizeof(cb_name));
|
cb_name, sizeof(cb_name));
|
||||||
printf("\t\t\t.cbs.%s = %s,\n",
|
printf("\t\t\t\t.%s = %s,\n", nb_operation_name(cb->operation),
|
||||||
nb_operation_name(cb->operation), cb_name);
|
cb_name);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!first)
|
if (!first) {
|
||||||
|
printf("\t\t\t}\n");
|
||||||
printf("\t\t},\n");
|
printf("\t\t},\n");
|
||||||
|
}
|
||||||
|
|
||||||
return YANG_ITER_CONTINUE;
|
return YANG_ITER_CONTINUE;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user