From: mdkinney Date: Fri, 5 Dec 2008 23:23:59 +0000 (+0000) Subject: Update FUNCTION_ENTRY_POINT() to be compatible with a wider variety of input parameters. X-Git-Tag: edk2-stable201903~19363 X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=commitdiff_plain;h=9a1d00cbb571c019e98b28189f6619ff32e7bb49 Update FUNCTION_ENTRY_POINT() to be compatible with a wider variety of input parameters. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@6883 6f19259b-4bc3-4df7-8a09-765794883524 --- diff --git a/MdePkg/Include/Ebc/ProcessorBind.h b/MdePkg/Include/Ebc/ProcessorBind.h index b83ebe8766..966ddb6781 100644 --- a/MdePkg/Include/Ebc/ProcessorBind.h +++ b/MdePkg/Include/Ebc/ProcessorBind.h @@ -90,7 +90,7 @@ typedef unsigned long UINTN; @return The pointer to the first instruction of a function given a function pointer. **/ -#define FUNCTION_ENTRY_POINT(FunctionPointer) (VOID *)(FunctionPointer) +#define FUNCTION_ENTRY_POINT(FunctionPointer) (VOID *)(UINTN)(FunctionPointer) #endif diff --git a/MdePkg/Include/Ia32/ProcessorBind.h b/MdePkg/Include/Ia32/ProcessorBind.h index b3486ea8ef..3f3fae73cf 100644 --- a/MdePkg/Include/Ia32/ProcessorBind.h +++ b/MdePkg/Include/Ia32/ProcessorBind.h @@ -219,7 +219,7 @@ typedef INT32 INTN; @return The pointer to the first instruction of a function given a function pointer. **/ -#define FUNCTION_ENTRY_POINT(FunctionPointer) (VOID *)(FunctionPointer) +#define FUNCTION_ENTRY_POINT(FunctionPointer) (VOID *)(UINTN)(FunctionPointer) #endif diff --git a/MdePkg/Include/Ipf/ProcessorBind.h b/MdePkg/Include/Ipf/ProcessorBind.h index 16bba6589b..ac695fe38b 100644 --- a/MdePkg/Include/Ipf/ProcessorBind.h +++ b/MdePkg/Include/Ipf/ProcessorBind.h @@ -250,7 +250,7 @@ typedef struct { @return The pointer to the first instruction of a function given a function pointer. **/ -#define FUNCTION_ENTRY_POINT(FunctionPointer) (((EFI_PLABEL *)(FunctionPointer))->EntryPoint) +#define FUNCTION_ENTRY_POINT(FunctionPointer) (VOID *)(UINTN)(((EFI_PLABEL *)(FunctionPointer))->EntryPoint) #endif diff --git a/MdePkg/Include/X64/ProcessorBind.h b/MdePkg/Include/X64/ProcessorBind.h index 91b0306dcb..a54cc1b5d0 100644 --- a/MdePkg/Include/X64/ProcessorBind.h +++ b/MdePkg/Include/X64/ProcessorBind.h @@ -248,7 +248,7 @@ typedef INT64 INTN; @return The pointer to the first instruction of a function given a function pointer. **/ -#define FUNCTION_ENTRY_POINT(FunctionPointer) (VOID *)(FunctionPointer) +#define FUNCTION_ENTRY_POINT(FunctionPointer) (VOID *)(UINTN)(FunctionPointer) #endif