summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick Steinhardt <ps@pks.im>2020-02-07 12:56:26 +0100
committerPatrick Steinhardt <ps@pks.im>2020-02-07 13:08:23 +0100
commitb3b92e099dd267bf2c5b86291eb2b36a6f8f6b3a (patch)
treecb354b4420fec36f851fedd2e4d1614557dd274d
parent7d1b17744a958890cae4648d4b38de2999832d77 (diff)
downloadlibgit2-b3b92e099dd267bf2c5b86291eb2b36a6f8f6b3a.tar.gz
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`.
-rw-r--r--src/streams/openssl.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/streams/openssl.c b/src/streams/openssl.c
index 98a3635af..940fcefea 100644
--- a/src/streams/openssl.c
+++ b/src/streams/openssl.c
@@ -160,7 +160,7 @@ static void openssl_locking_function(
lock = mode & CRYPTO_LOCK;
if (lock) {
- git_mutex_lock(&openssl_locks[n]);
+ (void)git_mutex_lock(&openssl_locks[n]);
} else {
git_mutex_unlock(&openssl_locks[n]);
}