From 262ffea8ec8b407ecc5396d3b0a37ba7678ba805 Mon Sep 17 00:00:00 2001 From: mdkinney Date: Sat, 14 Feb 2009 02:14:37 +0000 Subject: Update macros to make sure all RETURN_STATUS constants are defined to be of type RETURN_STATUS. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@7526 6f19259b-4bc3-4df7-8a09-765794883524 --- MdePkg/Include/Base.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'MdePkg/Include') diff --git a/MdePkg/Include/Base.h b/MdePkg/Include/Base.h index 33d192c..00cce60 100644 --- a/MdePkg/Include/Base.h +++ b/MdePkg/Include/Base.h @@ -521,7 +521,7 @@ typedef INTN RETURN_STATUS; @return The value specified by StatusCode with the highest bit set. **/ -#define ENCODE_ERROR(StatusCode) (MAX_BIT | (StatusCode)) +#define ENCODE_ERROR(StatusCode) ((RETURN_STATUS)(MAX_BIT | (StatusCode))) /** Produces a RETURN_STATUS code with the highest bit clear. @@ -532,7 +532,7 @@ typedef INTN RETURN_STATUS; @return The value specified by StatusCode with the highest bit clear. **/ -#define ENCODE_WARNING(StatusCode) (StatusCode) +#define ENCODE_WARNING(StatusCode) ((RETURN_STATUS)(StatusCode)) /** Returns TRUE if a specified RETURN_STATUS code is an error code. @@ -545,7 +545,7 @@ typedef INTN RETURN_STATUS; @retval FALSE The high bit of StatusCode is clear. **/ -#define RETURN_ERROR(StatusCode) ((INTN) (StatusCode) < 0) +#define RETURN_ERROR(StatusCode) (((RETURN_STATUS)(StatusCode)) < 0) /// /// The operation completed successfully. -- cgit v1.1