aboutsummaryrefslogtreecommitdiff
path: root/src/common/Cryptography
diff options
context:
space:
mode:
authorShauren <shauren.trinity@gmail.com>2018-12-09 16:07:38 +0100
committerShauren <shauren.trinity@gmail.com>2018-12-09 16:07:38 +0100
commite9bcae1fada64bc3400c3204f7365edcecd640cc (patch)
tree2663fbf345436155abd2687415aadd9afe892144 /src/common/Cryptography
parent07636dc9af99faf3b354e18c1bca5f6ebe84931f (diff)
Core/Misc: Fixed nopch and clang 6.0 warnings
Diffstat (limited to 'src/common/Cryptography')
-rw-r--r--src/common/Cryptography/OpenSSLCrypto.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/common/Cryptography/OpenSSLCrypto.cpp b/src/common/Cryptography/OpenSSLCrypto.cpp
index cb1cf17c1c6..0ffcb17d61a 100644
--- a/src/common/Cryptography/OpenSSLCrypto.cpp
+++ b/src/common/Cryptography/OpenSSLCrypto.cpp
@@ -33,6 +33,7 @@ static void lockingCallback(int mode, int type, const char* /*file*/, int /*line
static void threadIdCallback(CRYPTO_THREADID * id)
{
+ (void)id;
CRYPTO_THREADID_set_numeric(id, std::hash<std::thread::id>()(std::this_thread::get_id()));
}
@@ -41,9 +42,13 @@ void OpenSSLCrypto::threadsSetup()
cryptoLocks.resize(CRYPTO_num_locks());
for(int i = 0 ; i < CRYPTO_num_locks(); ++i)
{
- cryptoLocks[i] = new std::mutex;
+ cryptoLocks[i] = new std::mutex();
}
+
+ (void)&threadIdCallback;
CRYPTO_THREADID_set_callback(threadIdCallback);
+
+ (void)&lockingCallback;
CRYPTO_set_locking_callback(lockingCallback);
}