Resolve the warning msg from generated FlashMap.h file when use GCC compiler.
authorwuyizhong <wuyizhong@6f19259b-4bc3-4df7-8a09-765794883524>
Mon, 16 Oct 2006 10:47:36 +0000 (10:47 +0000)
committerwuyizhong <wuyizhong@6f19259b-4bc3-4df7-8a09-765794883524>
Mon, 16 Oct 2006 10:47:36 +0000 (10:47 +0000)
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@1765 6f19259b-4bc3-4df7-8a09-765794883524

Tools/CCode/Source/FlashMap/FlashDefFile.c

index cdbf788..0bfdad2 100644 (file)
@@ -1813,9 +1813,9 @@ Returns:
             fprintf (OutFptr, " \\\n");\r
             fprintf (OutFptr, "  /* %s.%s Subregion */\\\n", FBlock->Name, Subregion->Name);\r
             fprintf (OutFptr, "  {\\\n");\r
-            fprintf (OutFptr, "    EFI_HOB_TYPE_GUID_EXTENSION,\\\n");\r
+            fprintf (OutFptr, "    {EFI_HOB_TYPE_GUID_EXTENSION,\\\n");\r
             fprintf (OutFptr, "    sizeof (EFI_HOB_FLASH_MAP_ENTRY_TYPE ),\\\n");\r
-            fprintf (OutFptr, "    0,\\\n");\r
+            fprintf (OutFptr, "    0},\\\n");\r
             //\r
             // The NameGuid may have been specified in the input flash definition file as a GUID, or\r
             // as a quoted string. Do the right one.\r
@@ -1825,7 +1825,7 @@ Returns:
             } else {\r
               fprintf (\r
                 OutFptr,\r
-                "    { 0x%08X, 0x%04X, 0x%04X, 0x%02X, 0x%02X, 0x%02X, 0x%02X, 0x%02X, 0x%02X, 0x%02X, 0x%02X },\\\n",\r
+                "    { 0x%08X, 0x%04X, 0x%04X, {0x%02X, 0x%02X, 0x%02X, 0x%02X, 0x%02X, 0x%02X, 0x%02X, 0x%02X}},\\\n",\r
                 Subregion->NameGuid.Data1,\r
                 (unsigned int) Subregion->NameGuid.Data2,\r
                 (unsigned int) Subregion->NameGuid.Data3,\r
@@ -1840,7 +1840,7 @@ Returns:
                 );\r
             }\r
 \r
-            fprintf (OutFptr, "    0, 0, 0,\\\n");\r
+            fprintf (OutFptr, "    {0, 0, 0},\\\n");\r
             fprintf (OutFptr, "    %s,\\\n", Subregion->AreaType);\r
             //\r
             // The AreaTypeGuid may have been specified in the input flash definition file as a GUID, or\r
@@ -1851,7 +1851,7 @@ Returns:
             } else {\r
               fprintf (\r
                 OutFptr,\r
-                "    { 0x%08X, 0x%04X, 0x%04X, 0x%02X, 0x%02X, 0x%02X, 0x%02X, 0x%02X, 0x%02X, 0x%02X, 0x%02X },\\\n",\r
+                "    { 0x%08X, 0x%04X, 0x%04X, {0x%02X, 0x%02X, 0x%02X, 0x%02X, 0x%02X, 0x%02X, 0x%02X, 0x%02X}},\\\n",\r
                 Subregion->AreaTypeGuid.Data1,\r
                 (unsigned int) Subregion->AreaTypeGuid.Data2,\r
                 (unsigned int) Subregion->AreaTypeGuid.Data3,\r
@@ -1867,7 +1867,7 @@ Returns:
             }\r
 \r
             fprintf (OutFptr, "    1,\\\n");\r
-            fprintf (OutFptr, "    {\\\n");\r
+            fprintf (OutFptr, "    {{\\\n");\r
             fprintf (OutFptr, "      %s,\\\n", Subregion->Attributes);\r
             fprintf (OutFptr, "      0,\\\n");\r
             fprintf (OutFptr, "      FLASH_REGION_%s_SUBREGION_%s_BASE,\\\n", FBlock->Name, Subregion->Name);\r
@@ -1881,7 +1881,7 @@ Returns:
             } else {\r
               fprintf (\r
                 OutFptr,\r
-                "      { 0x%08X, 0x%04X, 0x%04X, 0x%02X, 0x%02X, 0x%02X, 0x%02X, 0x%02X, 0x%02X, 0x%02X, 0x%02X },\\\n",\r
+                "      { 0x%08X, 0x%04X, 0x%04X, {0x%02X, 0x%02X, 0x%02X, 0x%02X, 0x%02X, 0x%02X, 0x%02X, 0x%02X}},\\\n",\r
                 Subregion->FileSystemGuid.Data1,\r
                 (unsigned int) Subregion->FileSystemGuid.Data2,\r
                 (unsigned int) Subregion->FileSystemGuid.Data3,\r
@@ -1896,7 +1896,7 @@ Returns:
                 );\r
             }\r
 \r
-            fprintf (OutFptr, "    },\\\n");\r
+            fprintf (OutFptr, "    }},\\\n");\r
             fprintf (OutFptr, "  },");\r
           }\r
         }\r