// EFI Error Codes common to all execution phases\r
//\r
\r
-typedef INTN RETURN_STATUS;\r
+typedef UINTN RETURN_STATUS;\r
\r
///\r
/// Set the upper bit to indicate EFI Error.\r
///\r
-#define ENCODE_ERROR(a) (MAX_BIT | (a))\r
+#define ENCODE_ERROR(a) ((RETURN_STATUS)(MAX_BIT | (a)))\r
\r
-#define ENCODE_WARNING(a) (a)\r
-#define RETURN_ERROR(a) ((a) < 0)\r
+#define ENCODE_WARNING(a) ((RETURN_STATUS)(a))\r
+#define RETURN_ERROR(a) (((INTN)(RETURN_STATUS)(a)) < 0)\r
\r
#define RETURN_SUCCESS 0\r
#define RETURN_LOAD_ERROR ENCODE_ERROR (1)\r