From a4ab847688406bb31eb531e07155bf173a8785aa Mon Sep 17 00:00:00 2001 From: IhorNehrutsa Date: Tue, 21 Jan 2025 09:55:55 +0200 Subject: 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 Signed-off-by: IhorNehrutsa --- py/persistentcode.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'py/persistentcode.c') diff --git a/py/persistentcode.c b/py/persistentcode.c index 0843d1a2c..840ee49d3 100644 --- a/py/persistentcode.c +++ b/py/persistentcode.c @@ -402,7 +402,7 @@ static mp_raw_code_t *load_raw_code(mp_reader_t *reader, mp_module_context_t *co #if MICROPY_EMIT_MACHINE_CODE } else { - const uint8_t *prelude_ptr; + const uint8_t *prelude_ptr = NULL; #if MICROPY_EMIT_NATIVE_PRELUDE_SEPARATE_FROM_MACHINE_CODE if (kind == MP_CODE_NATIVE_PY) { // Executable code cannot be accessed byte-wise on this architecture, so copy -- cgit v1.2.3