libmicrohttpd

HTTP/1.x server C library (MHD 1.x, stable)
Log | Files | Refs | Submodules | README | LICENSE

commit 74c2eba238ff26788eae3afac68307f49a82099b
parent 1b8c52f1d0ed637c2a027a5ad86ad497ede8c527
Author: Evgeny Grin (Karlson2k) <k2k@narod.ru>
Date:   Wed,  1 Jun 2022 09:51:08 +0300

connection: muted compiler warning

Diffstat:
Msrc/microhttpd/connection.c | 16++++++++++++----
1 file changed, 12 insertions(+), 4 deletions(-)

diff --git a/src/microhttpd/connection.c b/src/microhttpd/connection.c @@ -5329,14 +5329,22 @@ MHD_get_connection_info (struct MHD_Connection *connection, case MHD_CONNECTION_INFO_CIPHER_ALGO: if (NULL == connection->tls_session) return NULL; - connection->connection_info_dummy.cipher_algorithm = - (int) gnutls_cipher_get (connection->tls_session); + if (1) + { /* Workaround to mute compiler warning */ + gnutls_cipher_algorithm_t res; + res = gnutls_cipher_get (connection->tls_session); + connection->connection_info_dummy.cipher_algorithm = (int) res; + } return &connection->connection_info_dummy; case MHD_CONNECTION_INFO_PROTOCOL: if (NULL == connection->tls_session) return NULL; - connection->connection_info_dummy.protocol = - (int) gnutls_protocol_get_version (connection->tls_session); + if (1) + { /* Workaround to mute compiler warning */ + gnutls_protocol_t res; + res = gnutls_protocol_get_version (connection->tls_session); + connection->connection_info_dummy.protocol = (int) res; + } return &connection->connection_info_dummy; case MHD_CONNECTION_INFO_GNUTLS_SESSION: if (NULL == connection->tls_session)