From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 1CE4C802B1 for ; Sun, 5 Mar 2017 21:10:56 -0800 (PST) Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 05 Mar 2017 21:10:55 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.35,251,1484035200"; d="scan'208";a="71987754" Received: from shwdeopenpsi014.ccr.corp.intel.com ([10.239.9.13]) by orsmga005.jf.intel.com with ESMTP; 05 Mar 2017 21:10:54 -0800 From: Hao Wu To: edk2-devel@lists.01.org Cc: Hao Wu , Yonghong Zhu , Liming Gao Date: Mon, 6 Mar 2017 13:10:41 +0800 Message-Id: <20170306051041.25480-4-hao.a.wu@intel.com> X-Mailer: git-send-email 2.12.0.windows.1 In-Reply-To: <20170306051041.25480-1-hao.a.wu@intel.com> References: <20170306051041.25480-1-hao.a.wu@intel.com> Subject: [PATCH 3/3] BaseTools/VolInfo: Fix VS2010/VS2012 build failure X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 Mar 2017 05:10:56 -0000 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. Cc: Yonghong Zhu Cc: Liming Gao Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Hao Wu --- 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.12.0.windows.1