From f75e61105457732db355788e5ec1b734c348e4e0 Mon Sep 17 00:00:00 2001 From: Damien George Date: Thu, 30 Jun 2022 13:54:50 +1000 Subject: [PATCH] extmod/vfs: Prevent uninitialized variable warning for path_out. The warning can appear when building in Release mode on the rp2 port. Signed-off-by: Damien George --- extmod/vfs.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/extmod/vfs.c b/extmod/vfs.c index 8e5e036326..8bcead190d 100644 --- a/extmod/vfs.c +++ b/extmod/vfs.c @@ -100,6 +100,8 @@ STATIC mp_vfs_mount_t *lookup_path(mp_obj_t path_in, mp_obj_t *path_out) { if (vfs != MP_VFS_NONE && vfs != MP_VFS_ROOT) { *path_out = mp_obj_new_str_of_type(mp_obj_get_type(path_in), (const byte *)p_out, strlen(p_out)); + } else { + *path_out = MP_OBJ_NULL; } return vfs; }