[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[libmicrohttpd] 05/09: microhttpd/tests: muted compiler warnings
From: |
gnunet |
Subject: |
[libmicrohttpd] 05/09: microhttpd/tests: muted compiler warnings |
Date: |
Sat, 01 Oct 2022 14:16:05 +0200 |
This is an automated email from the git hooks/post-receive script.
karlson2k pushed a commit to branch master
in repository libmicrohttpd.
commit b34d7a3e0293cfd3248000bacfc5f5ae52903e21
Author: Evgeny Grin (Karlson2k) <k2k@narod.ru>
AuthorDate: Fri Sep 30 15:29:32 2022 +0300
microhttpd/tests: muted compiler warnings
---
src/microhttpd/test_client_put_stop.c | 6 +++---
src/microhttpd/test_upgrade.c | 8 ++++++--
src/microhttpd/test_upgrade_large.c | 8 ++++++--
3 files changed, 15 insertions(+), 7 deletions(-)
diff --git a/src/microhttpd/test_client_put_stop.c
b/src/microhttpd/test_client_put_stop.c
index 03a9e87c..b4167870 100644
--- a/src/microhttpd/test_client_put_stop.c
+++ b/src/microhttpd/test_client_put_stop.c
@@ -2011,7 +2011,7 @@ static int
testInternalGet (enum testMhdPollType pollType)
{
struct MHD_Daemon *d;
- int d_port = global_port; /* Daemon's port */
+ uint16_t d_port = global_port; /* Daemon's port */
struct ahc_cls_type *ahc_param;
struct check_uri_cls *uri_cb_param;
struct term_notif_cb_param *term_result;
@@ -2027,7 +2027,7 @@ static int
testMultithreadedGet (enum testMhdPollType pollType)
{
struct MHD_Daemon *d;
- int d_port = global_port; /* Daemon's port */
+ uint16_t d_port = global_port; /* Daemon's port */
struct ahc_cls_type *ahc_param;
struct check_uri_cls *uri_cb_param;
struct term_notif_cb_param *term_result;
@@ -2042,7 +2042,7 @@ static int
testMultithreadedPoolGet (enum testMhdPollType pollType)
{
struct MHD_Daemon *d;
- int d_port = global_port; /* Daemon's port */
+ uint16_t d_port = global_port; /* Daemon's port */
struct ahc_cls_type *ahc_param;
struct check_uri_cls *uri_cb_param;
struct term_notif_cb_param *term_result;
diff --git a/src/microhttpd/test_upgrade.c b/src/microhttpd/test_upgrade.c
index 49a17dbe..fb4bdadf 100644
--- a/src/microhttpd/test_upgrade.c
+++ b/src/microhttpd/test_upgrade.c
@@ -1196,8 +1196,12 @@ run_mhd_epoll_loop (struct MHD_Daemon *daemon)
&to64);
if (1000 < to64)
to64 = 1000;
- tv.tv_sec = to64 / 1000;
- tv.tv_usec = 1000 * (to64 % 1000);
+#if ! defined(_WIN32) || defined(__CYGWIN__)
+ tv.tv_sec = (time_t) (to64 / 1000);
+#else /* Native W32 */
+ tv.tv_sec = (long) (to64 / 1000);
+#endif /* Native W32 */
+ tv.tv_usec = (int) (1000 * (to64 % 1000));
ret = select (ep + 1,
&rs,
NULL,
diff --git a/src/microhttpd/test_upgrade_large.c
b/src/microhttpd/test_upgrade_large.c
index 275434c8..2374574e 100644
--- a/src/microhttpd/test_upgrade_large.c
+++ b/src/microhttpd/test_upgrade_large.c
@@ -1382,8 +1382,12 @@ run_mhd_epoll_loop (struct MHD_Daemon *daemon)
&to64);
if (1000 < to64)
to64 = 1000;
- tv.tv_sec = to64 / 1000;
- tv.tv_usec = 1000 * (to64 % 1000);
+#if ! defined(_WIN32) || defined(__CYGWIN__)
+ tv.tv_sec = (time_t) (to64 / 1000);
+#else /* Native W32 */
+ tv.tv_sec = (long) (to64 / 1000);
+#endif /* Native W32 */
+ tv.tv_usec = (int) (1000 * (to64 % 1000));
ret = select (ep + 1,
&rs,
NULL,
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
- [libmicrohttpd] branch master updated (4153c1cd -> 96ff40d7), gnunet, 2022/10/01
- [libmicrohttpd] 04/09: Removed "gauger" server usage from the testsuite, gnunet, 2022/10/01
- [libmicrohttpd] 09/09: test_add_conn: added reasonable limits, gnunet, 2022/10/01
- [libmicrohttpd] 06/09: testcurl: Muted some compiler warnings, minor refactoring, gnunet, 2022/10/01
- [libmicrohttpd] 02/09: Added workarounds for clang with W32 and MinGW incorrect headers, gnunet, 2022/10/01
- [libmicrohttpd] 01/09: muted some compiler warnings for clang, gnunet, 2022/10/01
- [libmicrohttpd] 05/09: microhttpd/tests: muted compiler warnings,
gnunet <=
- [libmicrohttpd] 03/09: Some readability improvements, gnunet, 2022/10/01
- [libmicrohttpd] 07/09: testcurl: fixed functions declarations, gnunet, 2022/10/01
- [libmicrohttpd] 08/09: testcurl: fixed used types and related warnings, gnunet, 2022/10/01