[Yaffs] [PATCH YAFFS2 11/15] sparse-fix--use-C99-struct-init…

Top Page
Attachments:
Message as email
+ (text/plain)
+ 11-sparse-fix--use-C99-struct-initializer.diff (text/plain)
Delete this message
Reply to this message
Author: Luc Van Oostenryck
Date:  
To: yaffs
Old-Topics: [Yaffs] [PATCH YAFFS2 0/15] Pending patches.
Subject: [Yaffs] [PATCH YAFFS2 11/15] sparse-fix--use-C99-struct-initializer
Use C99 syntax for labelled struct initializer.




-- Luc Van Oostenryck
diff --git a/fs/yaffs2/mtdemul/nandemul2k.c b/fs/yaffs2/mtdemul/nandemul2k.c
--- a/fs/yaffs2/mtdemul/nandemul2k.c
+++ b/fs/yaffs2/mtdemul/nandemul2k.c
@@ -650,9 +650,9 @@ __setup("sizeInMB=",sizeInMB);

 static struct mtd_partition nandemul2k_partition[] =
 {
-    { name: "NANDemul partition 1",
-      offset:  0,
-      size: 0 },
+    { .name        = "NANDemul partition 1",
+      .offset    = 0,
+      .size        = 0 },
 };


static int nPartitions = sizeof(nandemul2k_partition)/sizeof(nandemul2k_partition[0]);
diff --git a/fs/yaffs2/yaffs_mtdif.c b/fs/yaffs2/yaffs_mtdif.c
--- a/fs/yaffs2/yaffs_mtdif.c
+++ b/fs/yaffs2/yaffs_mtdif.c
@@ -29,12 +29,12 @@ const char *yaffs_mtdif_c_version = "$Id
#endif

 struct nand_oobinfo yaffs_oobinfo = {
-    useecc: 1,
-    eccpos: {8, 9, 10, 13, 14, 15}
+    .useecc = 1,
+    .eccpos = {8, 9, 10, 13, 14, 15}
 };


 struct nand_oobinfo yaffs_noeccinfo = {
-    useecc: 0,
+    .useecc = 0,
 };