Fixed access to initialized varaible

This commit is contained in:
Dmitry Stogov 2023-12-26 15:25:45 +03:00
parent 8088643c15
commit 7f4ba5dad4
2 changed files with 2 additions and 2 deletions

2
ir.g
View File

@ -245,7 +245,7 @@ ir_sym_data(ir_loader *loader):
{const char *name;} {const char *name;}
{size_t name_len;} {size_t name_len;}
{char buf[256];} {char buf[256];}
{uintptr_t offset;} {uintptr_t offset = 0;}
type(&t) type(&t)
( (
"sym" "(" ID(&name, &name_len) ")" "sym" "(" ID(&name, &name_len) ")"

View File

@ -1048,7 +1048,7 @@ static int parse_ir_sym_data(int sym, ir_loader *loader) {
const char *name; const char *name;
size_t name_len; size_t name_len;
char buf[256]; char buf[256];
uintptr_t offset; uintptr_t offset = 0;
sym = parse_type(sym, &t); sym = parse_type(sym, &t);
if (sym == YY_SYM) { if (sym == YY_SYM) {
sym = get_sym(); sym = get_sym();