0
0
mirror of https://github.com/openwrt/packages.git synced 2025-07-13 02:04:49 +00:00
Files
packages/net/ovn/patches/0004-fix-use-of-possible-uninitialized-var.patch
Yousong Zhou 4d1c7a144a ovn: bump to 22.03.5
Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
2024-02-22 09:31:44 +08:00

22 lines
899 B
Diff

Fix the following compilation errors
ic/ovn-ic.c: In function 'main':
ic/ovn-ic.c:689:5: warning: 'ls' may be used uninitialized in this function [-Wmaybe-uninitialized]
689 | nbrec_logical_switch_update_ports_addvalue(ls, lsp);
| ^
ic/ovn-ic.c:430:40: note: 'ls' was declared here
430 | const struct nbrec_logical_switch *ls;
| ^
--- a/ic/ovn-ic.c
+++ b/ic/ovn-ic.c
@@ -433,7 +433,7 @@ find_ts_in_nb(struct ic_context *ctx, ch
nbrec_logical_switch_index_init_row(ctx->nbrec_ls_by_name);
nbrec_logical_switch_index_set_name(key, ts_name);
- const struct nbrec_logical_switch *ls;
+ const struct nbrec_logical_switch *ls = NULL;
bool found = false;
NBREC_LOGICAL_SWITCH_FOR_EACH_EQUAL (ls, key, ctx->nbrec_ls_by_name) {
const char *ls_ts_name = smap_get(&ls->other_config, "interconn-ts");