Fix GCC build failures below.
variable 'EvtTrb' set but not used [-Werror=unused-but-set-variable]
variable 'Index' set but not used [-Werror=unused-but-set-variable]
The build failure could only be caught with -D SOURCE_DEBUG_USE_USB3
build flag.
Cc: Ruiyu Ni <ruiyu.ni@intel.com>
Cc: Hao Wu <hao.a.wu@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: Hao Wu <hao.a.wu@intel.com>
USB3_DEBUG_PORT_HANDLE *UsbDebugPortHandle;\r
UINTN Sent;\r
UINTN Total;\r
USB3_DEBUG_PORT_HANDLE *UsbDebugPortHandle;\r
UINTN Sent;\r
UINTN Total;\r
\r
if (NumberOfBytes == 0 || Buffer == NULL) {\r
return 0;\r
\r
if (NumberOfBytes == 0 || Buffer == NULL) {\r
return 0;\r
//\r
DebugPortPollBuffer (UsbDebugPortHandle);\r
\r
//\r
DebugPortPollBuffer (UsbDebugPortHandle);\r
\r
while ((Total < NumberOfBytes)) {\r
if (NumberOfBytes - Total > USB3_DEBUG_PORT_WRITE_MAX_PACKET_SIZE) {\r
Sent = USB3_DEBUG_PORT_WRITE_MAX_PACKET_SIZE;\r
while ((Total < NumberOfBytes)) {\r
if (NumberOfBytes - Total > USB3_DEBUG_PORT_WRITE_MAX_PACKET_SIZE) {\r
Sent = USB3_DEBUG_PORT_WRITE_MAX_PACKET_SIZE;\r
/** @file\r
Debug Port Library implementation based on usb3 debug port.\r
\r
/** @file\r
Debug Port Library implementation based on usb3 debug port.\r
\r
- Copyright (c) 2014 - 2015, Intel Corporation. All rights reserved.<BR>\r
+ Copyright (c) 2014 - 2018, Intel Corporation. All rights reserved.<BR>\r
This program and the accompanying materials\r
are licensed and made available under the terms and conditions of the BSD License\r
which accompanies this distribution. The full text of the license may be found at\r
This program and the accompanying materials\r
are licensed and made available under the terms and conditions of the BSD License\r
which accompanies this distribution. The full text of the license may be found at\r
)\r
{\r
EFI_STATUS Status;\r
)\r
{\r
EFI_STATUS Status;\r
- TRB_TEMPLATE *EvtTrb;\r
\r
ASSERT (EvtRing != NULL);\r
\r
\r
ASSERT (EvtRing != NULL);\r
\r
- EvtTrb = (TRB_TEMPLATE *)(UINTN) EvtRing->EventRingDequeue;\r
*NewEvtTrb = (TRB_TEMPLATE *)(UINTN) EvtRing->EventRingDequeue;\r
\r
if (EvtRing->EventRingDequeue == EvtRing->EventRingEnqueue) {\r
*NewEvtTrb = (TRB_TEMPLATE *)(UINTN) EvtRing->EventRingDequeue;\r
\r
if (EvtRing->EventRingDequeue == EvtRing->EventRingEnqueue) {\r