commit 1a5063138a7bed40f07b239b3ec833426b9150e3
parent 1047464378c977967848bc54c6aee872385f1616
Author: Evgeny Grin <k2k@drgrin.dev>
Date: Wed, 30 Apr 2025 19:28:36 +0300
Muted compiler warnings
Diffstat:
4 files changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/mhd2/conn_data_send.c b/src/mhd2/conn_data_send.c
@@ -238,6 +238,7 @@ mhd_conn_data_send (struct MHD_Connection *restrict c)
else
{
mhd_assert (0 && "Should be unreachable");
+ sent = 0; /* Mute compiler warning */
res = mhd_SOCKET_ERR_INTERNAL;
}
diff --git a/src/mhd2/daemon_start.c b/src/mhd2/daemon_start.c
@@ -1718,6 +1718,8 @@ daemon_deinit_tls (struct MHD_Daemon *restrict d)
#ifdef MHD_SUPPORT_HTTPS
if (NULL != d->tls)
mhd_tls_daemon_deinit (d->tls);
+#elif defined(NDEBUG)
+ (void) d; /* Mute compiler warning */
#endif
}
diff --git a/src/mhd2/events_process.c b/src/mhd2/events_process.c
@@ -1846,6 +1846,7 @@ process_listening_and_itc_only (struct MHD_Daemon *restrict d)
#endif /* MHD_SUPPORT_POLL */
else
{
+ (void) d; /* Mute compiler warning */
mhd_assert (0 && "Impossible value");
mhd_UNREACHABLE ();
MHD_PANIC ("Daemon data integrity broken");
diff --git a/src/mhd2/response_auth_digest.c b/src/mhd2/response_auth_digest.c
@@ -165,7 +165,10 @@ response_add_auth_digest_challenge_alg (
algo_str = algo_sha512_256_str;
#endif
else
- mhd_UNREACHABLE ();
+ {
+ mhd_UNREACHABLE();
+ algo_str = empty_str; /* Mute compiler warning */
+ }
/* ** Calculate the maximum length of the header string ** */
hdr_maxlen = 0;