]> git.proxmox.com Git - mirror_edk2.git/blobdiff - BaseTools/Source/C/Include/Common/BaseTypes.h
BaseTools: align ERROR/WARNING/RETURN macros with MdePkg versions
[mirror_edk2.git] / BaseTools / Source / C / Include / Common / BaseTypes.h
index 198647ab9595c979a4a7de3ee877e7b2fb8c4bc1..08b60bae11849008bb88446ae26a7b86dbcf8a0a 100644 (file)
 // 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