xiaoxiang781216 commented on code in PR #3554:
URL: https://github.com/apache/nuttx-apps/pull/3554#discussion_r3447081158


##########
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:
   False positive — the trailing comma is already present. The `struct dirent` 
initializer closes with `},` on the line *before* the flagged 
`UFSTEST_INIT_FILEn_*` token (e.g. line 148: `      },`), so it parses 
correctly as the next field initializer. Verified the table compiles cleanly 
with `gcc -std=c99 -Wall -Wextra -Werror -pedantic`; no missing-comma build 
break.



##########
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:
   False positive — the trailing comma is already present. The `struct dirent` 
initializer closes with `},` on the line *before* the flagged 
`UFSTEST_INIT_FILEn_*` token (e.g. line 148: `      },`), so it parses 
correctly as the next field initializer. Verified the table compiles cleanly 
with `gcc -std=c99 -Wall -Wextra -Werror -pedantic`; no missing-comma build 
break.



##########
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:
   False positive — the trailing comma is already present. The `struct dirent` 
initializer closes with `},` on the line *before* the flagged 
`UFSTEST_INIT_FILEn_*` token (e.g. line 148: `      },`), so it parses 
correctly as the next field initializer. Verified the table compiles cleanly 
with `gcc -std=c99 -Wall -Wextra -Werror -pedantic`; no missing-comma build 
break.



-- 
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]

Reply via email to