diff options
| author | Richard Lyu <richard.lyu@suse.com> | 2026-01-31 13:01:29 +0300 |
|---|---|---|
| committer | mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> | 2026-02-22 19:49:04 +0300 |
| commit | 81b1ec18a5924fa0be64a4226901911f8c0af274 (patch) | |
| tree | 08bded77a9d1ab1869f591cb9a8009dc42c62a39 /MdeModulePkg/Library/PiDxeS3BootScriptLib/InternalBootScriptLib.h | |
| parent | b7a715f7c03c45c6b4575bf88596bfd79658b8ce (diff) | |
| download | edk2-81b1ec18a5924fa0be64a4226901911f8c0af274.tar.xz | |
OvmfPkg/CcExitLib: Initialize XCr0 in else-path to fix build error
Add an else-path to explicitly set XCr0 to 0 when EaxIn is not
CPUID_EXTENDED_STATE. This ensures XCr0 is initialized across all
logic paths and resolves the GCC build error regarding a potential
uninitialized variable.
CcExitVcHandler.c:1470:10: error: 'XCr0' may be used uninitialized
[-Werror=maybe-uninitialized]
| ^~~~~~~~~~~~~
1471 | Ghcb,
| ~~~~~
1472 | EaxIn,
| ~~~~~~
1473 | EcxIn,
| ~~~~~~
1474 | XCr0,
| ~~~~~
1475 | &Eax,
| ~~~~~
1476 | &Ebx,
| ~~~~~
1477 | &Ecx,
| ~~~~~
1478 | &Edx,
| ~~~~~
1479 | &Status,
| ~~~~~~~~
1480 | &Unsupported
| ~~~~~~~~~~~~
1481 | ))
| ~
CcExitVcHandler.c:1436:12: note: 'XCr0' was declared here
1436 | UINT64 XCr0;
| ^~~~
Signed-off-by: Richard Lyu <richard.lyu@suse.com>
Diffstat (limited to 'MdeModulePkg/Library/PiDxeS3BootScriptLib/InternalBootScriptLib.h')
0 files changed, 0 insertions, 0 deletions
