BaseTools/GenVtf: Fix VS2010/VS2012 build failure

https://bugzilla.tianocore.org/show_bug.cgi?id=417

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

1. Refines coding style to declare local variables at the beginning of a
code block in function 'main'.

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>
This commit is contained in:
Hao Wu 2017-03-06 10:39:34 +08:00
parent 7be7b25d11
commit 52757f69e9
1 changed files with 4 additions and 2 deletions

View File

@ -2703,10 +2703,12 @@ Returns:
} }
SymFileName = VTF_SYM_FILE; SymFileName = VTF_SYM_FILE;
} else { } else {
assert (OutFileName1); INTN OutFileNameLen;
INTN OutFileNameLen = strlen(OutFileName1);
INTN NewIndex; INTN NewIndex;
assert (OutFileName1);
OutFileNameLen = strlen(OutFileName1);
for (NewIndex = OutFileNameLen; NewIndex > 0; --NewIndex) { for (NewIndex = OutFileNameLen; NewIndex > 0; --NewIndex) {
if (OutFileName1[NewIndex] == '/' || OutFileName1[NewIndex] == '\\') { if (OutFileName1[NewIndex] == '/' || OutFileName1[NewIndex] == '\\') {
break; break;