* Re: [patch] UefiCpuPkg/MtrrLib:Fix VS2012 build failure
[not found] <1491354393-115588-1-git-send-email-dandan.bi@intel.com>
@ 2017-04-05 1:12 ` Ni, Ruiyu
0 siblings, 0 replies; only message in thread
From: Ni, Ruiyu @ 2017-04-05 1:12 UTC (permalink / raw)
To: Bi, Dandan, edk2-devel@lists.01.org; +Cc: Fan, Jeff
Dandan,
Thank you! I thought I fixed all the build failures.
Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>
Regards,
Ray
>-----Original Message-----
>From: Bi, Dandan
>Sent: Wednesday, April 5, 2017 9:07 AM
>To: edk2-devel@lists.01.org
>Cc: Ni, Ruiyu <ruiyu.ni@intel.com>; Fan, Jeff <jeff.fan@intel.com>
>Subject: [patch] UefiCpuPkg/MtrrLib:Fix VS2012 build failure
>
>Cc: Ruiyu Ni <ruiyu.ni@intel.com>
>Cc: Jeff Fan <jeff.fan@intel.com>
>Contributed-under: TianoCore Contribution Agreement 1.0
>Signed-off-by: Dandan Bi <dandan.bi@intel.com>
>---
> UefiCpuPkg/Library/MtrrLib/MtrrLib.c | 4 ++++
> 1 file changed, 4 insertions(+)
>
>diff --git a/UefiCpuPkg/Library/MtrrLib/MtrrLib.c b/UefiCpuPkg/Library/MtrrLib/MtrrLib.c
>index 8e84272..c38191a 100644
>--- a/UefiCpuPkg/Library/MtrrLib/MtrrLib.c
>+++ b/UefiCpuPkg/Library/MtrrLib/MtrrLib.c
>@@ -700,10 +700,11 @@ MtrrLibGetPositiveMtrrNumber (
> UINT64 SubLength;
> UINT32 MtrrNumber;
> BOOLEAN UseLeastAlignment;
>
> UseLeastAlignment = TRUE;
>+ SubLength = 0;
>
> //
> // Calculate the alignment of the base address.
> //
> for (MtrrNumber = 0; Length != 0; MtrrNumber++) {
>@@ -852,10 +853,11 @@ MtrrLibGetMtrrNumber (
> UINT32 Index;
>
> *SubLeft = 0;
> *SubRight = 0;
> LeastSubtractiveMtrrNumber = 0;
>+ BaseAlignment = 0;
>
> //
> // Get the optimal left subtraction solution.
> //
> if (BaseAddress != 0) {
>@@ -1625,10 +1627,12 @@ MtrrLibSetMemoryAttributeInVariableMtrr (
> UINT32 MtrrNumber;
> UINT32 SubtractiveLeft;
> UINT32 SubtractiveRight;
> BOOLEAN UseLeastAlignment;
>
>+ Alignment = 0;
>+
> MtrrNumber = MtrrLibGetMtrrNumber (Ranges, RangeCount, VariableMtrr, *VariableMtrrCount,
> BaseAddress, Length, Type, Alignment0, &SubtractiveLeft, &SubtractiveRight);
>
> if (MtrrNumber + *VariableMtrrCount > VariableMtrrCapacity) {
> return RETURN_OUT_OF_RESOURCES;
>--
>1.9.5.msysgit.1
^ permalink raw reply [flat|nested] only message in thread