From: Nikita Popov Date: Thu, 11 Apr 2019 10:56:42 +0000 (+0200) Subject: Avoid curl ssl callback warnings with OpenSSL 1.1 X-Git-Tag: php-7.4.0alpha1~553 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=539a16fdb8a195544656c09282484445af8fe161;p=php Avoid curl ssl callback warnings with OpenSSL 1.1 --- diff --git a/ext/curl/interface.c b/ext/curl/interface.c index bbdcdbfbe7..8959bc1004 100644 --- a/ext/curl/interface.c +++ b/ext/curl/interface.c @@ -93,7 +93,9 @@ int le_curl_share_handle; #ifdef PHP_CURL_NEED_OPENSSL_TSL /* {{{ */ static MUTEX_T *php_curl_openssl_tsl = NULL; -static void php_curl_ssl_lock(int mode, int n, const char * file, int line) +/* Locking callbacks are no longer used since OpenSSL 1.1. Mark the functions as unused to + * avoid warnings due to this. */ +static ZEND_ATTRIBUTE_UNUSED void php_curl_ssl_lock(int mode, int n, const char * file, int line) { if (mode & CRYPTO_LOCK) { tsrm_mutex_lock(php_curl_openssl_tsl[n]); @@ -102,7 +104,7 @@ static void php_curl_ssl_lock(int mode, int n, const char * file, int line) } } -static unsigned long php_curl_ssl_id(void) +static ZEND_ATTRIBUTE_UNUSED unsigned long php_curl_ssl_id(void) { return (unsigned long) tsrm_thread_id(); }