From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mx.groups.io with SMTP id smtpd.web09.7041.1621397758078765663 for ; Tue, 18 May 2021 21:15:58 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="body hash did not verify" header.i=@linux.microsoft.com header.s=default header.b=NG45fryv; spf=pass (domain: linux.microsoft.com, ip: 13.77.154.182, mailfrom: mikuback@linux.microsoft.com) Received: from localhost.localdomain (unknown [167.220.2.74]) by linux.microsoft.com (Postfix) with ESMTPSA id 72CEC20B7178; Tue, 18 May 2021 21:15:57 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 72CEC20B7178 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1621397757; bh=75FjreyyiWsDs98jZxk1YSncxCFWGg4TQCjv75/itoE=; h=From:To:Cc:Subject:Date:From; b=NG45fryvaBrqMve4UdWaTtFGoju1c9qSt1AVvSDZfy5i/0yCF+fGu4AvMvYgOb0yI mvKPuXjmZGjozWwRwsyBz2t1RPOMBIYwQUnYwj8ZkXfda5XNUK/G5T2M+0f54CFJ0u cMdwxZ/irfEvrAUSmry3ovJA1A1sJ3OHDUCZ+JJU= From: "Michael Kubacki" To: devel@edk2.groups.io Cc: Ray Ni , Rangasai V Chaganty , SofiaX Chuang Subject: [edk2-platforms][PATCH v1 1/1] IntelSiliconPkg: Cast UINT32 to UINT8 conversion in ReportCpuHobLib Date: Tue, 18 May 2021 21:15:30 -0700 Message-Id: <20210519041530.1368-1-mikuback@linux.microsoft.com> X-Mailer: git-send-email 2.28.0.windows.1 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable From: Michael Kubacki REF:https://bugzilla.tianocore.org/show_bug.cgi?id=3D3404 Commit d3c10d3 introduced a build error in ReportCpuHobLib.c: IntelSiliconPkg\Library\ReportCpuHobLib\ReportCpuHobLib.c(30): error C2220: warning treated as error - no 'object' file generated IntelSiliconPkg\Library\ReportCpuHobLib\ReportCpuHobLib.c(30): warning C4244: '=3D': conversion from 'UINT32' to 'UINT8', possible loss of data This commit explicitly cast the assignment to fix the build error. Cc: Ray Ni Cc: Rangasai V Chaganty Cc: SofiaX Chuang Signed-off-by: Michael Kubacki --- Silicon/Intel/IntelSiliconPkg/Library/ReportCpuHobLib/ReportCpuHobLib.c = | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Silicon/Intel/IntelSiliconPkg/Library/ReportCpuHobLib/Report= CpuHobLib.c b/Silicon/Intel/IntelSiliconPkg/Library/ReportCpuHobLib/Repor= tCpuHobLib.c index 3f67b477d25a..56d63a35edcb 100644 --- a/Silicon/Intel/IntelSiliconPkg/Library/ReportCpuHobLib/ReportCpuHobL= ib.c +++ b/Silicon/Intel/IntelSiliconPkg/Library/ReportCpuHobLib/ReportCpuHobL= ib.c @@ -27,7 +27,7 @@ ReportCpuHob ( AsmCpuid (CPUID_VIR_PHY_ADDRESS_SIZE, &AddressSizeEax.Uint32, NULL, NU= LL, NULL); if (AddressSizeEax.Uint32 >=3D CPUID_VIR_PHY_ADDRESS_SIZE) { AsmCpuid (CPUID_VIR_PHY_ADDRESS_SIZE, &AddressSizeEax.Uint32, NULL, = NULL, NULL); - PhysicalAddressBits =3D AddressSizeEax.Bits.PhysicalAddressBits; + PhysicalAddressBits =3D (UINT8)AddressSizeEax.Bits.PhysicalAddressBi= ts; } else { PhysicalAddressBits =3D 36; } --=20 2.28.0.windows.1