[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] [gnurl] 149/208: libtest: fix MSVC warning C4706
From: |
gnunet |
Subject: |
[GNUnet-SVN] [gnurl] 149/208: libtest: fix MSVC warning C4706 |
Date: |
Wed, 09 Aug 2017 17:35:46 +0200 |
This is an automated email from the git hooks/post-receive script.
ng0 pushed a commit to annotated tag gnurl-7.55.0
in repository gnurl.
commit fb3b0f25ef9b20b40e48d2a507968a975ef09bb9
Author: Marcel Raad <address@hidden>
AuthorDate: Sun Jul 16 13:44:54 2017 +0200
libtest: fix MSVC warning C4706
With warning level 4, MSVC warns about assignments within conditional
expressions. Change the while loop to a do-while loop to fix this. This
change is also consistent with CODE_STYLE.md.
---
tests/libtest/lib1515.c | 7 ++++---
tests/libtest/lib1531.c | 7 ++++---
tests/libtest/lib1900.c | 7 ++++---
3 files changed, 12 insertions(+), 9 deletions(-)
diff --git a/tests/libtest/lib1515.c b/tests/libtest/lib1515.c
index 7763c2233..c1499381a 100644
--- a/tests/libtest/lib1515.c
+++ b/tests/libtest/lib1515.c
@@ -95,12 +95,13 @@ static int do_one_request(CURLM *m, char *URL, char
*resolve)
abort_on_test_timeout();
}
- while((msg = curl_multi_info_read(m, &msgs_left))) {
- if(msg->msg == CURLMSG_DONE && msg->easy_handle == curls) {
+ do {
+ msg = curl_multi_info_read(m, &msgs_left);
+ if(msg && msg->msg == CURLMSG_DONE && msg->easy_handle == curls) {
res = msg->data.result;
break;
}
- }
+ } while(msg);
test_cleanup:
diff --git a/tests/libtest/lib1531.c b/tests/libtest/lib1531.c
index e6386b264..287acd6c6 100644
--- a/tests/libtest/lib1531.c
+++ b/tests/libtest/lib1531.c
@@ -127,12 +127,13 @@ int test(char *URL)
} while(still_running);
/* See how the transfers went */
- while((msg = curl_multi_info_read(multi_handle, &msgs_left))) {
- if(msg->msg == CURLMSG_DONE) {
+ do {
+ msg = curl_multi_info_read(multi_handle, &msgs_left);
+ if(msg && msg->msg == CURLMSG_DONE) {
printf("HTTP transfer completed with status %d\n", msg->data.result);
break;
}
- }
+ } while(msg);
curl_multi_cleanup(multi_handle);
diff --git a/tests/libtest/lib1900.c b/tests/libtest/lib1900.c
index b55f3b7d8..cac1dd1d9 100644
--- a/tests/libtest/lib1900.c
+++ b/tests/libtest/lib1900.c
@@ -189,8 +189,9 @@ int test(char *URL)
abort_on_test_timeout();
/* See how the transfers went */
- while((msg = curl_multi_info_read(m, &msgs_left))) {
- if(msg->msg == CURLMSG_DONE) {
+ do {
+ msg = curl_multi_info_read(m, &msgs_left);
+ if(msg && msg->msg == CURLMSG_DONE) {
int i, found = 0;
/* Find out which handle this message is about */
@@ -203,7 +204,7 @@ int test(char *URL)
printf("Handle %d Completed with status %d\n", i, msg->data.result);
curl_multi_remove_handle(m, handles[i]);
}
- }
+ } while(msg);
if(handlenum == num_handles && !running) {
break; /* done */
--
To stop receiving notification emails like this one, please contact
address@hidden
- [GNUnet-SVN] [gnurl] 96/208: test1451: add SMB support to the testbed, (continued)
- [GNUnet-SVN] [gnurl] 96/208: test1451: add SMB support to the testbed, gnunet, 2017/08/09
- [GNUnet-SVN] [gnurl] 26/208: HTTPS-Proxy: don't offer h2 for https proxy connections, gnunet, 2017/08/09
- [GNUnet-SVN] [gnurl] 155/208: checksrc: escape open brace in regex, gnunet, 2017/08/09
- [GNUnet-SVN] [gnurl] 147/208: rtspd: fix MSVC level 4 warning, gnunet, 2017/08/09
- [GNUnet-SVN] [gnurl] 64/208: progress: fix "time spent", broke in adef394ac, gnunet, 2017/08/09
- [GNUnet-SVN] [gnurl] 162/208: splay: fix signed/unsigned mismatch warning, gnunet, 2017/08/09
- [GNUnet-SVN] [gnurl] 204/208: configure: fix recv/send/select detection on Android, gnunet, 2017/08/09
- [GNUnet-SVN] [gnurl] 186/208: darwin: silence compiler warnings, gnunet, 2017/08/09
- [GNUnet-SVN] [gnurl] 172/208: multi: fix request timer management, gnunet, 2017/08/09
- [GNUnet-SVN] [gnurl] 194/208: darwinssl: fix compiler warning, gnunet, 2017/08/09
- [GNUnet-SVN] [gnurl] 149/208: libtest: fix MSVC warning C4706,
gnunet <=
- [GNUnet-SVN] [gnurl] 181/208: CMake: set MSVC warning level to 4, gnunet, 2017/08/09
- [GNUnet-SVN] [gnurl] 202/208: test1427: verify command line parser integer overflow detection, gnunet, 2017/08/09
- [GNUnet-SVN] [gnurl] 200/208: glob: do not continue parsing after a strtoul() overflow range, gnunet, 2017/08/09
- [GNUnet-SVN] [gnurl] 203/208: ax_code_coverage.m4: update to latest version, gnunet, 2017/08/09
- [GNUnet-SVN] [gnurl] 180/208: CURLOPT_NETRC.3: fix typo in 7e48aa386156f9c2, gnunet, 2017/08/09
- [GNUnet-SVN] [gnurl] 165/208: RELEASE-NOTES: synced with 001701c47, gnunet, 2017/08/09
- [GNUnet-SVN] [gnurl] 179/208: CURLOPT_NETRC.3: mention the file name on windows, gnunet, 2017/08/09
- [GNUnet-SVN] [gnurl] 197/208: easy_events: make event data static, gnunet, 2017/08/09
- [GNUnet-SVN] [gnurl] 177/208: travis: build osx with openssl too, gnunet, 2017/08/09
- [GNUnet-SVN] [gnurl] 185/208: BUILD.WINDOWS: mention buildconf.bat for builds off git, gnunet, 2017/08/09