]> git.proxmox.com Git - mirror_edk2.git/commitdiff
OvmfPkg/VmgExitLib: Fix uninitialized variable warning with XCODE5
authorRebecca Cran <quic_rcran@quicinc.com>
Fri, 4 Feb 2022 20:13:02 +0000 (13:13 -0700)
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Tue, 15 Feb 2022 10:17:31 +0000 (10:17 +0000)
XCODE5 reported the following warning:

OvmfPkg/Library/VmgExitLib/VmgExitVcHandler.c:1895:12: note:
uninitialized use occurs here
           Compacted
           ^^^^^^^^^

Initialize the 'Compacted' variable to fix the warning.

Signed-off-by: Rebecca Cran <quic_rcran@quicinc.com>
Reviewed-by: Ard Biesheuvel <ardb@kernel.org>
OvmfPkg/Library/VmgExitLib/VmgExitVcHandler.c

index a40a31f7c27546ef1a93abb4a06400775ce335e0..a4393dffbd630d077ac1d25cffa3653aa76ea668 100644 (file)
@@ -1872,6 +1872,7 @@ GetCpuidFw (
     UINT32                 XSaveSize;\r
 \r
     XssMsr.Uint64 = 0;\r
+    Compacted     = FALSE;\r
     if (EcxIn == 1) {\r
       /*\r
        * The PPR and APM aren't clear on what size should be encoded in\r