[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[libmicrohttpd] 02/02: Muted compiler warnings for W32 non-TLS build of
From: |
gnunet |
Subject: |
[libmicrohttpd] 02/02: Muted compiler warnings for W32 non-TLS build of the lib |
Date: |
Thu, 02 Jun 2022 16:29:24 +0200 |
This is an automated email from the git hooks/post-receive script.
karlson2k pushed a commit to branch master
in repository libmicrohttpd.
commit 6ab9cb0c8a90fbb15b5dfbb51a83c44bb6d42ea6
Author: Evgeny Grin (Karlson2k) <k2k@narod.ru>
AuthorDate: Thu Jun 2 17:28:39 2022 +0300
Muted compiler warnings for W32 non-TLS build of the lib
---
src/include/autoinit_funcs.h | 5 +++--
src/microhttpd/daemon.c | 3 +++
src/microhttpd/gen_auth.c | 3 +++
src/microhttpd/mhd_send.c | 5 +++--
src/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
index adf66460..1636db7f 100644
--- 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
index 6ac948d9..faa6d3e9 100644
--- 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
index e993fb20..0246a114 100644
--- 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
index e632406e..ae763b9b 100644
--- 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
index 628a628f..95fc70a6 100644
--- 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 */
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.