commit 9668d71f4496fba7d80e34792b8e732f36a08a3f
parent 7d7085b627eea92447307e15d6195d0c6c64bd27
Author: Evgeny Grin (Karlson2k) <k2k@narod.ru>
Date: Mon, 13 Jun 2022 21:27:51 +0300
test_start_stop: fixed compiler warnings
Diffstat:
1 file changed, 13 insertions(+), 13 deletions(-)
diff --git a/src/microhttpd/test_start_stop.c b/src/microhttpd/test_start_stop.c
@@ -53,14 +53,14 @@ ahc_echo (void *cls,
#if defined(MHD_USE_POSIX_THREADS) || defined(MHD_USE_W32_THREADS)
-static int
-testInternalGet (int poll_flag)
+static unsigned int
+testInternalGet (unsigned int poll_flag)
{
struct MHD_Daemon *d;
d = MHD_start_daemon (MHD_USE_INTERNAL_POLLING_THREAD | MHD_USE_ERROR_LOG
| poll_flag,
- 0, NULL, NULL, &ahc_echo, "GET", MHD_OPTION_END);
+ 0, NULL, NULL, &ahc_echo, NULL, MHD_OPTION_END);
if (d == NULL)
return 1;
MHD_stop_daemon (d);
@@ -68,15 +68,15 @@ testInternalGet (int poll_flag)
}
-static int
-testMultithreadedGet (int poll_flag)
+static unsigned int
+testMultithreadedGet (unsigned int poll_flag)
{
struct MHD_Daemon *d;
d = MHD_start_daemon (MHD_USE_THREAD_PER_CONNECTION
| MHD_USE_INTERNAL_POLLING_THREAD | MHD_USE_ERROR_LOG
| poll_flag,
- 0, NULL, NULL, &ahc_echo, "GET", MHD_OPTION_END);
+ 0, NULL, NULL, &ahc_echo, NULL, MHD_OPTION_END);
if (d == NULL)
return 2;
MHD_stop_daemon (d);
@@ -84,14 +84,14 @@ testMultithreadedGet (int poll_flag)
}
-static int
-testMultithreadedPoolGet (int poll_flag)
+static unsigned int
+testMultithreadedPoolGet (unsigned int poll_flag)
{
struct MHD_Daemon *d;
d = MHD_start_daemon (MHD_USE_INTERNAL_POLLING_THREAD | MHD_USE_ERROR_LOG
| poll_flag,
- 0, NULL, NULL, &ahc_echo, "GET",
+ 0, NULL, NULL, &ahc_echo, NULL,
MHD_OPTION_THREAD_POOL_SIZE, MHD_CPU_COUNT,
MHD_OPTION_END);
if (d == NULL)
@@ -104,14 +104,14 @@ testMultithreadedPoolGet (int poll_flag)
#endif
-static int
-testExternalGet ()
+static unsigned int
+testExternalGet (void)
{
struct MHD_Daemon *d;
d = MHD_start_daemon (MHD_USE_ERROR_LOG,
0, NULL, NULL,
- &ahc_echo, "GET",
+ &ahc_echo, NULL,
MHD_OPTION_END);
if (NULL == d)
return 8;
@@ -151,5 +151,5 @@ main (int argc,
fprintf (stderr,
"Error (code: %u)\n",
errorCount);
- return errorCount != 0; /* 0 == pass */
+ return (errorCount == 0) ? 0 : 1; /* 0 == pass */
}