From bedc26167ab5402cf9e4a51afeeeb90ababb9da0 Mon Sep 17 00:00:00 2001 From: erikchen Date: Tue, 1 Mar 2016 18:52:08 -0800 Subject: Suppress the clang warning "-Wdeprecated-declarations" for CSSM API calls. The CSSM API has been deprecated since OSX 10.7, but there is no replacement. BUG=590914 Review URL: https://codereview.chromium.org/1753553002 Cr-Commit-Position: refs/heads/master@{#378668} --- crypto/cssm_init.cc | 7 +++++++ crypto/cssm_init.h | 7 +++++++ 2 files changed, 14 insertions(+) (limited to 'crypto') diff --git a/crypto/cssm_init.cc b/crypto/cssm_init.cc index 6fa585a..e9bef7c 100644 --- a/crypto/cssm_init.cc +++ b/crypto/cssm_init.cc @@ -19,6 +19,11 @@ // - Apple Cryptographic Service Provider Functional Specification // - CryptoSample: http://developer.apple.com/SampleCode/CryptoSample/ +// CSSM functions are deprecated as of OSX 10.7, but have no replacement. +// https://bugs.chromium.org/p/chromium/issues/detail?id=590914#c1 +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wdeprecated-declarations" + namespace { void* CSSMMalloc(CSSM_SIZE size, void* alloc_ref) { @@ -203,3 +208,5 @@ ScopedCSSMData::~ScopedCSSMData() { } } // namespace crypto + +#pragma clang diagnostic pop // "-Wdeprecated-declarations" diff --git a/crypto/cssm_init.h b/crypto/cssm_init.h index 3eece1b..a4da34a 100644 --- a/crypto/cssm_init.h +++ b/crypto/cssm_init.h @@ -12,6 +12,11 @@ namespace crypto { +// CSSM functions are deprecated as of OSX 10.7, but have no replacement. +// https://bugs.chromium.org/p/chromium/issues/detail?id=590914#c1 +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wdeprecated-declarations" + // Initialize CSSM if it isn't already initialized. This must be called before // any other CSSM functions. This function is thread-safe, and CSSM will only // ever be initialized once. CSSM will be properly shut down on program exit. @@ -55,6 +60,8 @@ class ScopedCSSMData { DISALLOW_COPY_AND_ASSIGN(ScopedCSSMData); }; +#pragma clang diagnostic pop // "-Wdeprecated-declarations" + } // namespace crypto #endif // CRYPTO_CSSM_INIT_H_ -- cgit v1.1