diff options
author | Dun Tan <dun.tan@intel.com> | 2024-07-04 15:15:15 +0800 |
---|---|---|
committer | mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> | 2024-07-04 21:33:44 +0000 |
commit | ed9a64af1be2724362b50cf96281de7117ad7bff (patch) | |
tree | 6c28cecb817a8e6d35ea95cb930a0690b6132c6e /SecurityPkg/Tcg | |
parent | 28099661893327296e18b8f98a1e7c3e757c7d49 (diff) | |
download | edk2-ed9a64af1be2724362b50cf96281de7117ad7bff.tar.gz |
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>
Diffstat (limited to 'SecurityPkg/Tcg')
-rw-r--r-- | SecurityPkg/Tcg/Tcg2Config/Tcg2ConfigPeim.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/SecurityPkg/Tcg/Tcg2Config/Tcg2ConfigPeim.c b/SecurityPkg/Tcg/Tcg2Config/Tcg2ConfigPeim.c index ce78e32537..73121b0a26 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);
|