ArmPkg/ArmMmuLib: Use function pointer type
mReplaceLiveEntryFunc is a function pointer but assigned as a VOID* pointer: mReplaceLiveEntryFunc = *(VOID **)GET_GUID_HOB_DATA (Hob); This leads to the Visual Studio warning: nonstandard extension, function/data pointer conversion in expression This change updates the assignment to avoid using a data pointer and defines a type for the function pointer to succinctly and accurately refer to the type when it is used in the library code. Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com> Reviewed-by: Ard Biesheuvel <ardb@kernel.org>
This commit is contained in:
committed by
mergify[bot]
parent
0e9ce9146a
commit
d451bba399
23
ArmPkg/Library/ArmMmuLib/ArmMmuLibInternal.h
Normal file
23
ArmPkg/Library/ArmMmuLib/ArmMmuLibInternal.h
Normal file
@@ -0,0 +1,23 @@
|
||||
/** @file
|
||||
Arm MMU library instance internal header file.
|
||||
|
||||
Copyright (C) Microsoft Corporation. All rights reserved.
|
||||
|
||||
SPDX-License-Identifier: BSD-2-Clause-Patent
|
||||
|
||||
**/
|
||||
|
||||
#ifndef ARM_MMU_LIB_INTERNAL_H_
|
||||
#define ARM_MMU_LIB_INTERNAL_H_
|
||||
|
||||
typedef
|
||||
VOID(
|
||||
EFIAPI *ARM_REPLACE_LIVE_TRANSLATION_ENTRY
|
||||
)(
|
||||
IN UINT64 *Entry,
|
||||
IN UINT64 Value,
|
||||
IN UINT64 RegionStart,
|
||||
IN BOOLEAN DisableMmu
|
||||
);
|
||||
|
||||
#endif
|
Reference in New Issue
Block a user