libmicrohttpd

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

commit 6ab9cb0c8a90fbb15b5dfbb51a83c44bb6d42ea6
parent e583a3430f9677eb6e188e97fd41f7c6d7bd329f
Author: Evgeny Grin (Karlson2k) <k2k@narod.ru>
Date:   Thu,  2 Jun 2022 17:28:39 +0300

Muted compiler warnings for W32 non-TLS build of the lib

Diffstat:
Msrc/include/autoinit_funcs.h | 5+++--
Msrc/microhttpd/daemon.c | 3+++
Msrc/microhttpd/gen_auth.c | 3+++
Msrc/microhttpd/mhd_send.c | 5+++--
Msrc/microhttpd/mhd_threads.c | 3++-
5 files changed, 14 insertions(+), 5 deletions(-)

diff --git a/src/include/autoinit_funcs.h b/src/include/autoinit_funcs.h @@ -67,7 +67,7 @@ * Current version of the header in packed BCD form. * 0x01093001 = 1.9.30-1. */ -#define AUTOINIT_FUNCS_VERSION 0x01000400 +#define AUTOINIT_FUNCS_VERSION 0x01000500 #if defined(__GNUC__) || defined(__clang__) /* if possible - check for supported attribute */ @@ -221,7 +221,8 @@ #define W32_SET_INIT_AND_DEINIT(FI,FD) \ BOOL WINAPI DllMain (HINSTANCE hinst,DWORD reason,LPVOID unused); \ BOOL WINAPI DllMain (HINSTANCE hinst,DWORD reason,LPVOID unused) \ - { if (DLL_PROCESS_ATTACH==reason) {(void) (FI) ();} \ + { (void) hinst; (void) unused; \ + if (DLL_PROCESS_ATTACH==reason) {(void) (FI) ();} \ else if (DLL_PROCESS_DETACH==reason) {(void) (FD) ();} \ return TRUE; \ } struct _W32_dummy_strc_ ## FI {int i;} diff --git a/src/microhttpd/daemon.c b/src/microhttpd/daemon.c @@ -2676,8 +2676,11 @@ new_connection_prepare_ (struct MHD_Daemon *daemon, free (connection->addr); free (connection); MHD_PANIC (_ ("TLS connection on non-TLS daemon.\n")); +#if 0 + /* Unreachable code */ eno = EINVAL; return NULL; +#endif #endif /* ! HTTPS_SUPPORT */ } diff --git a/src/microhttpd/gen_auth.c b/src/microhttpd/gen_auth.c @@ -298,7 +298,10 @@ parse_dauth_params (const char *str, param_str = buf; } else + { param_len = 0; + param_str = NULL; /* Actually not used */ + } } if ((param_len == 4) && MHD_str_equal_caseless_bin_n_ (param_str, "true", 4)) diff --git a/src/microhttpd/mhd_send.c b/src/microhttpd/mhd_send.c @@ -822,8 +822,9 @@ MHD_send_data_ (struct MHD_Connection *connection, * sent amount smaller than provided amount, as TLS * connections may break data into smaller parts for sending. */ #endif /* EPOLL_SUPPORT */ -#endif /* HTTPS_SUPPORT */ - (void) 0; /* Mute compiler warning for non-TLS builds. */ +#else /* ! HTTPS_SUPPORT */ + ret = MHD_ERR_NOTCONN_; +#endif /* ! HTTPS_SUPPORT */ } else { diff --git a/src/microhttpd/mhd_threads.c b/src/microhttpd/mhd_threads.c @@ -163,7 +163,8 @@ MHD_set_thread_name_ (const MHD_thread_ID_ thread_id, * @param n name to set * @return non-zero on success, zero otherwise */ -#define MHD_set_cur_thread_name_(n) MHD_set_thread_name_ (-1,(n)) +#define MHD_set_cur_thread_name_(n) \ + MHD_set_thread_name_ ((MHD_thread_ID_) -1,(n)) #endif /* _MSC_FULL_VER */ #endif /* MHD_USE_W32_THREADS */