* [PATCH EDK2 v1 0/1] EmbeddedPkg:Fix compiler warning
@ 2021-10-12 8:16 wenyi,xie
2021-10-12 8:16 ` [PATCH EDK2 v1 1/1] " wenyi,xie
0 siblings, 1 reply; 3+ messages in thread
From: wenyi,xie @ 2021-10-12 8:16 UTC (permalink / raw)
To: devel, leif, ardb+tianocore, abner.chang, daniel.schaefer
Cc: songdongkuang, xiewenyi2
Main Changes :
1.Changing definition of gTimeOut from UINTN to UINT32
2.Changing definition of CompressedDataLength from UINTN to UINT32
Wenyi Xie (1):
EmbeddedPkg:Fix compiler warning
EmbeddedPkg/Library/GdbSerialDebugPortLib/GdbSerialDebugPortLib.c | 2 +-
EmbeddedPkg/Library/PrePiLib/FwVol.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
--
2.20.1.windows.1
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH EDK2 v1 1/1] EmbeddedPkg:Fix compiler warning
2021-10-12 8:16 [PATCH EDK2 v1 0/1] EmbeddedPkg:Fix compiler warning wenyi,xie
@ 2021-10-12 8:16 ` wenyi,xie
2021-10-13 2:05 ` [edk2-devel] " Abner Chang
0 siblings, 1 reply; 3+ messages in thread
From: wenyi,xie @ 2021-10-12 8:16 UTC (permalink / raw)
To: devel, leif, ardb+tianocore, abner.chang, daniel.schaefer
Cc: songdongkuang, xiewenyi2
Fixes the following compiler warning in VS2019.
edk2\EmbeddedPkg\Library\GdbSerialDebugPortLib\GdbSerialDebugPortLib.c(127):
error C2220: the following warning is treated as an error
edk2\EmbeddedPkg\Library\GdbSerialDebugPortLib\GdbSerialDebugPortLib.c(127):
warning C4244: 'function': conversion from 'UINTN' to 'UINT32', possible
loss of data
edk2\EmbeddedPkg\Library\PrePiLib\FwVol.c(347): error C2220: the following
warning is treated as an error
edk2\EmbeddedPkg\Library\PrePiLib\FwVol.c(347): warning C4244: 'function':
conversion from 'UINTN' to 'UINT32', possible loss of data
Cc: Leif Lindholm <leif@nuviainc.com>
Cc: Ard Biesheuvel <ardb+tianocore@kernel.org>
Cc: Abner Chang <abner.chang@hpe.com>
Cc: Daniel Schaefer <daniel.schaefer@hpe.com>
Signed-off-by: Wenyi Xie <xiewenyi2@huawei.com>
---
EmbeddedPkg/Library/GdbSerialDebugPortLib/GdbSerialDebugPortLib.c | 2 +-
EmbeddedPkg/Library/PrePiLib/FwVol.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/EmbeddedPkg/Library/GdbSerialDebugPortLib/GdbSerialDebugPortLib.c b/EmbeddedPkg/Library/GdbSerialDebugPortLib/GdbSerialDebugPortLib.c
index d2bafcf69b60..0f50a8b64191 100644
--- a/EmbeddedPkg/Library/GdbSerialDebugPortLib/GdbSerialDebugPortLib.c
+++ b/EmbeddedPkg/Library/GdbSerialDebugPortLib/GdbSerialDebugPortLib.c
@@ -18,7 +18,7 @@
EFI_DEBUGPORT_PROTOCOL *gDebugPort = NULL;
-UINTN gTimeOut = 0;
+UINT32 gTimeOut = 0;
/**
The constructor function initializes the UART.
diff --git a/EmbeddedPkg/Library/PrePiLib/FwVol.c b/EmbeddedPkg/Library/PrePiLib/FwVol.c
index 881506edddaf..46ea5f733f60 100644
--- a/EmbeddedPkg/Library/PrePiLib/FwVol.c
+++ b/EmbeddedPkg/Library/PrePiLib/FwVol.c
@@ -298,7 +298,7 @@ FfsProcessSection (
UINT16 SectionAttribute;
UINT32 AuthenticationStatus;
CHAR8 *CompressedData;
- UINTN CompressedDataLength;
+ UINT32 CompressedDataLength;
*OutputBuffer = NULL;
--
2.20.1.windows.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [edk2-devel] [PATCH EDK2 v1 1/1] EmbeddedPkg:Fix compiler warning
2021-10-12 8:16 ` [PATCH EDK2 v1 1/1] " wenyi,xie
@ 2021-10-13 2:05 ` Abner Chang
0 siblings, 0 replies; 3+ messages in thread
From: Abner Chang @ 2021-10-13 2:05 UTC (permalink / raw)
To: devel@edk2.groups.io, xiewenyi2@huawei.com, leif@nuviainc.com,
ardb+tianocore@kernel.org, Schaefer, Daniel
Cc: songdongkuang@huawei.com
Acked-by: Abner Chang <abner.chang@hpe.com>
> -----Original Message-----
> From: devel@edk2.groups.io [mailto:devel@edk2.groups.io] On Behalf Of
> wenyi,xie via groups.io
> Sent: Tuesday, October 12, 2021 4:16 PM
> To: devel@edk2.groups.io; leif@nuviainc.com; ardb+tianocore@kernel.org;
> Chang, Abner (HPS SW/FW Technologist) <abner.chang@hpe.com>;
> Schaefer, Daniel <daniel.schaefer@hpe.com>
> Cc: songdongkuang@huawei.com; xiewenyi2@huawei.com
> Subject: [edk2-devel] [PATCH EDK2 v1 1/1] EmbeddedPkg:Fix compiler
> warning
>
> Fixes the following compiler warning in VS2019.
>
> edk2\EmbeddedPkg\Library\GdbSerialDebugPortLib\GdbSerialDebugPortLib
> .c(127):
> error C2220: the following warning is treated as an error
> edk2\EmbeddedPkg\Library\GdbSerialDebugPortLib\GdbSerialDebugPortLib
> .c(127):
> warning C4244: 'function': conversion from 'UINTN' to 'UINT32', possible
> loss of data
>
> edk2\EmbeddedPkg\Library\PrePiLib\FwVol.c(347): error C2220: the
> following
> warning is treated as an error
> edk2\EmbeddedPkg\Library\PrePiLib\FwVol.c(347): warning C4244:
> 'function':
> conversion from 'UINTN' to 'UINT32', possible loss of data
>
> Cc: Leif Lindholm <leif@nuviainc.com>
> Cc: Ard Biesheuvel <ardb+tianocore@kernel.org>
> Cc: Abner Chang <abner.chang@hpe.com>
> Cc: Daniel Schaefer <daniel.schaefer@hpe.com>
> Signed-off-by: Wenyi Xie <xiewenyi2@huawei.com>
> ---
> EmbeddedPkg/Library/GdbSerialDebugPortLib/GdbSerialDebugPortLib.c | 2
> +-
> EmbeddedPkg/Library/PrePiLib/FwVol.c | 2 +-
> 2 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git
> a/EmbeddedPkg/Library/GdbSerialDebugPortLib/GdbSerialDebugPortLib.c
> b/EmbeddedPkg/Library/GdbSerialDebugPortLib/GdbSerialDebugPortLib.c
> index d2bafcf69b60..0f50a8b64191 100644
> ---
> a/EmbeddedPkg/Library/GdbSerialDebugPortLib/GdbSerialDebugPortLib.c
> +++
> b/EmbeddedPkg/Library/GdbSerialDebugPortLib/GdbSerialDebugPortLib.c
> @@ -18,7 +18,7 @@
>
>
> EFI_DEBUGPORT_PROTOCOL *gDebugPort = NULL;
> -UINTN gTimeOut = 0;
> +UINT32 gTimeOut = 0;
>
> /**
> The constructor function initializes the UART.
> diff --git a/EmbeddedPkg/Library/PrePiLib/FwVol.c
> b/EmbeddedPkg/Library/PrePiLib/FwVol.c
> index 881506edddaf..46ea5f733f60 100644
> --- a/EmbeddedPkg/Library/PrePiLib/FwVol.c
> +++ b/EmbeddedPkg/Library/PrePiLib/FwVol.c
> @@ -298,7 +298,7 @@ FfsProcessSection (
> UINT16 SectionAttribute;
> UINT32 AuthenticationStatus;
> CHAR8 *CompressedData;
> - UINTN CompressedDataLength;
> + UINT32 CompressedDataLength;
>
>
> *OutputBuffer = NULL;
> --
> 2.20.1.windows.1
>
>
>
>
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-10-13 2:05 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-10-12 8:16 [PATCH EDK2 v1 0/1] EmbeddedPkg:Fix compiler warning wenyi,xie
2021-10-12 8:16 ` [PATCH EDK2 v1 1/1] " wenyi,xie
2021-10-13 2:05 ` [edk2-devel] " Abner Chang
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox