summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDun Tan <dun.tan@intel.com>2024-07-04 15:15:15 +0800
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>2024-07-04 21:33:44 +0000
commited9a64af1be2724362b50cf96281de7117ad7bff (patch)
tree6c28cecb817a8e6d35ea95cb930a0690b6132c6e
parent28099661893327296e18b8f98a1e7c3e757c7d49 (diff)
downloadedk2-ed9a64af1be2724362b50cf96281de7117ad7bff.zip
edk2-ed9a64af1be2724362b50cf96281de7117ad7bff.tar.gz
edk2-ed9a64af1be2724362b50cf96281de7117ad7bff.tar.bz2
SecurityPkg/Tcg2Config: avoid potential build error
Cast pointer type to VOID* to avoid potential build error. If the two PCD are FixAtBuild, PcdGetPtr will return a const type pointer. Since the second parameter of BuildGuidDataHob is VOID*, build error may happen with following log: C4090: 'function': different 'const' qualifiers Signed-off-by: Dun Tan <dun.tan@intel.com>
-rw-r--r--SecurityPkg/Tcg/Tcg2Config/Tcg2ConfigPeim.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/SecurityPkg/Tcg/Tcg2Config/Tcg2ConfigPeim.c b/SecurityPkg/Tcg/Tcg2Config/Tcg2ConfigPeim.c
index ce78e32..73121b0 100644
--- a/SecurityPkg/Tcg/Tcg2Config/Tcg2ConfigPeim.c
+++ b/SecurityPkg/Tcg/Tcg2Config/Tcg2ConfigPeim.c
@@ -190,7 +190,7 @@ Tcg2ConfigPeimEntryPoint (
//
Hob = BuildGuidDataHob (
&gEdkiiTpmInstanceHobGuid,
- PcdGetPtr (PcdTpmInstanceGuid),
+ (VOID *)PcdGetPtr (PcdTpmInstanceGuid),
sizeof (EFI_GUID)
);
ASSERT (Hob != NULL);
@@ -200,7 +200,7 @@ Tcg2ConfigPeimEntryPoint (
//
Hob = BuildGuidDataHob (
&gEdkiiTcgPhysicalPresenceInterfaceVerHobGuid,
- PcdGetPtr (PcdTcgPhysicalPresenceInterfaceVer),
+ (VOID *)PcdGetPtr (PcdTcgPhysicalPresenceInterfaceVer),
AsciiStrSize ((CHAR8 *)PcdGetPtr (PcdTcgPhysicalPresenceInterfaceVer))
);
ASSERT (Hob != NULL);