[nginx] SSL: silenced GCC warnings when building with BoringSSL.

Sergey Kandaurov pluknet at nginx.com
Thu Sep 8 11:31:20 UTC 2022


details:   https://hg.nginx.org/nginx/rev/ba5cf8f73a2d
branches:  
changeset: 8070:ba5cf8f73a2d
user:      Sergey Kandaurov <pluknet at nginx.com>
date:      Thu Sep 08 13:53:49 2022 +0400
description:
SSL: silenced GCC warnings when building with BoringSSL.

BoringSSL uses macro stub for SSL_CTX_set_ecdh_auto that expands to 1,
which triggers -Wunused-value "statement with no effect" warnings.

diffstat:

 src/event/ngx_event_openssl.c |  2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diffs (12 lines):

diff -r a423e314c22f -r ba5cf8f73a2d src/event/ngx_event_openssl.c
--- a/src/event/ngx_event_openssl.c	Wed Sep 07 00:47:31 2022 +0300
+++ b/src/event/ngx_event_openssl.c	Thu Sep 08 13:53:49 2022 +0400
@@ -1428,7 +1428,7 @@ ngx_ssl_ecdh_curve(ngx_conf_t *cf, ngx_s
 
 #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) {



More information about the nginx-devel mailing list