misc: fix "warning: empty expression statement has no effect"

Turned several macros into do-while(0) style to allow their use to work
find with semicolon.

Bug: 08e8455ddd (commitcomment-45433279)
Follow-up to 08e8455ddd
Reported-by: Gisle Vanem
Closes #6376
This commit is contained in:
Daniel Stenberg 2020-12-26 15:43:25 +01:00
parent ec424f311a
commit 8ab78f720a
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2
11 changed files with 84 additions and 69 deletions

View file

@ -362,10 +362,7 @@ static CURLcode post_per_transfer(struct GlobalConfig *global,
}
else
#endif
if(config->synthetic_error) {
;
}
else if(result && global->showerror) {
if(!config->synthetic_error && result && global->showerror) {
fprintf(global->errors, "curl: (%d) %s\n", result,
(per->errorbuffer[0]) ? per->errorbuffer :
curl_easy_strerror(result));