Commit 7a06e2f4 authored by Yedidya Feldblum's avatar Yedidya Feldblum Committed by Facebook GitHub Bot

suppress lint-time diagnostics in OpenSSLThreadding.cpp

Differential Revision: D29089239

fbshipit-source-id: 83cbe9d74d8f7f648e18b8ce1e3e13ca8cb33006
parent b805d853
...@@ -30,6 +30,7 @@ ...@@ -30,6 +30,7 @@
// here. See portability/openssl.h. // here. See portability/openssl.h.
// clang-format off // clang-format off
#include <folly/portability/Windows.h> #include <folly/portability/Windows.h>
// @lint-ignore CLANGTIDY
#include <openssl/crypto.h> #include <openssl/crypto.h>
// clang-format on // clang-format on
...@@ -41,6 +42,7 @@ ...@@ -41,6 +42,7 @@
// OpenSSL requires us to provide the implementation of CRYPTO_dynlock_value // OpenSSL requires us to provide the implementation of CRYPTO_dynlock_value
// so it must be done in the global namespace. // so it must be done in the global namespace.
// @lint-ignore CLANGTIDY
struct CRYPTO_dynlock_value { struct CRYPTO_dynlock_value {
std::mutex mutex; std::mutex mutex;
}; };
...@@ -71,10 +73,10 @@ bool isSSLLockDisabled(int lockId) { ...@@ -71,10 +73,10 @@ bool isSSLLockDisabled(int lockId) {
namespace { namespace {
struct SSLLock { struct SSLLock {
explicit SSLLock(LockType inLockType = LockType::MUTEX) FOLLY_MAYBE_UNUSED explicit SSLLock(LockType inLockType = LockType::MUTEX)
: lockType(inLockType) {} : lockType(inLockType) {}
void lock(bool read) { FOLLY_MAYBE_UNUSED void lock(bool read) {
if (lockType == LockType::MUTEX) { if (lockType == LockType::MUTEX) {
mutex.lock(); mutex.lock();
} else if (lockType == LockType::SPINLOCK) { } else if (lockType == LockType::SPINLOCK) {
...@@ -89,7 +91,7 @@ struct SSLLock { ...@@ -89,7 +91,7 @@ struct SSLLock {
// lockType == LOCK_NONE, no-op // lockType == LOCK_NONE, no-op
} }
void unlock(bool read) { FOLLY_MAYBE_UNUSED void unlock(bool read) {
if (lockType == LockType::MUTEX) { if (lockType == LockType::MUTEX) {
mutex.unlock(); mutex.unlock();
} else if (lockType == LockType::SPINLOCK) { } else if (lockType == LockType::SPINLOCK) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment