From 4502ed238effadd07b44dad62e5ec50689038abb Mon Sep 17 00:00:00 2001 From: Michal Vasko Date: Thu, 15 Aug 2024 11:06:52 +0200 Subject: [PATCH] libyang MAINTENANCE unitialized var warnings False positives. --- src/plugins_types/decimal64.c | 2 +- src/schema_compile_node.c | 2 +- src/tree_schema_common.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/plugins_types/decimal64.c b/src/plugins_types/decimal64.c index 0eb01a04f..8b1e2cdf3 100644 --- a/src/plugins_types/decimal64.c +++ b/src/plugins_types/decimal64.c @@ -90,7 +90,7 @@ lyplg_type_store_decimal64(const struct ly_ctx *ctx, const struct lysc_type *typ { struct lysc_type_dec *type_dec = (struct lysc_type_dec *)type; LY_ERR ret = LY_SUCCESS; - int64_t num; + int64_t num = 0; char *canon; /* init storage */ diff --git a/src/schema_compile_node.c b/src/schema_compile_node.c index 1405b8cf1..5d2f0ae48 100644 --- a/src/schema_compile_node.c +++ b/src/schema_compile_node.c @@ -2582,7 +2582,7 @@ lys_compile_node_connect(struct lysc_ctx *ctx, struct lysc_node *parent, struct } } else { /* top-level element */ - struct lysc_node **list; + struct lysc_node **list = NULL; if (ctx->ext) { lyplg_ext_get_storage_p(ctx->ext, LY_STMT_DATA_NODE_MASK, (uint64_t *)&list); diff --git a/src/tree_schema_common.c b/src/tree_schema_common.c index 803009a62..dcfb09664 100644 --- a/src/tree_schema_common.c +++ b/src/tree_schema_common.c @@ -768,7 +768,7 @@ lys_parse_localfile(struct ly_ctx *ctx, const char *name, const char *revision, { struct ly_in *in; char *filepath = NULL; - LYS_INFORMAT format; + LYS_INFORMAT format = 0; void *mod = NULL; LY_ERR ret = LY_SUCCESS; struct lysp_load_module_check_data check_data = {0};