Copilot commented on code in PR #3554:
URL: https://github.com/apache/nuttx-apps/pull/3554#discussion_r3447059612
##########
examples/userfs/userfs_main.c:
##########
@@ -142,19 +142,28 @@ static char g_file3_data[UFSTEST_FILE3_MXSIZE] = "This is
file 3";
static struct ufstest_file_s g_rootdir[UFSTEST_NFILES] =
{
{
- { DTYPE_FILE, "File1" },
+ {
+ .d_type = DTYPE_FILE,
+ .d_name = "File1"
+ },
UFSTEST_INIT_FILE1_SIZE,
UFSTEST_FILE1_MXSIZE,
g_file1_data
},
{
- { DTYPE_FILE, "File2" },
+ {
+ .d_type = DTYPE_FILE,
+ .d_name = "File2"
+ },
UFSTEST_INIT_FILE2_SIZE,
Review Comment:
The inner `struct dirent` initializer needs a trailing comma after the
closing brace; otherwise `UFSTEST_INIT_FILE2_SIZE` won't parse as the next
field initializer (compile error).
##########
examples/userfs/userfs_main.c:
##########
@@ -142,19 +142,28 @@ static char g_file3_data[UFSTEST_FILE3_MXSIZE] = "This is
file 3";
static struct ufstest_file_s g_rootdir[UFSTEST_NFILES] =
{
{
- { DTYPE_FILE, "File1" },
+ {
+ .d_type = DTYPE_FILE,
+ .d_name = "File1"
+ },
UFSTEST_INIT_FILE1_SIZE,
UFSTEST_FILE1_MXSIZE,
g_file1_data
},
{
- { DTYPE_FILE, "File2" },
+ {
+ .d_type = DTYPE_FILE,
+ .d_name = "File2"
+ },
UFSTEST_INIT_FILE2_SIZE,
UFSTEST_FILE2_MXSIZE,
g_file2_data
},
{
- { DTYPE_FILE, "File3" },
+ {
+ .d_type = DTYPE_FILE,
+ .d_name = "File3"
+ },
UFSTEST_INIT_FILE3_SIZE,
Review Comment:
The inner `struct dirent` initializer needs a trailing comma after the
closing brace; otherwise `UFSTEST_INIT_FILE3_SIZE` won't parse as the next
field initializer (compile error).
##########
examples/userfs/userfs_main.c:
##########
@@ -142,19 +142,28 @@ static char g_file3_data[UFSTEST_FILE3_MXSIZE] = "This is
file 3";
static struct ufstest_file_s g_rootdir[UFSTEST_NFILES] =
{
{
- { DTYPE_FILE, "File1" },
+ {
+ .d_type = DTYPE_FILE,
+ .d_name = "File1"
+ },
UFSTEST_INIT_FILE1_SIZE,
Review Comment:
The inner `struct dirent` initializer is missing a trailing comma after the
closing brace, so the following `UFSTEST_INIT_FILE1_SIZE` token won't parse as
the next field initializer (build break: “expected ',' or '}'”). Add a comma
after the `struct dirent` initializer (and consider a trailing comma after the
last designated initializer for consistency).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]