From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=192.55.52.115; helo=mga14.intel.com; envelope-from=hao.a.wu@intel.com; receiver=edk2-devel@lists.01.org Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) (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 42AA3223972A7 for ; Thu, 8 Feb 2018 18:24:33 -0800 (PST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 08 Feb 2018 18:30:18 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.46,481,1511856000"; d="scan'208";a="172923174" Received: from fmsmsx103.amr.corp.intel.com ([10.18.124.201]) by orsmga004.jf.intel.com with ESMTP; 08 Feb 2018 18:30:18 -0800 Received: from shsmsx103.ccr.corp.intel.com (10.239.4.69) by FMSMSX103.amr.corp.intel.com (10.18.124.201) with Microsoft SMTP Server (TLS) id 14.3.319.2; Thu, 8 Feb 2018 18:30:18 -0800 Received: from shsmsx104.ccr.corp.intel.com ([169.254.5.125]) by SHSMSX103.ccr.corp.intel.com ([169.254.4.116]) with mapi id 14.03.0319.002; Fri, 9 Feb 2018 10:30:16 +0800 From: "Wu, Hao A" To: "Zeng, Star" , "edk2-devel@lists.01.org" CC: "Ni, Ruiyu" , "Zeng, Star" Thread-Topic: [edk2] [PATCH] SourceLevelDebugPkg DebugUsb3: Fix GCC build failures Thread-Index: AQHToLoUCO22FeKtl0ii6yE9f/RPw6ObWkog Date: Fri, 9 Feb 2018 02:30:16 +0000 Message-ID: References: <1518079900-4428-1-git-send-email-star.zeng@intel.com> In-Reply-To: <1518079900-4428-1-git-send-email-star.zeng@intel.com> Accept-Language: zh-CN, en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Subject: Re: [PATCH] SourceLevelDebugPkg DebugUsb3: Fix GCC build failures 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: , X-List-Received-Date: Fri, 09 Feb 2018 02:24:34 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: Hao Wu Best Regards, Hao Wu > -----Original Message----- > From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of St= ar > Zeng > Sent: Thursday, February 08, 2018 4:52 PM > To: edk2-devel@lists.01.org > Cc: Ni, Ruiyu; Wu, Hao A; Zeng, Star > Subject: [edk2] [PATCH] SourceLevelDebugPkg DebugUsb3: Fix GCC build > failures >=20 > Fix GCC build failures below. > variable 'EvtTrb' set but not used [-Werror=3Dunused-but-set-variable] > variable 'Index' set but not used [-Werror=3Dunused-but-set-variable] >=20 > The build failure could only be caught with -D SOURCE_DEBUG_USE_USB3 > build flag. >=20 > Cc: Ruiyu Ni > Cc: Hao Wu > Contributed-under: TianoCore Contribution Agreement 1.1 > Signed-off-by: Star Zeng > --- > .../DebugCommunicationLibUsb3/DebugCommunicationLibUsb3Common.c > | 2 -- > .../DebugCommunicationLibUsb3/DebugCommunicationLibUsb3Transfer.c | > 4 +--- > 2 files changed, 1 insertion(+), 5 deletions(-) >=20 > diff --git > a/SourceLevelDebugPkg/Library/DebugCommunicationLibUsb3/DebugCommun > icationLibUsb3Common.c > b/SourceLevelDebugPkg/Library/DebugCommunicationLibUsb3/DebugCommun > icationLibUsb3Common.c > index 87fb0265489b..c577df7dea97 100644 > --- > a/SourceLevelDebugPkg/Library/DebugCommunicationLibUsb3/DebugCommun > icationLibUsb3Common.c > +++ > b/SourceLevelDebugPkg/Library/DebugCommunicationLibUsb3/DebugCommun > icationLibUsb3Common.c > @@ -906,7 +906,6 @@ DebugPortWriteBuffer ( > USB3_DEBUG_PORT_HANDLE *UsbDebugPortHandle; > UINTN Sent; > UINTN Total; > - UINTN Index; >=20 > if (NumberOfBytes =3D=3D 0 || Buffer =3D=3D NULL) { > return 0; > @@ -934,7 +933,6 @@ DebugPortWriteBuffer ( > // > DebugPortPollBuffer (UsbDebugPortHandle); >=20 > - Index =3D 0; > while ((Total < NumberOfBytes)) { > if (NumberOfBytes - Total > > USB3_DEBUG_PORT_WRITE_MAX_PACKET_SIZE) { > Sent =3D USB3_DEBUG_PORT_WRITE_MAX_PACKET_SIZE; > diff --git > a/SourceLevelDebugPkg/Library/DebugCommunicationLibUsb3/DebugCommun > icationLibUsb3Transfer.c > b/SourceLevelDebugPkg/Library/DebugCommunicationLibUsb3/DebugCommun > icationLibUsb3Transfer.c > index dbff49362407..1b6645bd1c6d 100644 > --- > a/SourceLevelDebugPkg/Library/DebugCommunicationLibUsb3/DebugCommun > icationLibUsb3Transfer.c > +++ > b/SourceLevelDebugPkg/Library/DebugCommunicationLibUsb3/DebugCommun > icationLibUsb3Transfer.c > @@ -1,7 +1,7 @@ > /** @file > Debug Port Library implementation based on usb3 debug port. >=20 > - Copyright (c) 2014 - 2015, Intel Corporation. All rights reserved.
> + Copyright (c) 2014 - 2018, Intel Corporation. All rights reserved.
> This program and the accompanying materials > are licensed and made available under the terms and conditions of the = BSD > License > which accompanies this distribution. The full text of the license may= be found > at > @@ -145,11 +145,9 @@ XhcCheckNewEvent ( > ) > { > EFI_STATUS Status; > - TRB_TEMPLATE *EvtTrb; >=20 > ASSERT (EvtRing !=3D NULL); >=20 > - EvtTrb =3D (TRB_TEMPLATE *)(UINTN) EvtRing->EventRingDequeue; > *NewEvtTrb =3D (TRB_TEMPLATE *)(UINTN) EvtRing->EventRingDequeue; >=20 > if (EvtRing->EventRingDequeue =3D=3D EvtRing->EventRingEnqueue) { > -- > 2.7.0.windows.1 >=20 > _______________________________________________ > edk2-devel mailing list > edk2-devel@lists.01.org > https://lists.01.org/mailman/listinfo/edk2-devel