]> git.proxmox.com Git - mirror_edk2.git/commitdiff
BaseTools/VolInfo: Fix VS2010/VS2012 build failure
authorHao Wu <hao.a.wu@intel.com>
Mon, 6 Mar 2017 02:41:53 +0000 (10:41 +0800)
committerHao Wu <hao.a.wu@intel.com>
Tue, 7 Mar 2017 00:43:38 +0000 (08:43 +0800)
https://bugzilla.tianocore.org/show_bug.cgi?id=417

The commit makes the following refinements in VolInfo source codes to
avoid VS2010/VS2012 build failure:

1. Refines coding style for function 'CombinePath' to declare local
variables at the beginning of the function block.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Hao Wu <hao.a.wu@intel.com>
Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
BaseTools/Source/C/VolInfo/VolInfo.c

index 2647cbb73a176c04b605f52ab661df272fa29438..eff5f9ebfc436faf417b6cedd6b0293be2237dcc 100644 (file)
@@ -1590,9 +1590,11 @@ CombinePath (
 )\r
 {\r
   UINT32 DefaultPathLen;\r
 )\r
 {\r
   UINT32 DefaultPathLen;\r
+  UINT64 Index;\r
+\r
   DefaultPathLen = strlen(DefaultPath);\r
   strcpy(NewPath, DefaultPath);\r
   DefaultPathLen = strlen(DefaultPath);\r
   strcpy(NewPath, DefaultPath);\r
-  UINT64 Index = 0;\r
+  Index = 0;\r
   for (; Index < DefaultPathLen; Index ++) {\r
     if (NewPath[Index] == '\\' || NewPath[Index] == '/') {\r
       if (NewPath[Index + 1] != '\0') {\r
   for (; Index < DefaultPathLen; Index ++) {\r
     if (NewPath[Index] == '\\' || NewPath[Index] == '/') {\r
       if (NewPath[Index + 1] != '\0') {\r