diff options
author | Brian Ledger <brianpl@google.com> | 2024-04-02 15:17:16 -0400 |
---|---|---|
committer | Boringssl LUCI CQ <boringssl-scoped@luci-project-accounts.iam.gserviceaccount.com> | 2024-04-02 23:26:52 +0000 |
commit | 68c6fd8943ffba4e5054ff3a9befa8882b6b226a (patch) | |
tree | ea6d8ff3714841391e8f2681c585d46171ff0aff | |
parent | 077d4d2b1a768028603ae1b26287224d7f985d1f (diff) | |
download | boringssl-68c6fd8943ffba4e5054ff3a9befa8882b6b226a.zip boringssl-68c6fd8943ffba4e5054ff3a9befa8882b6b226a.tar.gz boringssl-68c6fd8943ffba4e5054ff3a9befa8882b6b226a.tar.bz2 |
Disable `-Wcast-function-type-strict` for `BORINGSSL_DEFINE_STACK_OF_IMPL.`
Change-Id: I8340cf9259de72792a01049ecc36997233887006
Reviewed-on: https://boringssl-review.googlesource.com/c/boringssl/+/67607
Commit-Queue: David Benjamin <davidben@google.com>
Reviewed-by: David Benjamin <davidben@google.com>
-rw-r--r-- | include/openssl/base.h | 7 | ||||
-rw-r--r-- | include/openssl/stack.h | 4 |
2 files changed, 11 insertions, 0 deletions
diff --git a/include/openssl/base.h b/include/openssl/base.h index 57095d0..29b598e 100644 --- a/include/openssl/base.h +++ b/include/openssl/base.h @@ -181,6 +181,13 @@ extern "C" { #define OPENSSL_PRINTF_FORMAT_FUNC(string_index, first_to_check) #endif +// OPENSSL_CLANG_PRAGMA emits a pragma on clang and nothing on other compilers. +#if defined(__clang__) +#define OPENSSL_CLANG_PRAGMA(arg) _Pragma(arg) +#else +#define OPENSSL_CLANG_PRAGMA(arg) +#endif + // OPENSSL_MSVC_PRAGMA emits a pragma on MSVC and nothing on other compilers. #if defined(_MSC_VER) #define OPENSSL_MSVC_PRAGMA(arg) __pragma(arg) diff --git a/include/openssl/stack.h b/include/openssl/stack.h index 46ced49..0eccb2f 100644 --- a/include/openssl/stack.h +++ b/include/openssl/stack.h @@ -402,6 +402,9 @@ BSSL_NAMESPACE_END * positive warning. */ \ OPENSSL_MSVC_PRAGMA(warning(push)) \ OPENSSL_MSVC_PRAGMA(warning(disable : 4191)) \ + OPENSSL_CLANG_PRAGMA("clang diagnostic push") \ + OPENSSL_CLANG_PRAGMA("clang diagnostic ignored \"-Wunknown-warning-option\"") \ + OPENSSL_CLANG_PRAGMA("clang diagnostic ignored \"-Wcast-function-type-strict\"") \ \ DECLARE_STACK_OF(name) \ \ @@ -537,6 +540,7 @@ BSSL_NAMESPACE_END (OPENSSL_sk_free_func)free_func); \ } \ \ + OPENSSL_CLANG_PRAGMA("clang diagnostic pop") \ OPENSSL_MSVC_PRAGMA(warning(pop)) |