]> git.proxmox.com Git - mirror_edk2.git/commitdiff
UefiCpuPkg/PiSmmCpuDxeSmm: Fix build failure for VS2012 and GCC49.
authorEric Dong <eric.dong@intel.com>
Thu, 25 Oct 2018 02:12:52 +0000 (10:12 +0800)
committerEric Dong <eric.dong@intel.com>
Fri, 26 Oct 2018 03:28:37 +0000 (11:28 +0800)
Code initialized in function can't be correctly detected by build tool.
Add code to clearly initialize the local variable before use it.

Cc: Ruiyu Ni <ruiyu.ni@intel.com>
Cc: Laszlo Ersek <lersek@redhat.com>
Cc: Dandan Bi <dandan.bi@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Eric Dong <eric.dong@intel.com>
Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>
UefiCpuPkg/PiSmmCpuDxeSmm/CpuS3.c

index 5193fea2b374354e3dd2c9239b975aac3a0f0674..a45e2dd3d7aaac7eec0fc5182d64f8a265bff6e3 100644 (file)
@@ -451,6 +451,7 @@ SetRegister (
 \r
   InitApicId = GetInitialApicId ();\r
   RegisterTable = NULL;\r
+  ProcIndex = (UINTN)-1;\r
   for (Index = 0; Index < mAcpiCpuData.NumberOfCpus; Index++) {\r
     if (RegisterTables[Index].InitialApicId == InitApicId) {\r
       RegisterTable = &RegisterTables[Index];\r