Branch: refs/heads/master
  Home:   https://github.com/tianocore/edk2
  Commit: 583876be29dfa2b7eff4b801557e361c0839671d
      
https://github.com/tianocore/edk2/commit/583876be29dfa2b7eff4b801557e361c0839671d
  Author: Richard Lyu <[email protected]>
  Date:   2026-09-08 (Tue, 08 Sep 2026)

  Changed paths:
    M OvmfPkg/RiscVVirt/PlatformPei/PlatformPeim.c

  Log Message:
  -----------
  OvmfPkg/RiscVVirt/PlatformPei: Initialize TpmBase

Building RiscVVirtQemu with GCC fails with -Werror=maybe-uninitialized.
SetupTPMResources() only assigns TpmBase inside the "Len == 8" and
"Len == 16" branches that decode the TPM 'reg' property, and the preceding
ASSERT() is not a control flow guarantee for the compiler:

PlatformPeim.c:192:23: error: 'TpmBase' may be used uninitialized
[-Werror=maybe-uninitialized]
  192 |   TpmBase -= Fdt64ToCpu (ReadUnaligned64 ((UINT64 *)RangesProp));
      |           ^~

Initialize TpmBase next to the existing TpmBaseSize initialization, purely
to satisfy the compiler.

Signed-off-by: Richard Lyu <[email protected]>



To unsubscribe from these emails, change your notification settings at 
https://github.com/tianocore/edk2/settings/notifications


_______________________________________________
edk2-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/edk2-commits

Reply via email to