From c7dd5f301f5081972002cd3c64b3e2ddd5acfb9a Mon Sep 17 00:00:00 2001 From: David Benjamin Date: Wed, 1 Oct 2014 14:31:11 -0400 Subject: [PATCH] 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 --- include/openssl/err.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/include/openssl/err.h b/include/openssl/err.h index 67a26010a..9843045e9 100644 --- a/include/openssl/err.h +++ b/include/openssl/err.h @@ -460,9 +460,9 @@ enum { (((((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. */