From ccaa6259308bc5a5829b756d8fb902340710735b Mon Sep 17 00:00:00 2001 From: chao an Date: Wed, 8 Feb 2023 16:26:00 +0800 Subject: [PATCH] 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 Signed-off-by: chao an --- 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