public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [PATCH] UefiCpuPkg/MpInitLib: Fix build of Microcode
@ 2018-07-19 14:58 Anthony PERARD
  2018-07-19 15:27 ` Gao, Liming
  0 siblings, 1 reply; 5+ messages in thread
From: Anthony PERARD @ 2018-07-19 14:58 UTC (permalink / raw)
  To: edk2-devel; +Cc: Eric Dong, Laszlo Ersek, Anthony PERARD

On Debian Jessie, this fail to build with:

/build/UefiCpuPkg/Library/MpInitLib/Microcode.c: In function 'MicrocodeDetect':
/build/UefiCpuPkg/Library/MpInitLib/Microcode.c:248:37: error: 'ProcessorFlags' may be used uninitialized in this function [-Werror=maybe-uninitialized]
     CpuMpData->ProcessorFlags       = ProcessorFlags;
                                     ^

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
---
 UefiCpuPkg/Library/MpInitLib/Microcode.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/UefiCpuPkg/Library/MpInitLib/Microcode.c b/UefiCpuPkg/Library/MpInitLib/Microcode.c
index efda143e67..60cf8bf409 100644
--- a/UefiCpuPkg/Library/MpInitLib/Microcode.c
+++ b/UefiCpuPkg/Library/MpInitLib/Microcode.c
@@ -60,7 +60,7 @@ MicrocodeDetect (
   BOOLEAN                                 CorrectMicrocode;
   VOID                                    *MicrocodeData;
   MSR_IA32_PLATFORM_ID_REGISTER           PlatformIdMsr;
-  UINT32                                  ProcessorFlags;
+  UINT32                                  ProcessorFlags = 0;
   UINT32                                  ThreadId;
 
   if (CpuMpData->MicrocodePatchRegionSize == 0) {
-- 
Anthony PERARD



^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2018-07-20  9:42 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-07-19 14:58 [PATCH] UefiCpuPkg/MpInitLib: Fix build of Microcode Anthony PERARD
2018-07-19 15:27 ` Gao, Liming
2018-07-19 15:52   ` [PATCH v2] " Anthony PERARD
2018-07-19 18:32     ` Laszlo Ersek
2018-07-20  9:42       ` Anthony PERARD

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox