Skip to content

Commit b71ebc8

Browse files
Roytakmichalvasko
authored andcommitted
libyang UPDATE fix uninit vars in release build
1 parent 53f3689 commit b71ebc8

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

src/parser_json.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1160,7 +1160,7 @@ lydjson_parse_attribute(struct lyd_json_ctx *lydctx, struct lyd_node *attr_node,
11601160
{
11611161
LY_ERR r;
11621162
const char *opaq_name, *mod_name, *attr_mod = NULL;
1163-
size_t opaq_name_len, attr_mod_len;
1163+
size_t opaq_name_len, attr_mod_len = 0;
11641164

11651165
if (!attr_node) {
11661166
/* learn the attribute module name */

tools/lint/linenoise/utf8.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -400,7 +400,7 @@ static size_t utf8BytesToCodePoint(const char* buf, size_t len, int* cp) {
400400
*/
401401
size_t linenoiseUtf8NextCharLen(const char* buf, size_t buf_len, size_t pos, size_t *col_len) {
402402
size_t beg = pos;
403-
int cp;
403+
int cp = 0;
404404
size_t len = utf8BytesToCodePoint(buf + pos, buf_len - pos, &cp);
405405
if (isCombiningChar(cp)) {
406406
/* NOTREACHED */
@@ -423,7 +423,7 @@ size_t linenoiseUtf8PrevCharLen(const char* buf, size_t UNUSED(buf_len), size_t
423423
while (pos > 0) {
424424
size_t len = prevUtf8CharLen(buf, pos);
425425
pos -= len;
426-
int cp;
426+
int cp = 0;
427427
utf8BytesToCodePoint(buf + pos, len, &cp);
428428
if (!isCombiningChar(cp)) {
429429
if (col_len != NULL) *col_len = isWideChar(cp) ? 2 : 1;

0 commit comments

Comments
 (0)