diff options
| author | Emil Renner Berthing <esmil@mailme.dk> | 2020-10-03 11:23:12 +0200 |
|---|---|---|
| committer | Emil Renner Berthing <esmil@mailme.dk> | 2020-10-22 11:47:36 +0200 |
| commit | 9aa58cf8bac353297ff5e7b4f3331e5618046095 (patch) | |
| tree | 0f36014f1e370a0797bc23da1c9c9ae4c5f77f1a /extmod/vfs_lfs.c | |
| parent | fdd6fa389ed68a5d0761f7cb71c94db5e927d741 (diff) | |
py, extmod: Add explicit initializers for default values.
When compiling with -Wextra which includes -Wmissing-field-initializers
GCC will warn that the defval field of mp_arg_val_t is not initialized.
This is just a warning as it is defined to be zero initialized, but since
it is a union it makes sense to be explicit about which member we're
going to use, so add the explicit initializers and get rid of the
warning.
Diffstat (limited to 'extmod/vfs_lfs.c')
| -rw-r--r-- | extmod/vfs_lfs.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/extmod/vfs_lfs.c b/extmod/vfs_lfs.c index 9cf3eb110..dd78269a4 100644 --- a/extmod/vfs_lfs.c +++ b/extmod/vfs_lfs.c @@ -35,7 +35,7 @@ enum { LFS_MAKE_ARG_bdev, LFS_MAKE_ARG_readsize, LFS_MAKE_ARG_progsize, LFS_MAKE_ARG_lookahead, LFS_MAKE_ARG_mtime }; static const mp_arg_t lfs_make_allowed_args[] = { - { MP_QSTR_, MP_ARG_REQUIRED | MP_ARG_OBJ }, + { MP_QSTR_, MP_ARG_REQUIRED | MP_ARG_OBJ, {.u_obj = MP_OBJ_NULL} }, { MP_QSTR_readsize, MP_ARG_KW_ONLY | MP_ARG_INT, {.u_int = 32} }, { MP_QSTR_progsize, MP_ARG_KW_ONLY | MP_ARG_INT, {.u_int = 32} }, { MP_QSTR_lookahead, MP_ARG_KW_ONLY | MP_ARG_INT, {.u_int = 32} }, |
