diff options
author | IhorNehrutsa <Ihor.Nehrutsa@gmail.com> | 2025-01-21 09:55:55 +0200 |
---|---|---|
committer | Damien George <damien@micropython.org> | 2025-01-24 23:17:05 +1100 |
commit | a4ab847688406bb31eb531e07155bf173a8785aa (patch) | |
tree | e8b2957d199627d62f3f321a264bd0d8b781c936 /py/persistentcode.c | |
parent | 865a4c8bf6868ce488347a76f5f3db8e0dabd11d (diff) |
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 <daniel@dvdgiessen.nl>
Signed-off-by: IhorNehrutsa <Ihor.Nehrutsa@gmail.com>
Diffstat (limited to 'py/persistentcode.c')
-rw-r--r-- | py/persistentcode.c | 2 |
1 files changed, 1 insertions, 1 deletions
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 |