From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from szxga08-in.huawei.com (szxga08-in.huawei.com [45.249.212.255]) by mx.groups.io with SMTP id smtpd.web09.10727.1634026582622821508 for ; Tue, 12 Oct 2021 01:16:22 -0700 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: huawei.com, ip: 45.249.212.255, mailfrom: xiewenyi2@huawei.com) Received: from dggemv711-chm.china.huawei.com (unknown [172.30.72.54]) by szxga08-in.huawei.com (SkyGuard) with ESMTP id 4HT7kD0tvGz1DHNs; Tue, 12 Oct 2021 16:14:44 +0800 (CST) Received: from kwepemm600004.china.huawei.com (7.193.23.242) by dggemv711-chm.china.huawei.com (10.1.198.66) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.8; Tue, 12 Oct 2021 16:16:19 +0800 Received: from kwephisprg16640.huawei.com (10.247.83.252) by kwepemm600004.china.huawei.com (7.193.23.242) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.8; Tue, 12 Oct 2021 16:16:18 +0800 From: "wenyi,xie" To: , , , , CC: , Subject: [PATCH EDK2 v1 1/1] EmbeddedPkg:Fix compiler warning Date: Tue, 12 Oct 2021 16:16:14 +0800 Message-ID: <20211012081614.367072-2-xiewenyi2@huawei.com> X-Mailer: git-send-email 2.18.0.huawei.25 In-Reply-To: <20211012081614.367072-1-xiewenyi2@huawei.com> References: <20211012081614.367072-1-xiewenyi2@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.247.83.252] X-ClientProxiedBy: dggems703-chm.china.huawei.com (10.3.19.180) To kwepemm600004.china.huawei.com (7.193.23.242) X-CFilter-Loop: Reflected Content-Type: text/plain 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 Cc: Ard Biesheuvel Cc: Abner Chang Cc: Daniel Schaefer Signed-off-by: Wenyi Xie --- 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