]> git.kaiwu.me - nginx.git/commitdiff
SSL: silenced GCC warnings when building with BoringSSL.
authorSergey Kandaurov <pluknet@nginx.com>
Thu, 8 Sep 2022 09:53:49 +0000 (13:53 +0400)
committerSergey Kandaurov <pluknet@nginx.com>
Thu, 8 Sep 2022 09:53:49 +0000 (13:53 +0400)
BoringSSL uses macro stub for SSL_CTX_set_ecdh_auto that expands to 1,
which triggers -Wunused-value "statement with no effect" warnings.

src/event/ngx_event_openssl.c

index 66f418a58efc6eb3901b709ca1c51669d0454459..085ec553034d4b8dc00746cb795334e87adeb890 100644 (file)
@@ -1428,7 +1428,7 @@ ngx_ssl_ecdh_curve(ngx_conf_t *cf, ngx_ssl_t *ssl, ngx_str_t *name)
 
 #ifdef SSL_CTRL_SET_ECDH_AUTO
     /* not needed in OpenSSL 1.1.0+ */
-    SSL_CTX_set_ecdh_auto(ssl->ctx, 1);
+    (void) SSL_CTX_set_ecdh_auto(ssl->ctx, 1);
 #endif
 
     if (ngx_strcmp(name->data, "auto") == 0) {