diff options
| author | Alessandro Gatti <a.gatti@frob.it> | 2025-01-04 12:51:18 +0100 |
|---|---|---|
| committer | Alessandro Gatti <a.gatti@frob.it> | 2025-02-27 12:06:09 +0100 |
| commit | dc2c33b07f83ac4fcbcbcbb294e5726a95507490 (patch) | |
| tree | ff86f83cc46b99cfe24f0122ce1277f09319535a /py | |
| parent | 14ba32bb205fa1f7d6ac456879b08aadb4e1aaf7 (diff) | |
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 <a.gatti@frob.it>
Diffstat (limited to 'py')
| -rw-r--r-- | py/emitinlinerv32.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/py/emitinlinerv32.c b/py/emitinlinerv32.c index 179e289c6..ba171b4e6 100644 --- a/py/emitinlinerv32.c +++ b/py/emitinlinerv32.c @@ -709,9 +709,11 @@ static bool handle_load_store_opcode_with_offset(emit_inline_asm_t *emit, qstr o return false; } - mp_uint_t rd; - mp_uint_t rs1; - parse_register_node(nodes[0], &rd, opcode_data->argument1_kind & C); + mp_uint_t rd = 0; + mp_uint_t rs1 = 0; + if (!parse_register_node(nodes[0], &rd, opcode_data->argument1_kind & C)) { + return false; + } if (!parse_register_node(nodes[1], &rs1, opcode_data->argument3_kind & C)) { return false; } |
