diff options
| author | Scott Shawcroft <scott@tannewt.org> | 2021-01-20 17:10:28 -0800 |
|---|---|---|
| committer | Scott Shawcroft <scott@tannewt.org> | 2021-01-20 19:16:56 -0800 |
| commit | 2b4ad1ed0399dc77632bf7dca61b269517320ad9 (patch) | |
| tree | 23a0900cc5c0b01453e4578168fdfb96884256be /shared-module | |
| parent | 733094aead6e84b42da54655b2b0a5d0dbd1a503 (diff) | |
Fix warnings that come from -O3 (I think)
Diffstat (limited to 'shared-module')
| -rw-r--r-- | shared-module/os/__init__.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/shared-module/os/__init__.c b/shared-module/os/__init__.c index 39cf40fda..159b54e31 100644 --- a/shared-module/os/__init__.c +++ b/shared-module/os/__init__.c @@ -42,6 +42,7 @@ // Version of mp_vfs_lookup_path that takes and returns uPy string objects. STATIC mp_vfs_mount_t *lookup_path(const char* path, mp_obj_t *path_out) { const char *p_out; + *path_out = mp_const_none; mp_vfs_mount_t *vfs = mp_vfs_lookup_path(path, &p_out); if (vfs != MP_VFS_NONE && vfs != MP_VFS_ROOT) { *path_out = mp_obj_new_str_of_type(&mp_type_str, @@ -53,6 +54,7 @@ STATIC mp_vfs_mount_t *lookup_path(const char* path, mp_obj_t *path_out) { // Strip off trailing slashes to please underlying libraries STATIC mp_vfs_mount_t *lookup_dir_path(const char* path, mp_obj_t *path_out) { const char *p_out; + *path_out = mp_const_none; mp_vfs_mount_t *vfs = mp_vfs_lookup_path(path, &p_out); if (vfs != MP_VFS_NONE && vfs != MP_VFS_ROOT) { size_t len = strlen(p_out); |
