Skip to content

Commit b3b92e0

Browse files
committed
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`.
1 parent 7d1b177 commit b3b92e0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/streams/openssl.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ static void openssl_locking_function(
160160
lock = mode & CRYPTO_LOCK;
161161

162162
if (lock) {
163-
git_mutex_lock(&openssl_locks[n]);
163+
(void)git_mutex_lock(&openssl_locks[n]);
164164
} else {
165165
git_mutex_unlock(&openssl_locks[n]);
166166
}

0 commit comments

Comments
 (0)