diff options
author | Hao Wu <hao.a.wu@intel.com> | 2017-03-06 10:39:34 +0800 |
---|---|---|
committer | Hao Wu <hao.a.wu@intel.com> | 2017-03-07 08:43:33 +0800 |
commit | 52757f69e9a67c27c6a5f8188c3f281dc6ac35e8 (patch) | |
tree | baea39f4dc979f6cd76154b6f6ac736868a21cac /BaseTools/Source/C | |
parent | 7be7b25d11a64d186060161ebc63f0ba63500a1d (diff) | |
download | edk2-platforms-52757f69e9a67c27c6a5f8188c3f281dc6ac35e8.tar.xz |
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>
Diffstat (limited to 'BaseTools/Source/C')
-rw-r--r-- | BaseTools/Source/C/GenVtf/GenVtf.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/BaseTools/Source/C/GenVtf/GenVtf.c b/BaseTools/Source/C/GenVtf/GenVtf.c index ff0e7cfb2c..2ae9a7be2c 100644 --- a/BaseTools/Source/C/GenVtf/GenVtf.c +++ b/BaseTools/Source/C/GenVtf/GenVtf.c @@ -2703,10 +2703,12 @@ Returns: }
SymFileName = VTF_SYM_FILE;
} else {
- assert (OutFileName1);
- INTN OutFileNameLen = strlen(OutFileName1);
+ INTN OutFileNameLen;
INTN NewIndex;
+ assert (OutFileName1);
+ OutFileNameLen = strlen(OutFileName1);
+
for (NewIndex = OutFileNameLen; NewIndex > 0; --NewIndex) {
if (OutFileName1[NewIndex] == '/' || OutFileName1[NewIndex] == '\\') {
break;
|