]> git.proxmox.com Git - mirror_edk2.git/commitdiff
Update macros to make sure all RETURN_STATUS constants are defined to be of type...
authormdkinney <mdkinney@6f19259b-4bc3-4df7-8a09-765794883524>
Sat, 14 Feb 2009 02:14:37 +0000 (02:14 +0000)
committermdkinney <mdkinney@6f19259b-4bc3-4df7-8a09-765794883524>
Sat, 14 Feb 2009 02:14:37 +0000 (02:14 +0000)
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@7526 6f19259b-4bc3-4df7-8a09-765794883524

MdePkg/Include/Base.h

index 33d192cd5f503150e0bc2c4c79dd32801e86fab2..00cce609f5622bce72c70ca9f9d3ac408487f765 100644 (file)
@@ -521,7 +521,7 @@ typedef INTN RETURN_STATUS;
   @return The value specified by StatusCode with the highest bit set.\r
 \r
 **/\r
   @return The value specified by StatusCode with the highest bit set.\r
 \r
 **/\r
-#define ENCODE_ERROR(StatusCode)     (MAX_BIT | (StatusCode))\r
+#define ENCODE_ERROR(StatusCode)     ((RETURN_STATUS)(MAX_BIT | (StatusCode)))\r
 \r
 /**\r
   Produces a RETURN_STATUS code with the highest bit clear. \r
 \r
 /**\r
   Produces a RETURN_STATUS code with the highest bit clear. \r
@@ -532,7 +532,7 @@ typedef INTN RETURN_STATUS;
   @return The value specified by StatusCode with the highest bit clear.\r
 \r
 **/\r
   @return The value specified by StatusCode with the highest bit clear.\r
 \r
 **/\r
-#define ENCODE_WARNING(StatusCode)   (StatusCode)\r
+#define ENCODE_WARNING(StatusCode)   ((RETURN_STATUS)(StatusCode))\r
 \r
 /**\r
   Returns TRUE if a specified RETURN_STATUS code is an error code. \r
 \r
 /**\r
   Returns TRUE if a specified RETURN_STATUS code is an error code. \r
@@ -545,7 +545,7 @@ typedef INTN RETURN_STATUS;
   @retval FALSE         The high bit of StatusCode is clear.\r
 \r
 **/\r
   @retval FALSE         The high bit of StatusCode is clear.\r
 \r
 **/\r
-#define RETURN_ERROR(StatusCode)     ((INTN) (StatusCode) < 0)\r
+#define RETURN_ERROR(StatusCode)     (((RETURN_STATUS)(StatusCode)) < 0)\r
 \r
 ///\r
 /// The operation completed successfully.\r
 \r
 ///\r
 /// The operation completed successfully.\r