diff options
author | Evgeny Grin (Karlson2k) <k2k@narod.ru> | 2022-06-01 09:51:08 +0300 |
---|---|---|
committer | Evgeny Grin (Karlson2k) <k2k@narod.ru> | 2022-06-01 09:51:08 +0300 |
commit | 74c2eba238ff26788eae3afac68307f49a82099b (patch) | |
tree | 49b724e717529a56c0fd536ae23cc2c661bb966c | |
parent | 1b8c52f1d0ed637c2a027a5ad86ad497ede8c527 (diff) | |
download | libmicrohttpd-74c2eba238ff26788eae3afac68307f49a82099b.tar.gz libmicrohttpd-74c2eba238ff26788eae3afac68307f49a82099b.zip |
connection: muted compiler warning
-rw-r--r-- | src/microhttpd/connection.c | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/src/microhttpd/connection.c b/src/microhttpd/connection.c index d74535cf..8e780811 100644 --- a/src/microhttpd/connection.c +++ b/src/microhttpd/connection.c | |||
@@ -5329,14 +5329,22 @@ MHD_get_connection_info (struct MHD_Connection *connection, | |||
5329 | case MHD_CONNECTION_INFO_CIPHER_ALGO: | 5329 | case MHD_CONNECTION_INFO_CIPHER_ALGO: |
5330 | if (NULL == connection->tls_session) | 5330 | if (NULL == connection->tls_session) |
5331 | return NULL; | 5331 | return NULL; |
5332 | connection->connection_info_dummy.cipher_algorithm = | 5332 | if (1) |
5333 | (int) gnutls_cipher_get (connection->tls_session); | 5333 | { /* Workaround to mute compiler warning */ |
5334 | gnutls_cipher_algorithm_t res; | ||
5335 | res = gnutls_cipher_get (connection->tls_session); | ||
5336 | connection->connection_info_dummy.cipher_algorithm = (int) res; | ||
5337 | } | ||
5334 | return &connection->connection_info_dummy; | 5338 | return &connection->connection_info_dummy; |
5335 | case MHD_CONNECTION_INFO_PROTOCOL: | 5339 | case MHD_CONNECTION_INFO_PROTOCOL: |
5336 | if (NULL == connection->tls_session) | 5340 | if (NULL == connection->tls_session) |
5337 | return NULL; | 5341 | return NULL; |
5338 | connection->connection_info_dummy.protocol = | 5342 | if (1) |
5339 | (int) gnutls_protocol_get_version (connection->tls_session); | 5343 | { /* Workaround to mute compiler warning */ |
5344 | gnutls_protocol_t res; | ||
5345 | res = gnutls_protocol_get_version (connection->tls_session); | ||
5346 | connection->connection_info_dummy.protocol = (int) res; | ||
5347 | } | ||
5340 | return &connection->connection_info_dummy; | 5348 | return &connection->connection_info_dummy; |
5341 | case MHD_CONNECTION_INFO_GNUTLS_SESSION: | 5349 | case MHD_CONNECTION_INFO_GNUTLS_SESSION: |
5342 | if (NULL == connection->tls_session) | 5350 | if (NULL == connection->tls_session) |