From nobody Sun Apr 28 08:06:14 2024 Delivered-To: importer@patchew.org Received-SPF: none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) client-ip=198.145.21.10; envelope-from=edk2-devel-bounces@lists.01.org; helo=ml01.01.org; Authentication-Results: mx.zoho.com; spf=none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) smtp.mailfrom=edk2-devel-bounces@lists.01.org; Return-Path: Received: from ml01.01.org (ml01.01.org [198.145.21.10]) by mx.zohomail.com with SMTPS id 148877705477573.56415982896351; Sun, 5 Mar 2017 21:10:54 -0800 (PST) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 903068030F; Sun, 5 Mar 2017 21:10:53 -0800 (PST) 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 92E328030F for ; Sun, 5 Mar 2017 21:10:52 -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:52 -0800 Received: from shwdeopenpsi014.ccr.corp.intel.com ([10.239.9.13]) by orsmga005.jf.intel.com with ESMTP; 05 Mar 2017 21:10:51 -0800 X-Original-To: edk2-devel@lists.01.org X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.35,251,1484035200"; d="scan'208";a="71987719" From: Hao Wu To: edk2-devel@lists.01.org Date: Mon, 6 Mar 2017 13:10:39 +0800 Message-Id: <20170306051041.25480-2-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: [edk2] [PATCH 1/3] BaseTools/GenFw: 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: , Cc: Hao Wu , Liming Gao MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" X-ZohoMail: RSF_4 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" https://bugzilla.tianocore.org/show_bug.cgi?id=3D417 The commit makes the following refinements in GenFw source codes to avoid VS2010/VS2012 build failure: 1. Replaces the uses of 'bool' with 'BOOLEAN' for accordance, and remove the header file dependency for ''. 2. Refines coding style for function 'GetSymName' 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 Reviewed-by: Yonghong Zhu =20 --- BaseTools/Source/C/GenFw/Elf32Convert.c | 17 ++++++++++------- BaseTools/Source/C/GenFw/Elf64Convert.c | 17 ++++++++++------- 2 files changed, 20 insertions(+), 14 deletions(-) diff --git a/BaseTools/Source/C/GenFw/Elf32Convert.c b/BaseTools/Source/C/G= enFw/Elf32Convert.c index f420bc89da..f7b084dc9b 100644 --- a/BaseTools/Source/C/GenFw/Elf32Convert.c +++ b/BaseTools/Source/C/GenFw/Elf32Convert.c @@ -1,7 +1,7 @@ /** @file Elf32 Convert solution =20 -Copyright (c) 2010 - 2016, Intel Corporation. All rights reserved.
+Copyright (c) 2010 - 2017, Intel Corporation. All rights reserved.
Portions copyright (c) 2013, ARM Ltd. All rights reserved.
=20 This program and the accompanying materials are licensed and made available @@ -21,7 +21,6 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER= EXPRESS OR IMPLIED. #include #endif #include -#include #include #include #include @@ -304,23 +303,27 @@ GetSymName ( Elf_Sym *Sym ) { + Elf_Shdr *StrtabShdr; + UINT8 *StrtabContents; + BOOLEAN foundEnd; + UINT32 i; + if (Sym->st_name =3D=3D 0) { return NULL; } =20 - Elf_Shdr *StrtabShdr =3D FindStrtabShdr(); + StrtabShdr =3D FindStrtabShdr(); if (StrtabShdr =3D=3D NULL) { return NULL; } =20 assert(Sym->st_name < StrtabShdr->sh_size); =20 - UINT8* StrtabContents =3D (UINT8*)mEhdr + StrtabShdr->sh_offset; + StrtabContents =3D (UINT8*)mEhdr + StrtabShdr->sh_offset; =20 - bool foundEnd =3D false; - UINT32 i; + foundEnd =3D FALSE; for (i =3D Sym->st_name; (i < StrtabShdr->sh_size) && !foundEnd; i++) { - foundEnd =3D StrtabContents[i] =3D=3D 0; + foundEnd =3D (BOOLEAN)(StrtabContents[i] =3D=3D 0); } assert(foundEnd); =20 diff --git a/BaseTools/Source/C/GenFw/Elf64Convert.c b/BaseTools/Source/C/G= enFw/Elf64Convert.c index acf021667e..7eed7b92d3 100644 --- a/BaseTools/Source/C/GenFw/Elf64Convert.c +++ b/BaseTools/Source/C/GenFw/Elf64Convert.c @@ -1,7 +1,7 @@ /** @file Elf64 convert solution =20 -Copyright (c) 2010 - 2016, Intel Corporation. All rights reserved.
+Copyright (c) 2010 - 2017, Intel Corporation. All rights reserved.
Portions copyright (c) 2013-2014, ARM Ltd. All rights reserved.
=20 This program and the accompanying materials are licensed and made available @@ -21,7 +21,6 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER= EXPRESS OR IMPLIED. #include #endif #include -#include #include #include #include @@ -296,23 +295,27 @@ GetSymName ( Elf_Sym *Sym ) { + Elf_Shdr *StrtabShdr; + UINT8 *StrtabContents; + BOOLEAN foundEnd; + UINT32 i; + if (Sym->st_name =3D=3D 0) { return NULL; } =20 - Elf_Shdr *StrtabShdr =3D FindStrtabShdr(); + StrtabShdr =3D FindStrtabShdr(); if (StrtabShdr =3D=3D NULL) { return NULL; } =20 assert(Sym->st_name < StrtabShdr->sh_size); =20 - UINT8* StrtabContents =3D (UINT8*)mEhdr + StrtabShdr->sh_offset; + StrtabContents =3D (UINT8*)mEhdr + StrtabShdr->sh_offset; =20 - bool foundEnd =3D false; - UINT32 i; + foundEnd =3D FALSE; for (i=3D Sym->st_name; (i < StrtabShdr->sh_size) && !foundEnd; i++) { - foundEnd =3D StrtabContents[i] =3D=3D 0; + foundEnd =3D (BOOLEAN)(StrtabContents[i] =3D=3D 0); } assert(foundEnd); =20 --=20 2.12.0.windows.1 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel From nobody Sun Apr 28 08:06:14 2024 Delivered-To: importer@patchew.org Received-SPF: none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) client-ip=198.145.21.10; envelope-from=edk2-devel-bounces@lists.01.org; helo=ml01.01.org; Authentication-Results: mx.zoho.com; spf=none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) smtp.mailfrom=edk2-devel-bounces@lists.01.org; Return-Path: Received: from ml01.01.org (ml01.01.org [198.145.21.10]) by mx.zohomail.com with SMTPS id 1488777056804680.6253059544783; Sun, 5 Mar 2017 21:10:56 -0800 (PST) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id C576080285; Sun, 5 Mar 2017 21:10:55 -0800 (PST) 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 8352480312 for ; Sun, 5 Mar 2017 21:10:54 -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:54 -0800 Received: from shwdeopenpsi014.ccr.corp.intel.com ([10.239.9.13]) by orsmga005.jf.intel.com with ESMTP; 05 Mar 2017 21:10:53 -0800 X-Original-To: edk2-devel@lists.01.org X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.35,251,1484035200"; d="scan'208";a="71987748" From: Hao Wu To: edk2-devel@lists.01.org Date: Mon, 6 Mar 2017 13:10:40 +0800 Message-Id: <20170306051041.25480-3-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: [edk2] [PATCH 2/3] BaseTools/GenVtf: 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: , Cc: Hao Wu , Liming Gao MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" X-ZohoMail: RSF_4 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" https://bugzilla.tianocore.org/show_bug.cgi?id=3D417 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'. Cc: Yonghong Zhu Cc: Liming Gao Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Hao Wu Reviewed-by: Yonghong Zhu =20 --- BaseTools/Source/C/GenVtf/GenVtf.c | 6 ++++-- 1 file 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 =3D VTF_SYM_FILE; } else { - assert (OutFileName1); - INTN OutFileNameLen =3D strlen(OutFileName1); + INTN OutFileNameLen; INTN NewIndex; =20 + assert (OutFileName1); + OutFileNameLen =3D strlen(OutFileName1); + for (NewIndex =3D OutFileNameLen; NewIndex > 0; --NewIndex) { if (OutFileName1[NewIndex] =3D=3D '/' || OutFileName1[NewIndex] =3D= =3D '\\') { break; --=20 2.12.0.windows.1 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel From nobody Sun Apr 28 08:06:14 2024 Delivered-To: importer@patchew.org Received-SPF: none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) client-ip=198.145.21.10; envelope-from=edk2-devel-bounces@lists.01.org; helo=ml01.01.org; Authentication-Results: mx.zoho.com; spf=none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) smtp.mailfrom=edk2-devel-bounces@lists.01.org; Return-Path: Received: from ml01.01.org (ml01.01.org [198.145.21.10]) by mx.zohomail.com with SMTPS id 1488777059068536.1486625642536; Sun, 5 Mar 2017 21:10:59 -0800 (PST) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 035CD802B1; Sun, 5 Mar 2017 21:10:58 -0800 (PST) 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 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 X-Original-To: edk2-devel@lists.01.org X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.35,251,1484035200"; d="scan'208";a="71987754" From: Hao Wu To: edk2-devel@lists.01.org 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: [edk2] [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: , Cc: Hao Wu , Liming Gao MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" X-ZohoMail: RSF_4 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" https://bugzilla.tianocore.org/show_bug.cgi?id=3D417 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 Reviewed-by: Yonghong Zhu =20 --- 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/VolI= nfo/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 =3D strlen(DefaultPath); strcpy(NewPath, DefaultPath); - UINT64 Index =3D 0; + Index =3D 0; for (; Index < DefaultPathLen; Index ++) { if (NewPath[Index] =3D=3D '\\' || NewPath[Index] =3D=3D '/') { if (NewPath[Index + 1] !=3D '\0') { --=20 2.12.0.windows.1 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel