]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUILD/MINOR: ssl: fix compiler warning about useless statement
authorEric Salama <esalama@haproxy.com>
Wed, 20 Nov 2019 10:33:40 +0000 (11:33 +0100)
committerWilly Tarreau <w@1wt.eu>
Wed, 20 Nov 2019 12:49:21 +0000 (13:49 +0100)
There is a compiler warning after commit a9363eb6 ("BUG/MEDIUM: ssl:
'tune.ssl.default-dh-param' value ignored with openssl > 1.1.1"):

src/ssl_sock.c: In function 'ssl_sock_prepare_ctx':
src/ssl_sock.c:4481:4: error: statement with no effect [-Werror=unused-value]

Fix it by adding a (void)

src/ssl_sock.c

index 6e2f8925985c6075d1d55b775d8336bd370ca6da..4fa6c4f8e3be33821bd7363c9aead2f03d8847e4 100644 (file)
@@ -5041,7 +5041,7 @@ int ssl_sock_prepare_ctx(struct bind_conf *bind_conf, struct ssl_bind_conf *ssl_
                         NULL);
 
                if (ecdhe == NULL) {
-                       SSL_CTX_set_ecdh_auto(ctx, 1);
+                       (void)SSL_CTX_set_ecdh_auto(ctx, 1);
                        return cfgerr;
                }
 #else