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 <davidben@google.com> Commit-Queue: Steven Valdez <svaldez@google.com> Reviewed-by: Steven Valdez <svaldez@google.com>
This commit is contained in:
parent
c5304e4f3b
commit
7e9e06a739
@ -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
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user