diff options
author | Evgeny Grin (Karlson2k) <k2k@narod.ru> | 2020-10-29 20:16:41 +0300 |
---|---|---|
committer | Evgeny Grin (Karlson2k) <k2k@narod.ru> | 2020-10-29 20:16:41 +0300 |
commit | 0777af766caf32ccb1c04327c0bc37f950768244 (patch) | |
tree | 7c4f6cb8fc37036d9232a8542ba1a27f84f4d2aa /src/testcurl | |
parent | 7c0a88870b57845f72e107814c271b75f58765e9 (diff) | |
download | libmicrohttpd-0777af766caf32ccb1c04327c0bc37f950768244.tar.gz libmicrohttpd-0777af766caf32ccb1c04327c0bc37f950768244.zip |
test_add_conn: Muted analyzer warning
Diffstat (limited to 'src/testcurl')
-rw-r--r-- | src/testcurl/test_add_conn.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/testcurl/test_add_conn.c b/src/testcurl/test_add_conn.c index b91ec3c9..6b9ef45d 100644 --- a/src/testcurl/test_add_conn.c +++ b/src/testcurl/test_add_conn.c | |||
@@ -797,6 +797,7 @@ testExternalGet (void) | |||
797 | int a_port = 0; /* Additional listening socket port */ | 797 | int a_port = 0; /* Additional listening socket port */ |
798 | struct addConnParam aParam; | 798 | struct addConnParam aParam; |
799 | int ret = 0; /* Return value of the test */ | 799 | int ret = 0; /* Return value of the test */ |
800 | const int c_no_listen = no_listen; /* Local const value to mute analyzer */ | ||
800 | 801 | ||
801 | d = startTestMhdDaemon (testMhdThreadExternal, testMhdPollBySelect, &d_port); | 802 | d = startTestMhdDaemon (testMhdThreadExternal, testMhdPollBySelect, &d_port); |
802 | 803 | ||
@@ -815,7 +816,7 @@ testExternalGet (void) | |||
815 | abort (); /* Not possible with "external poll" as connections are directly | 816 | abort (); /* Not possible with "external poll" as connections are directly |
816 | added to the daemon processing in the mode. */ | 817 | added to the daemon processing in the mode. */ |
817 | 818 | ||
818 | if (! no_listen) | 819 | if (! c_no_listen) |
819 | c_d = curlEasyInitForTest ("http://127.0.0.1" EXPECTED_URI_FULL_PATH, | 820 | c_d = curlEasyInitForTest ("http://127.0.0.1" EXPECTED_URI_FULL_PATH, |
820 | d_port, &cbc_d); | 821 | d_port, &cbc_d); |
821 | 822 | ||
@@ -828,7 +829,7 @@ testExternalGet (void) | |||
828 | fprintf (stderr, "curl_multi_init() failed.\n"); | 829 | fprintf (stderr, "curl_multi_init() failed.\n"); |
829 | _exit (99); | 830 | _exit (99); |
830 | } | 831 | } |
831 | if (! no_listen) | 832 | if (! c_no_listen) |
832 | { | 833 | { |
833 | if (CURLM_OK != curl_multi_add_handle (multi, c_d)) | 834 | if (CURLM_OK != curl_multi_add_handle (multi, c_d)) |
834 | { | 835 | { |
@@ -940,7 +941,7 @@ testExternalGet (void) | |||
940 | MHD_stop_daemon (d); | 941 | MHD_stop_daemon (d); |
941 | (void) MHD_socket_close_ (aParam.lstn_sk); | 942 | (void) MHD_socket_close_ (aParam.lstn_sk); |
942 | 943 | ||
943 | if (! no_listen) | 944 | if (! c_no_listen) |
944 | { | 945 | { |
945 | curl_multi_remove_handle (multi, c_d); | 946 | curl_multi_remove_handle (multi, c_d); |
946 | curl_easy_cleanup (c_d); | 947 | curl_easy_cleanup (c_d); |
@@ -1038,11 +1039,12 @@ testStopRace (enum testMhdPollType pollType) | |||
1038 | MHD_socket fd2; | 1039 | MHD_socket fd2; |
1039 | struct addConnParam aParam; | 1040 | struct addConnParam aParam; |
1040 | int ret = 0; /* Return value of the test */ | 1041 | int ret = 0; /* Return value of the test */ |
1042 | const int c_no_listen = no_listen; /* Local const value to mute analyzer */ | ||
1041 | 1043 | ||
1042 | d = startTestMhdDaemon (testMhdThreadInternal, pollType, | 1044 | d = startTestMhdDaemon (testMhdThreadInternal, pollType, |
1043 | &d_port); | 1045 | &d_port); |
1044 | 1046 | ||
1045 | if (! no_listen) | 1047 | if (! c_no_listen) |
1046 | { | 1048 | { |
1047 | fd1 = socket (PF_INET, SOCK_STREAM, IPPROTO_TCP); | 1049 | fd1 = socket (PF_INET, SOCK_STREAM, IPPROTO_TCP); |
1048 | if (MHD_INVALID_SOCKET == fd1) | 1050 | if (MHD_INVALID_SOCKET == fd1) |
@@ -1076,7 +1078,7 @@ testStopRace (enum testMhdPollType pollType) | |||
1076 | 1078 | ||
1077 | MHD_stop_daemon (d); | 1079 | MHD_stop_daemon (d); |
1078 | 1080 | ||
1079 | if (! no_listen) | 1081 | if (! c_no_listen) |
1080 | (void) MHD_socket_close_ (fd1); | 1082 | (void) MHD_socket_close_ (fd1); |
1081 | (void) MHD_socket_close_ (aParam.lstn_sk); | 1083 | (void) MHD_socket_close_ (aParam.lstn_sk); |
1082 | (void) MHD_socket_close_ (fd2); | 1084 | (void) MHD_socket_close_ (fd2); |