]> git.proxmox.com Git - mirror_edk2.git/commitdiff
ArmPkg/ArmMmuLib: Explicitly cast function pointer argument
authorMichael Kubacki <michael.kubacki@microsoft.com>
Mon, 19 Oct 2020 22:12:23 +0000 (15:12 -0700)
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Thu, 22 Oct 2020 14:48:12 +0000 (14:48 +0000)
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 <michael.kubacki@microsoft.com>
Reviewed-by: Ard Biesheuvel <ard.biesheuvel@arm.com>
ArmPkg/Library/ArmMmuLib/AArch64/ArmMmuPeiLibConstructor.c

index 80317923cfa49479581c696c55e439407834ff04..4fc3c92fdbf59afb03cd3d4061722908d218a8e3 100644 (file)
@@ -47,7 +47,7 @@ ArmMmuPeiLibConstructor (
     // The ArmReplaceLiveTranslationEntry () helper function may be invoked\r
     // with the MMU off so we have to ensure that it gets cleaned to the PoC\r
     //\r
-    WriteBackDataCacheRange (ArmReplaceLiveTranslationEntry,\r
+    WriteBackDataCacheRange ((VOID *)(UINTN)ArmReplaceLiveTranslationEntry,\r
       ArmReplaceLiveTranslationEntrySize);\r
   }\r
 \r