path: root/tls.c
diff options
authorSam Hartman <>2017-08-12 10:15:50 -0400
committerSam Hartman <>2017-08-12 10:22:21 -0400
commit9406b0adb1349ecdbded51b9081e3aba60d9f710 (patch)
tree187bca6b4faa298669285964244edca1d3ed6e35 /tls.c
parent38b6e62c6c8eb8bb40ba018a7cc995319e8817c0 (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.
Diffstat (limited to 'tls.c')
1 files changed, 3 insertions, 2 deletions
diff --git a/tls.c b/tls.c
index ba3cab5..7b33d8e 100644
--- a/tls.c
+++ b/tls.c
@@ -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)