diff options
author | Sam Hartman <hartmans@debian.org> | 2017-08-12 10:15:50 -0400 |
---|---|---|
committer | Sam Hartman <hartmans@debian.org> | 2017-08-12 10:22:21 -0400 |
commit | 9406b0adb1349ecdbded51b9081e3aba60d9f710 (patch) | |
tree | 187bca6b4faa298669285964244edca1d3ed6e35 | |
parent | 38b6e62c6c8eb8bb40ba018a7cc995319e8817c0 (diff) |
Permit the ssl locking callback to be unused
Sufficiently modern ssl does not need a locking callback so
crypto_set_locking_cb is a no-op. That leads to the locking callback
being an unused static function. Let gcc know this is OK.
-rw-r--r-- | tls.c | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -7,6 +7,7 @@ #include <stdlib.h> #include <unistd.h> +#include <string.h> #include <assert.h> #include <fcntl.h> #include <limits.h> @@ -194,8 +195,8 @@ static pthread_mutex_t *s_openssl_mutexes = NULL; static int s_openssl_mutexes_count = 0; /** Callback for OpenSSL when a lock is to be held or released. */ -static void -openssl_locking_cb_ (int mode, int i, const char *file, int line) +__attribute__((unused)) static void +openssl_locking_cb_ (int mode, int i, const char *file, int line) { if (s_openssl_mutexes == NULL || i >= s_openssl_mutexes_count) return; |