From b5b60e8b4975a3f7c9ddf4a59c28fe971414d179 Mon Sep 17 00:00:00 2001 From: mdkinney Date: Thu, 9 Nov 2006 22:01:56 +0000 Subject: [PATCH] Fix ALIGN_POINTER() macro. The pointer (p) passed in must always be converted to (UINTN) prior to performing math operations. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@1922 6f19259b-4bc3-4df7-8a09-765794883524 --- MdePkg/Include/Common/BaseTypes.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MdePkg/Include/Common/BaseTypes.h b/MdePkg/Include/Common/BaseTypes.h index 3935919300..92e9c141f7 100644 --- a/MdePkg/Include/Common/BaseTypes.h +++ b/MdePkg/Include/Common/BaseTypes.h @@ -139,7 +139,7 @@ typedef CHAR8 *VA_LIST; /// /// ALIGN_POINTER - aligns a pointer to the lowest boundry /// -#define ALIGN_POINTER(p, s) ((VOID *) ((p) + (((s) - ((UINTN) (p))) & ((s) - 1)))) +#define ALIGN_POINTER(p, s) ((VOID *) ((UINTN)(p) + (((s) - ((UINTN) (p))) & ((s) - 1)))) /// /// ALIGN_VARIABLE - aligns a variable up to the next natural boundry for int size of a processor -- 2.39.2