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 <[email protected]> Cc: Laszlo Ersek <[email protected]> Cc: Dandan Bi <[email protected]> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Eric Dong <[email protected]> --- UefiCpuPkg/Library/RegisterCpuFeaturesLib/CpuFeaturesInitialize.c | 1 + 1 file changed, 1 insertion(+) diff --git a/UefiCpuPkg/Library/RegisterCpuFeaturesLib/CpuFeaturesInitialize.c b/UefiCpuPkg/Library/RegisterCpuFeaturesLib/CpuFeaturesInitialize.c index 7a5939c966..173f2edbea 100644 --- a/UefiCpuPkg/Library/RegisterCpuFeaturesLib/CpuFeaturesInitialize.c +++ b/UefiCpuPkg/Library/RegisterCpuFeaturesLib/CpuFeaturesInitialize.c @@ -1029,6 +1029,7 @@ SetProcessorRegister ( InitApicId = GetInitialApicId (); RegisterTable = NULL; + ProcIndex = (UINTN)-1; for (Index = 0; Index < AcpiCpuData->NumberOfCpus; Index++) { if (RegisterTables[Index].InitialApicId == InitApicId) { RegisterTable = &RegisterTables[Index]; -- 2.15.0.windows.1 _______________________________________________ edk2-devel mailing list [email protected] https://lists.01.org/mailman/listinfo/edk2-devel

