libmicrohttpd

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

commit 7272f8b0bd8e263e511bffeeec162901683b94b3
parent fdc7a08c4feff969d6757a834d8c109442b9ca5d
Author: Evgeny Grin (Karlson2k) <k2k@narod.ru>
Date:   Tue, 12 Sep 2023 15:27:10 +0300

Muted and fixed some compiler warnings

Diffstat:
Msrc/microhttpd/connection.c | 9+++++----
Msrc/microhttpd/digestauth.c | 2+-
Msrc/microhttpd/response.c | 2++
Msrc/tools/perf_replies.c | 3+--
4 files changed, 9 insertions(+), 7 deletions(-)

diff --git a/src/microhttpd/connection.c b/src/microhttpd/connection.c @@ -4273,7 +4273,8 @@ get_request_line_inner (struct MHD_Connection *c) if (is_empty_line) { if ((! skip_unlimited_empty_lines) && - (((skip_several_empty_lines) ? MHD_MAX_EMPTY_LINES_SKIP : 1) < + (((unsigned int) ((skip_several_empty_lines) ? + MHD_MAX_EMPTY_LINES_SKIP : 1)) < c->rq.hdrs.rq_line.skipped_empty_lines)) { connection_close_error (c, @@ -4823,7 +4824,7 @@ send_redirect_fixed_rq_target (struct MHD_Connection *c) static bool process_request_target (struct MHD_Connection *c) { -#if _DEBUG +#ifdef _DEBUG size_t params_len; #endif /* _DEBUG */ mhd_assert (MHD_CONNECTION_REQ_LINE_RECEIVING == c->state); @@ -4849,7 +4850,7 @@ process_request_target (struct MHD_Connection *c) if (NULL != c->rq.hdrs.rq_line.rq_tgt_qmark) { -#if _DEBUG +#ifdef _DEBUG params_len = c->rq.hdrs.rq_line.rq_tgt_len - (size_t) (c->rq.hdrs.rq_line.rq_tgt_qmark - c->rq.hdrs.rq_line.rq_tgt); @@ -4865,7 +4866,7 @@ process_request_target (struct MHD_Connection *c) return false; } } -#if _DEBUG +#ifdef _DEBUG else params_len = 0; #endif /* _DEBUG */ diff --git a/src/microhttpd/digestauth.c b/src/microhttpd/digestauth.c @@ -333,7 +333,7 @@ struct DigestAlgorithm /** * Buffer for hex-print of the final digest. */ -#if _DEBUG +#ifdef _DEBUG bool uninitialised; /**< The structure has been not set-up */ bool algo_selected; /**< The algorithm has been selected */ bool ready_for_hashing; /**< The structure is ready to hash data */ diff --git a/src/microhttpd/response.c b/src/microhttpd/response.c @@ -1933,7 +1933,9 @@ enum MHD_Result MHD_response_execute_upgrade_ (struct MHD_Response *response, struct MHD_Connection *connection) { +#ifdef HTTPS_SUPPORT struct MHD_Daemon *daemon = connection->daemon; +#endif /* HTTPS_SUPPORT */ struct MHD_UpgradeResponseHandle *urh; size_t rbo; diff --git a/src/tools/perf_replies.c b/src/tools/perf_replies.c @@ -1744,8 +1744,7 @@ get_mhd_response_size (void) return "8 KB (medium)"; else if (tool_params.large) return "1 MB (large)"; - abort (); - return ""; + return "!!internal error!!"; }