From 264eccb5dfc345c2e004883f00e62959f818fafd Mon Sep 17 00:00:00 2001 From: Michael Kubacki Date: Mon, 19 Oct 2020 15:12:23 -0700 Subject: [PATCH] ArmPkg/ArmMmuLib: Explicitly cast function pointer argument The function ArmReplaceLiveTranslationEntry () is passed as a VOID pointer to WriteBackDataCacheRange (). This produces the following warning on VS2019: warning C4152: nonstandard extension, function/data pointer conversion in expression This change explicitly casts the argument to the formal parameter type VOID*. This can be reproduced with the following build command: build -b DEBUG -a AARCH64 -t VS2019 -p ArmPkg/ArmPkg.dsc -m ArmPkg/Library/ArmMmuLib/ArmMmuPeiLib.inf Signed-off-by: Michael Kubacki Reviewed-by: Ard Biesheuvel --- ArmPkg/Library/ArmMmuLib/AArch64/ArmMmuPeiLibConstructor.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ArmPkg/Library/ArmMmuLib/AArch64/ArmMmuPeiLibConstructor.c b/ArmPkg/Library/ArmMmuLib/AArch64/ArmMmuPeiLibConstructor.c index 80317923cf..4fc3c92fdb 100644 --- a/ArmPkg/Library/ArmMmuLib/AArch64/ArmMmuPeiLibConstructor.c +++ b/ArmPkg/Library/ArmMmuLib/AArch64/ArmMmuPeiLibConstructor.c @@ -47,7 +47,7 @@ ArmMmuPeiLibConstructor ( // The ArmReplaceLiveTranslationEntry () helper function may be invoked // with the MMU off so we have to ensure that it gets cleaned to the PoC // - WriteBackDataCacheRange (ArmReplaceLiveTranslationEntry, + WriteBackDataCacheRange ((VOID *)(UINTN)ArmReplaceLiveTranslationEntry, ArmReplaceLiveTranslationEntrySize); } -- 2.39.2