summaryrefslogtreecommitdiff
path: root/BaseTools/Source/C
diff options
context:
space:
mode:
authorHao Wu <hao.a.wu@intel.com>2017-03-06 10:41:53 +0800
committerHao Wu <hao.a.wu@intel.com>2017-03-07 08:43:38 +0800
commit8994d2f95cc77a09a37e87ad6e4e4858615c3b9e (patch)
tree9325f73509bf2c9d769f95cb1110f57753f3e62b /BaseTools/Source/C
parent52757f69e9a67c27c6a5f8188c3f281dc6ac35e8 (diff)
downloadedk2-platforms-8994d2f95cc77a09a37e87ad6e4e4858615c3b9e.tar.xz
BaseTools/VolInfo: Fix VS2010/VS2012 build failure
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>
Diffstat (limited to 'BaseTools/Source/C')
-rw-r--r--BaseTools/Source/C/VolInfo/VolInfo.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/BaseTools/Source/C/VolInfo/VolInfo.c b/BaseTools/Source/C/VolInfo/VolInfo.c
index 2647cbb73a..eff5f9ebfc 100644
--- a/BaseTools/Source/C/VolInfo/VolInfo.c
+++ b/BaseTools/Source/C/VolInfo/VolInfo.c
@@ -1590,9 +1590,11 @@ CombinePath (
)
{
UINT32 DefaultPathLen;
+ UINT64 Index;
+
DefaultPathLen = strlen(DefaultPath);
strcpy(NewPath, DefaultPath);
- UINT64 Index = 0;
+ Index = 0;
for (; Index < DefaultPathLen; Index ++) {
if (NewPath[Index] == '\\' || NewPath[Index] == '/') {
if (NewPath[Index + 1] != '\0') {