> -----Original Message-----
> From: Gerd Hoffmann <kra...@redhat.com>
> Sent: Monday, December 20, 2021 10:33 PM
> To: devel@edk2.groups.io
> Cc: Wu, Hao A <hao.a...@intel.com>; Philippe Mathieu-Daudé
> <phi...@redhat.com>; Wang, Jian J <jian.j.w...@intel.com>; Pawel
> Polawski <ppola...@redhat.com>; Ni, Ray <ray...@intel.com>; Gao, Liming
> <gaolim...@byosoft.com.cn>; Gerd Hoffmann <kra...@redhat.com>
> Subject: [PATCH 1/1] UsbBusDxe: fix NOOPT build error


Reviewed-by: Hao A Wu <hao.a...@intel.com>
Will tweak the subject to "MdeModulePkg/UsbBusDxe: fix NOOPT build error" 
before merging. If concerns, please help to raise.

Best Regards,
Hao Wu


> 
> gcc-11 (fedora 35):
> 
> /home/kraxel/projects/edk2/MdeModulePkg/Bus/Usb/UsbBusDxe/UsbBus
> .c: In function ‘UsbIoBulkTransfer’:
> /home/kraxel/projects/edk2/MdeModulePkg/Bus/Usb/UsbBusDxe/UsbBus
> .c:277:12: error: ‘UsbHcBulkTransfer’ accessing 80 bytes in a region of size 
> 8 [-
> Werror=stringop-overflow=]
> 
> Signed-off-by: Gerd Hoffmann <kra...@redhat.com>
> ---
>  MdeModulePkg/Bus/Usb/UsbBusDxe/UsbUtility.h | 2 +-
> MdeModulePkg/Bus/Usb/UsbBusDxe/UsbUtility.c | 2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/MdeModulePkg/Bus/Usb/UsbBusDxe/UsbUtility.h
> b/MdeModulePkg/Bus/Usb/UsbBusDxe/UsbUtility.h
> index 04cf36d3c860..d93370a6c21e 100644
> --- a/MdeModulePkg/Bus/Usb/UsbBusDxe/UsbUtility.h
> +++ b/MdeModulePkg/Bus/Usb/UsbBusDxe/UsbUtility.h
> @@ -148,7 +148,7 @@ UsbHcBulkTransfer (
>    IN  UINT8                               DevSpeed,
>    IN  UINTN                               MaxPacket,
>    IN  UINT8                               BufferNum,
> -  IN  OUT VOID                            *Data[EFI_USB_MAX_BULK_BUFFER_NUM],
> +  IN  OUT VOID                            *Data[],
>    IN  OUT UINTN                           *DataLength,
>    IN  OUT UINT8                           *DataToggle,
>    IN  UINTN                               TimeOut,
> diff --git a/MdeModulePkg/Bus/Usb/UsbBusDxe/UsbUtility.c
> b/MdeModulePkg/Bus/Usb/UsbBusDxe/UsbUtility.c
> index 12d08c0b740f..740e7babb0ca 100644
> --- a/MdeModulePkg/Bus/Usb/UsbBusDxe/UsbUtility.c
> +++ b/MdeModulePkg/Bus/Usb/UsbBusDxe/UsbUtility.c
> @@ -267,7 +267,7 @@ UsbHcBulkTransfer (
>    IN  UINT8                               DevSpeed,
>    IN  UINTN                               MaxPacket,
>    IN  UINT8                               BufferNum,
> -  IN  OUT VOID                            *Data[EFI_USB_MAX_BULK_BUFFER_NUM],
> +  IN  OUT VOID                            *Data[],
>    IN  OUT UINTN                           *DataLength,
>    IN  OUT UINT8                           *DataToggle,
>    IN  UINTN                               TimeOut,
> --
> 2.33.1



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#85129): https://edk2.groups.io/g/devel/message/85129
Mute This Topic: https://groups.io/mt/87857128/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-


Reply via email to