This is an automated email from the ASF dual-hosted git repository. xiaoxiang pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/nuttx.git
commit ccaa6259308bc5a5829b756d8fb902340710735b Author: chao an <anc...@xiaomi.com> AuthorDate: Wed Feb 8 16:26:00 2023 +0800 fs/smart: fix visual studio Compiler Error C2016 D:\archer\code\nuttx\include\nuttx/fs/smart.h(118,1): error C2016: C requires that a struct or union has at least one member Compiler error C2016: C requires that a struct or union has at least one member Reference: https://docs.microsoft.com/en-us/cpp/error-messages/compiler-errors-1/compiler-errors-c2001-through-c2099?view=msvc-170 Signed-off-by: chao.an <anc...@xiaomi.com> Signed-off-by: chao an <anc...@xiaomi.com> --- include/nuttx/fs/smart.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/nuttx/fs/smart.h b/include/nuttx/fs/smart.h index bab05ca680..46aade7d58 100644 --- a/include/nuttx/fs/smart.h +++ b/include/nuttx/fs/smart.h @@ -114,6 +114,8 @@ struct smart_procfs_data_s #ifdef CONFIG_MTD_SMART_ERASE_DEBUG const uint16_t *erasecounts; /* Pointer to the erase counts array */ uint16_t erasesize; /* Number of entries in the erase counts array */ +#else + uint8_t __pad; #endif }; #endif