Skip to content

Commit dc2c33b

Browse files
committed
py/emitinlinerv32: Fix compilation with ESP-IDF v5.2 and later.
This commit fixes a compilation warning (turned error) about a potentially uninitialised variable being used. The warning can be ignored as the variable in question is always written to, but the code has been changed to silence that warning. Signed-off-by: Alessandro Gatti <[email protected]>
1 parent 14ba32b commit dc2c33b

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

py/emitinlinerv32.c

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -709,9 +709,11 @@ static bool handle_load_store_opcode_with_offset(emit_inline_asm_t *emit, qstr o
709709
return false;
710710
}
711711

712-
mp_uint_t rd;
713-
mp_uint_t rs1;
714-
parse_register_node(nodes[0], &rd, opcode_data->argument1_kind & C);
712+
mp_uint_t rd = 0;
713+
mp_uint_t rs1 = 0;
714+
if (!parse_register_node(nodes[0], &rd, opcode_data->argument1_kind & C)) {
715+
return false;
716+
}
715717
if (!parse_register_node(nodes[1], &rs1, opcode_data->argument3_kind & C)) {
716718
return false;
717719
}

0 commit comments

Comments
 (0)