Skip to content

Commit

Permalink
extmod/vfs: Prevent uninitialized variable warning for path_out.
Browse files Browse the repository at this point in the history
The warning can appear when building in Release mode on the rp2 port.

Signed-off-by: Damien George <damien@micropython.org>
  • Loading branch information
dpgeorge committed Jun 30, 2022
1 parent f1b5761 commit f75e611
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions extmod/vfs.c
Expand Up @@ -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;
}
Expand Down

0 comments on commit f75e611

Please sign in to comment.