commit b34d7a3e0293cfd3248000bacfc5f5ae52903e21
parent 3f98c6092dcdd1e0f59a78d872425e4637896d28
Author: Evgeny Grin (Karlson2k) <k2k@narod.ru>
Date: Fri, 30 Sep 2022 15:29:32 +0300
microhttpd/tests: muted compiler warnings
Diffstat:
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
@@ -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
@@ -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
@@ -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,