MdeModulePkg CapsuleApp: Fix VS2012 build failure caused by 5410502
authorStar Zeng <star.zeng@intel.com>
Tue, 24 Jul 2018 09:02:47 +0000 (17:02 +0800)
committerStar Zeng <star.zeng@intel.com>
Fri, 27 Jul 2018 08:04:13 +0000 (16:04 +0800)
The build failure is like below.
xxx\CapsuleApp.c(868) : error C2275: 'EFI_GUID' :
  illegal use of this type as an expression
        xxx/UefiBaseType.h(29) : see declaration of 'EFI_GUID'
xxx\CapsuleApp.c(868) : error C2146: syntax error :
  missing ';' before identifier 'ImageTypeId'
xxx\CapsuleApp.c(868) : error C2065: 'ImageTypeId' : undeclared identifier
xxx\CapsuleApp.c(869) : error C2275: 'UINTN' :
  illegal use of this type as an expression
        xxx\ProcessorBind.h(224) : see declaration of 'UINTN'
xxx\CapsuleApp.c(869) : error C2146: syntax error :
  missing ';' before identifier 'ImageIndex'
xxx\CapsuleApp.c(869) : error C2065: 'ImageIndex' : undeclared identifier

Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Dandan Bi <dandan.bi@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
Reviewed-by: Dandan Bi <dandan.bi@intel.com>
MdeModulePkg/Application/CapsuleApp/CapsuleApp.c

index df5de91..95aa207 100644 (file)
@@ -809,14 +809,16 @@ UefiMain (
   UINTN                         FileSize[MAX_CAPSULE_NUM];\r
   VOID                          *CapsuleBuffer[MAX_CAPSULE_NUM];\r
   EFI_CAPSULE_BLOCK_DESCRIPTOR  *BlockDescriptors;\r
-  EFI_CAPSULE_HEADER             *CapsuleHeaderArray[MAX_CAPSULE_NUM + 1];\r
-  UINT64                         MaxCapsuleSize;\r
-  EFI_RESET_TYPE                 ResetType;\r
-  BOOLEAN                        NeedReset;\r
-  BOOLEAN                        NoReset;\r
-  CHAR16                         *CapsuleName;\r
-  UINTN                          CapsuleNum;\r
-  UINTN                          Index;\r
+  EFI_CAPSULE_HEADER            *CapsuleHeaderArray[MAX_CAPSULE_NUM + 1];\r
+  UINT64                        MaxCapsuleSize;\r
+  EFI_RESET_TYPE                ResetType;\r
+  BOOLEAN                       NeedReset;\r
+  BOOLEAN                       NoReset;\r
+  CHAR16                        *CapsuleName;\r
+  UINTN                         CapsuleNum;\r
+  UINTN                         Index;\r
+  EFI_GUID                      ImageTypeId;\r
+  UINTN                         ImageIndex;\r
 \r
   Status = GetArg();\r
   if (EFI_ERROR(Status)) {\r
@@ -865,8 +867,6 @@ UefiMain (
           return EFI_UNSUPPORTED;\r
         }\r
 \r
-        EFI_GUID  ImageTypeId;\r
-        UINTN     ImageIndex;\r
         //\r
         // FMP->GetImage()\r
         //\r