From nobody Mon Dec 23 10:39:37 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.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 15175388719141016.8805435776351; Thu, 1 Feb 2018 18:34:31 -0800 (PST) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 8583B22393624; Thu, 1 Feb 2018 18:28:52 -0800 (PST) Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) (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 E1F0821E0BA0F for ; Thu, 1 Feb 2018 18:28:50 -0800 (PST) Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 01 Feb 2018 18:34:27 -0800 Received: from fmsmsx108.amr.corp.intel.com ([10.18.124.206]) by fmsmga008.fm.intel.com with ESMTP; 01 Feb 2018 18:34:27 -0800 Received: from fmsmsx102.amr.corp.intel.com (10.18.124.200) by FMSMSX108.amr.corp.intel.com (10.18.124.206) with Microsoft SMTP Server (TLS) id 14.3.319.2; Thu, 1 Feb 2018 18:34:27 -0800 Received: from shsmsx101.ccr.corp.intel.com (10.239.4.153) by FMSMSX102.amr.corp.intel.com (10.18.124.200) with Microsoft SMTP Server (TLS) id 14.3.319.2; Thu, 1 Feb 2018 18:34:26 -0800 Received: from shsmsx102.ccr.corp.intel.com ([169.254.2.124]) by SHSMSX101.ccr.corp.intel.com ([169.254.1.192]) with mapi id 14.03.0319.002; Fri, 2 Feb 2018 10:34:25 +0800 X-Original-To: edk2-devel@lists.01.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; Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=192.55.52.120; helo=mga04.intel.com; envelope-from=yunhuax.feng@intel.com; receiver=edk2-devel@lists.01.org X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.46,445,1511856000"; d="dat'59?scan'59,208,59";a="14860496" From: "Feng, YunhuaX" To: "edk2-devel@lists.01.org" Thread-Topic: [PATCH] BaseTools: Fix GCC build PcdValueCommon.c bug Thread-Index: AdObzkv61v3wvWlxS5eqDR6Jgg9Hpg== Date: Fri, 2 Feb 2018 02:34:24 +0000 Message-ID: <47C64442C08CCD4089DC43B6B5E46BC4822904@shsmsx102.ccr.corp.intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: <47C64442C08CCD4089DC43B6B5E46BC4822904@shsmsx102.ccr.corp.intel.com> x-originating-ip: [10.239.127.40] MIME-Version: 1.0 X-Content-Filtered-By: Mailman/MimeDel 2.1.23 Subject: [edk2] [PATCH] BaseTools: Fix GCC build PcdValueCommon.c bug X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: "Gao, Liming" 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" error message: PcdValueCommon.c: In function '__PcdGetPtr': PcdValueCommon.c:315:11: error: variable 'Byte'=20 set but not used [-Werror=3Dunused-but-set-variable] UINT8 Byte; ^ cc1: all warnings being treated as errors Cc: Liming Gao Cc: Yonghong Zhu Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Yunhua Feng Reviewed-by: Yonghong Zhu =20 --- BaseTools/Source/C/Common/PcdValueCommon.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/BaseTools/Source/C/Common/PcdValueCommon.c b/BaseTools/Source/= C/Common/PcdValueCommon.c index 210f87b8b5..fa12869eda 100644 --- a/BaseTools/Source/C/Common/PcdValueCommon.c +++ b/BaseTools/Source/C/Common/PcdValueCommon.c @@ -310,11 +310,10 @@ Returns: { int Index; CHAR8 *Value; UINT8 *Buffer; CHAR8 *End; - UINT8 Byte; =20 Index =3D LookupPcdIndex (SkuName, DefaultValueName, TokenSpaceGuidName,= TokenName); if (Index < 0) { fprintf (stderr, "PCD %s.%s.%s.%s is not in database\n", SkuName, Defa= ultValueName, TokenSpaceGuidName, TokenName); exit (EXIT_FAILURE); @@ -328,11 +327,11 @@ Returns: fprintf (stderr, "PCD %s.%s.%s.%s is a value. Use PcdGet()\n", SkuNam= e, DefaultValueName, TokenSpaceGuidName, TokenName); exit (EXIT_FAILURE); break; case PcdDataTypePointer: Value =3D &PcdList[Index].Value[1]; - for (*Size =3D 0, Byte =3D (UINT8) strtoul(Value, &End, 16); Value != =3D End; Byte =3D (UINT8) strtoul(Value, &End, 16), *Size =3D *Size + 1) { + for (*Size =3D 0, strtoul(Value, &End, 16); Value !=3D End; strtoul(Va= lue, &End, 16), *Size =3D *Size + 1) { Value =3D End + 1; } Buffer =3D malloc(*Size + 1); if (Buffer =3D=3D NULL) { *Size =3D 0; --=20 2.12.2.windows.2 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel