8000 py/persistentcode: Initialize prelude_ptr to prevent compiler warning. · micropython/micropython@a4ab847 · GitHub
[go: up one dir, main page]

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 <daniel@dvdgiessen.nl> Signed-off-by: IhorNehrutsa <Ihor.Nehrutsa@gmail.com>
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
< 6FD2 div data-testid="neutral diffstat" class="DiffSquares-module__diffSquare--h5kjy DiffSquares-module__neutral--VlyoP">
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)
0