From 7f4ba5dad4748de8362e35acfcdfd8e7b381b7d2 Mon Sep 17 00:00:00 2001 From: Dmitry Stogov Date: Tue, 26 Dec 2023 15:25:45 +0300 Subject: [PATCH] Fixed access to initialized varaible --- ir.g | 2 +- ir_load.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ir.g b/ir.g index 3e50cac..e7cee24 100644 --- a/ir.g +++ b/ir.g @@ -245,7 +245,7 @@ ir_sym_data(ir_loader *loader): {const char *name;} {size_t name_len;} {char buf[256];} - {uintptr_t offset;} + {uintptr_t offset = 0;} type(&t) ( "sym" "(" ID(&name, &name_len) ")" diff --git a/ir_load.c b/ir_load.c index 8989a0a..42637e8 100644 --- a/ir_load.c +++ b/ir_load.c @@ -1048,7 +1048,7 @@ static int parse_ir_sym_data(int sym, ir_loader *loader) { const char *name; size_t name_len; char buf[256]; - uintptr_t offset; + uintptr_t offset = 0; sym = parse_type(sym, &t); if (sym == YY_SYM) { sym = get_sym();