libyang MAINTENANCE uninitializes variables in optimized code
Silent (probably false positive, but who knows with optimizations)
compiler's warnings (mostly) about uninitialized variables when being
compiled as Release build type.
diff --git a/src/schema_compile_node.c b/src/schema_compile_node.c
index ccca636..a060aa1 100644
--- a/src/schema_compile_node.c
+++ b/src/schema_compile_node.c
@@ -451,7 +451,7 @@
{
LY_ERR ret = LY_SUCCESS;
char *valcopy = NULL;
- size_t len;
+ size_t len = 0;
if (value) {
ret = range_part_check_value_syntax(ctx, basetype, frdigits, *value, &len, &valcopy);
@@ -1157,8 +1157,8 @@
{
LY_ERR ret = LY_SUCCESS;
LY_ARRAY_COUNT_TYPE u, v, match = 0;
- int32_t value = 0, cur_val;
- uint32_t position = 0, cur_pos;
+ int32_t value = 0, cur_val = 0;
+ uint32_t position = 0, cur_pos = 0;
struct lysc_type_bitenum_item *e, storage;
ly_bool enabled;
@@ -2496,7 +2496,7 @@
LY_ERR ret = LY_EVALID;
const char *name, *prefix, *id;
size_t name_len, prefix_len;
- const struct lys_module *mod;
+ const struct lys_module *mod = NULL;
const char *nodeid_type;
uint32_t getnext_extra_flag = 0;
uint16_t current_nodetype = 0;