Commit b3b92e09 by Patrick Steinhardt

streams: openssl: ignore return value of `git_mutex_lock`

OpenSSL pre-v1.1 required us to set up a locking function to properly
support multithreading. The locking function signature cannot return any
error codes, and as a result we can't do anything if `git_mutex_lock`
fails. To silence static analysis tools, let's just explicitly ignore
its return value by casting it to `void`.
parent 7d1b1774
...@@ -160,7 +160,7 @@ static void openssl_locking_function( ...@@ -160,7 +160,7 @@ static void openssl_locking_function(
lock = mode & CRYPTO_LOCK; lock = mode & CRYPTO_LOCK;
if (lock) { if (lock) {
git_mutex_lock(&openssl_locks[n]); (void)git_mutex_lock(&openssl_locks[n]);
} else { } else {
git_mutex_unlock(&openssl_locks[n]); git_mutex_unlock(&openssl_locks[n]);
} }
......
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