From 8994d2f95cc77a09a37e87ad6e4e4858615c3b9e Mon Sep 17 00:00:00 2001 From: Hao Wu Date: Mon, 6 Mar 2017 10:41:53 +0800 Subject: [PATCH] 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 Reviewed-by: Yonghong Zhu --- BaseTools/Source/C/VolInfo/VolInfo.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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') { -- 2.39.2