[edk2-devel] [PATCH v1 1/1] ArmPkg/ArmMmuLib: Explicitly cast function pointer argument
Michael Kubacki
michael.kubacki at outlook.com
Mon Oct 19 21:35:28 UTC 2020
From: Michael Kubacki <michael.kubacki at microsoft.com>
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
Cc: Ard Biesheuvel <ard.biesheuvel at arm.com>
Cc: Leif Lindholm <leif at nuviainc.com>
Signed-off-by: Michael Kubacki <michael.kubacki at microsoft.com>
---
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 80317923cfa4..74807464ffd7 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 *) ArmReplaceLiveTranslationEntry,
ArmReplaceLiveTranslationEntrySize);
}
--
2.28.0.windows.1
-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#66414): https://edk2.groups.io/g/devel/message/66414
Mute This Topic: https://groups.io/mt/77669028/1813853
Group Owner: devel+owner at edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [edk2-devel-archive at redhat.com]
-=-=-=-=-=-=-=-=-=-=-=-
More information about the edk2-devel-archive
mailing list