Skip to content

Commit a4ab847

Browse files
IhorNehrutsaDvdGiessen
authored andcommitted
py/persistentcode: Initialize prelude_ptr to prevent compiler warning.
The esp32 IDF toolchain can give a "may be used uninitialized" warning, at least for ESP32-S3 with gcc 14.2.0. Silence that warning by initializing the variable with NULL. Co-authored-by: Daniel van de Giessen <[email protected]> Signed-off-by: IhorNehrutsa <[email protected]>
1 parent 865a4c8 commit a4ab847

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

py/persistentcode.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -402,7 +402,7 @@ static mp_raw_code_t *load_raw_code(mp_reader_t *reader, mp_module_context_t *co
402402

403403
#if MICROPY_EMIT_MACHINE_CODE
404404
} else {
405-
const uint8_t *prelude_ptr;
405+
const uint8_t *prelude_ptr = NULL;
406406
#if MICROPY_EMIT_NATIVE_PRELUDE_SEPARATE_FROM_MACHINE_CODE
407407
if (kind == MP_CODE_NATIVE_PY) {
408408
// Executable code cannot be accessed byte-wise on this architecture, so copy

0 commit comments

Comments
 (0)