From 96207191fd715e268c6ba6d6ac8650ef914e1686 Mon Sep 17 00:00:00 2001 From: Jian J Wang Date: Fri, 22 Sep 2017 09:31:19 +0800 Subject: [PATCH] UefiCpuPkg/CpuDxe: Fix GCC build warning There're uninitialized variables warning reported by GCC. This patch will fix it. The original commit is c1cab54ce57c2608b8b3ea051c7041f036f21153 Cc: Hao Wu Cc: Anthony PERARD Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jian J Wang Reviewed-by: Hao Wu --- UefiCpuPkg/CpuDxe/CpuPageTable.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/UefiCpuPkg/CpuDxe/CpuPageTable.c b/UefiCpuPkg/CpuDxe/CpuPageTable.c index ae93f3f553..d312eb66f8 100644 --- a/UefiCpuPkg/CpuDxe/CpuPageTable.c +++ b/UefiCpuPkg/CpuDxe/CpuPageTable.c @@ -802,8 +802,12 @@ RefreshGcdMemoryAttributesFromPaging ( GetCurrentPagingContext (&PagingContext); - BaseAddress = 0; - PageLength = 0; + DoUpdate = FALSE; + Capabilities = 0; + Attributes = 0; + BaseAddress = 0; + PageLength = 0; + for (Index = 0; Index < NumberOfDescriptors; Index++) { if (MemorySpaceMap[Index].GcdMemoryType == EfiGcdMemoryTypeNonExistent) { continue;