ERR_GET_* macros return int. The corresponding constants are ints, so these should match. This appeases MSVC on some Chromium DCHECK. Change-Id: I7a5db41fa072c2850841a102917163af5e90d860 Reviewed-on: https://boringssl-review.googlesource.com/1867 Reviewed-by: Adam Langley <agl@google.com>
diff --git a/include/openssl/err.h b/include/openssl/err.h index 67a2601..9843045 100644 --- a/include/openssl/err.h +++ b/include/openssl/err.h
@@ -460,9 +460,9 @@ (((((uint32_t)lib) & 0xff) << 24) | ((((uint32_t)func) & 0xfff) << 12) | \ ((((uint32_t)reason) & 0xfff))) -#define ERR_GET_LIB(packed_error) (((packed_error) >> 24) & 0xff) -#define ERR_GET_FUNC(packed_error) (((packed_error) >> 12) & 0xfff) -#define ERR_GET_REASON(packed_error) ((packed_error) & 0xfff) +#define ERR_GET_LIB(packed_error) ((int)(((packed_error) >> 24) & 0xff)) +#define ERR_GET_FUNC(packed_error) ((int)(((packed_error) >> 12) & 0xfff)) +#define ERR_GET_REASON(packed_error) ((int)((packed_error) & 0xfff)) /* ERR_STRING_DATA is the type of an lhash node that contains a mapping from a * library, function or reason code to a string representation of it. */