[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[libmicrohttpd] branch master updated: Fixed and/or muted compiler warni
From: |
gnunet |
Subject: |
[libmicrohttpd] branch master updated: Fixed and/or muted compiler warnings |
Date: |
Mon, 29 Jan 2024 23:16:39 +0100 |
This is an automated email from the git hooks/post-receive script.
karlson2k pushed a commit to branch master
in repository libmicrohttpd.
The following commit(s) were added to refs/heads/master by this push:
new c01b043f Fixed and/or muted compiler warnings
c01b043f is described below
commit c01b043ff9585cf201bae0b7f732d3972cb1945f
Author: Evgeny Grin (Karlson2k) <k2k@narod.ru>
AuthorDate: Mon Jan 29 23:16:14 2024 +0100
Fixed and/or muted compiler warnings
---
src/microhttpd/daemon.c | 7 ++++++-
src/microhttpd/test_upgrade.c | 5 +++--
src/testcurl/https/test_https_multi_daemon.c | 4 ++--
src/testcurl/https/test_https_sni.c | 2 +-
src/testcurl/https/tls_test_common.h | 4 ++--
src/testcurl/mhd_has_in_name.h | 4 ++--
src/testcurl/perf_get_concurrent.c | 4 +---
src/testcurl/test_get_close_keep_alive.c | 4 ++--
8 files changed, 19 insertions(+), 15 deletions(-)
diff --git a/src/microhttpd/daemon.c b/src/microhttpd/daemon.c
index d6b6401c..567ec933 100644
--- a/src/microhttpd/daemon.c
+++ b/src/microhttpd/daemon.c
@@ -2780,7 +2780,8 @@ new_connection_prepare_ (struct MHD_Daemon *daemon,
(int) (client_socket));
#else /* GnuTLS before 3.1.9 or Win x64 */
gnutls_transport_set_ptr (connection->tls_session,
- (gnutls_transport_ptr_t) (intptr_t)
(client_socket));
+ (gnutls_transport_ptr_t) \
+ (intptr_t) client_socket);
#endif /* GnuTLS before 3.1.9 or Win x64 */
#ifdef MHD_TLSLIB_NEED_PUSH_FUNC
gnutls_transport_set_push_function (connection->tls_session,
@@ -6358,6 +6359,8 @@ daemon_tls_priorities_init_default (struct MHD_Daemon
*daemon)
mhd_assert (MHD_TLS_PRIO_BASE_NORMAL + 1 == \
sizeof(MHD_TlsBasePriotities) /
sizeof(MHD_TlsBasePriotities[0]));
+ res = GNUTLS_E_SUCCESS; /* Mute compiler warning */
+
for (p = 0;
p < sizeof(MHD_TlsBasePriotities) / sizeof(MHD_TlsBasePriotities[0]);
++p)
@@ -6436,6 +6439,8 @@ daemon_tls_priorities_init_append_inner_ (struct
MHD_Daemon *daemon,
mhd_assert (MHD_TLS_PRIO_BASE_NORMAL + 1 == \
sizeof(MHD_TlsBasePriotities) /
sizeof(MHD_TlsBasePriotities[0]));
+ res = GNUTLS_E_SUCCESS; /* Mute compiler warning */
+
for (p = 0;
p < sizeof(MHD_TlsBasePriotities) / sizeof(MHD_TlsBasePriotities[0]);
++p)
diff --git a/src/microhttpd/test_upgrade.c b/src/microhttpd/test_upgrade.c
index fe39f5cf..4b9e5b8f 100644
--- a/src/microhttpd/test_upgrade.c
+++ b/src/microhttpd/test_upgrade.c
@@ -512,7 +512,8 @@ wr_create_tls_sckt (void)
gnutls_transport_set_int (s->tls_s, (int) (s->fd));
#else /* GnuTLS before 3.1.9 or Win x64 */
gnutls_transport_set_ptr (s->tls_s,
- (gnutls_transport_ptr_t) (intptr_t)
(s->fd));
+ (gnutls_transport_ptr_t) \
+ (intptr_t) (s->fd));
#endif /* GnuTLS before 3.1.9 or Win x64 */
return s;
}
@@ -2120,7 +2121,7 @@ global_test_init (void)
rclient_msg_size = MHD_STATICSTR_LEN_ ("Hello");
rclient_msg = "Hello";
- app_msg_size = MHD_STATICSTR_LEN_ ("World");;
+ app_msg_size = MHD_STATICSTR_LEN_ ("World");
app_msg = "World";
}
return true;
diff --git a/src/testcurl/https/test_https_multi_daemon.c
b/src/testcurl/https/test_https_multi_daemon.c
index b7b9b065..9719d13e 100644
--- a/src/testcurl/https/test_https_multi_daemon.c
+++ b/src/testcurl/https/test_https_multi_daemon.c
@@ -84,7 +84,7 @@ test_concurent_daemon_pair (void *cls,
MHD_stop_daemon (d1);
return 1;
}
- port1 = (int) dinfo->port;
+ port1 = dinfo->port;
}
d2 = MHD_start_daemon (MHD_USE_THREAD_PER_CONNECTION
@@ -112,7 +112,7 @@ test_concurent_daemon_pair (void *cls,
MHD_stop_daemon (d2);
return 1;
}
- port2 = (int) dinfo->port;
+ port2 = dinfo->port;
}
res =
diff --git a/src/testcurl/https/test_https_sni.c
b/src/testcurl/https/test_https_sni.c
index c4e94007..3d595473 100644
--- a/src/testcurl/https/test_https_sni.c
+++ b/src/testcurl/https/test_https_sni.c
@@ -235,7 +235,7 @@ do_get (const char *url, uint16_t port)
curl_easy_cleanup (c);
free (cbc.buf);
curl_slist_free_all (dns_info);
- return errornum;
+ return -1;
}
curl_easy_cleanup (c);
diff --git a/src/testcurl/https/tls_test_common.h
b/src/testcurl/https/tls_test_common.h
index 998467f4..010f6a55 100644
--- a/src/testcurl/https/tls_test_common.h
+++ b/src/testcurl/https/tls_test_common.h
@@ -232,8 +232,8 @@ int testsuite_curl_global_init (void);
* @param prog_name program name, may include path
* @param marker marker to look for.
* @return zero if any parameter is NULL or empty string or
- * @prog_name ends with slash or @marker is not found in
- * program name, non-zero if @maker is found in program
+ * @a prog_name ends with slash or @a marker is not found in
+ * program name, non-zero if @a maker is found in program
* name.
*/
int
diff --git a/src/testcurl/mhd_has_in_name.h b/src/testcurl/mhd_has_in_name.h
index 3be50b8a..31a428f9 100644
--- a/src/testcurl/mhd_has_in_name.h
+++ b/src/testcurl/mhd_has_in_name.h
@@ -34,8 +34,8 @@
* @param prog_name program name, may include path
* @param marker marker to look for.
* @return zero if any parameter is NULL or empty string or
- * @prog_name ends with slash or @marker is not found in
- * program name, non-zero if @maker is found in program
+ * @a prog_name ends with slash or @a marker is not found in
+ * program name, non-zero if @a maker is found in program
* name.
*/
static int
diff --git a/src/testcurl/perf_get_concurrent.c
b/src/testcurl/perf_get_concurrent.c
index f4728ff4..12d12e86 100644
--- a/src/testcurl/perf_get_concurrent.c
+++ b/src/testcurl/perf_get_concurrent.c
@@ -412,7 +412,6 @@ testExternalGet (uint16_t port)
MHD_socket max;
struct timeval tv;
uint64_t tt64;
- int tret;
char *ret_val;
int ret = 0;
@@ -455,8 +454,7 @@ testExternalGet (uint16_t port)
MHD_stop_daemon (d);
return 4096;
}
- tret = MHD_get_timeout64 (d, &tt64);
- if (MHD_YES != tret)
+ if (MHD_NO == MHD_get_timeout64 (d, &tt64))
tt64 = 1;
#if ! defined(_WIN32) || defined(__CYGWIN__)
tv.tv_sec = (time_t) (tt64 / 1000);
diff --git a/src/testcurl/test_get_close_keep_alive.c
b/src/testcurl/test_get_close_keep_alive.c
index b84e9640..9836eb01 100644
--- a/src/testcurl/test_get_close_keep_alive.c
+++ b/src/testcurl/test_get_close_keep_alive.c
@@ -108,7 +108,7 @@
#endif
-static void
+_MHD_NORETURN static void
_externalErrorExit_func (const char *errDesc, const char *funcName, int
lineNum)
{
if ((NULL != errDesc) && (0 != errDesc[0]))
@@ -132,7 +132,7 @@ _externalErrorExit_func (const char *errDesc, const char
*funcName, int lineNum)
static char libcurl_errbuf[CURL_ERROR_SIZE] = "";
-static void
+_MHD_NORETURN static void
_libcurlErrorExit_func (const char *errDesc, const char *funcName, int lineNum)
{
if ((NULL != errDesc) && (0 != errDesc[0]))
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [libmicrohttpd] branch master updated: Fixed and/or muted compiler warnings,
gnunet <=