]> granicus.if.org Git - php/commitdiff
Avoid curl ssl callback warnings with OpenSSL 1.1
authorNikita Popov <nikita.ppv@gmail.com>
Thu, 11 Apr 2019 10:56:42 +0000 (12:56 +0200)
committerNikita Popov <nikita.ppv@gmail.com>
Thu, 11 Apr 2019 12:14:21 +0000 (14:14 +0200)
ext/curl/interface.c

index bbdcdbfbe7d72f42e8ef3766bfe75a10d554fa05..8959bc10043134d468f9a54ef3157f79071255bf 100644 (file)
@@ -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();
 }