From 7e9e06a7393298c65a2a33e0cb3d13e957c06e4a Mon Sep 17 00:00:00 2001 From: David Benjamin Date: Mon, 17 Jul 2017 13:50:56 -0400 Subject: [PATCH] Use OPENSSL_UNUSED in OPENSSL_COMPILE_ASSERT. This would also have fixed the Windows clang issues. Those kicked in because Windows clang defines __clang__ and not __GNUC__, but OPENSSL_UNUSED accounts for this. It's also shorter. Change-Id: I75bc17bbb789c5b78a7a369c43194e146739f574 Reviewed-on: https://boringssl-review.googlesource.com/18004 Commit-Queue: David Benjamin Commit-Queue: Steven Valdez Reviewed-by: Steven Valdez --- include/openssl/type_check.h | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/include/openssl/type_check.h b/include/openssl/type_check.h index 7e70918b..a6f8284f 100644 --- a/include/openssl/type_check.h +++ b/include/openssl/type_check.h @@ -78,13 +78,9 @@ extern "C" { #if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 201112L #define OPENSSL_COMPILE_ASSERT(cond, msg) _Static_assert(cond, #msg) -#elif defined(__GNUC__) -#define OPENSSL_COMPILE_ASSERT(cond, msg) \ - typedef char OPENSSL_COMPILE_ASSERT_##msg[((cond) ? 1 : -1)] \ - __attribute__((unused)) #else #define OPENSSL_COMPILE_ASSERT(cond, msg) \ - typedef char OPENSSL_COMPILE_ASSERT_##msg[((cond) ? 1 : -1)] + typedef char OPENSSL_COMPILE_ASSERT_##msg[((cond) ? 1 : -1)] OPENSSL_UNUSED #endif