diff options
author | Daniel Stenberg <daniel@haxx.se> | 2020-12-26 15:43:25 +0100 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2020-12-26 23:44:17 +0100 |
commit | 8ab78f720ae478d533e30b202baec4b451741579 (patch) | |
tree | f476fa9496db2c92f32918acd66194b315b802c0 /src/tool_operate.c | |
parent | ec424f311aabfd34df1833878503236505e51656 (diff) | |
download | curl-8ab78f720ae478d533e30b202baec4b451741579.tar.gz |
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: https://github.com/curl/curl/commit/08e8455dddc5e48e58a12ade3815c01ae3da3b64#commitcomment-45433279
Follow-up to 08e8455dddc5e4
Reported-by: Gisle Vanem
Closes #6376
Diffstat (limited to 'src/tool_operate.c')
-rw-r--r-- | src/tool_operate.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/src/tool_operate.c b/src/tool_operate.c index 9e80ca2e5..5635483d1 100644 --- a/src/tool_operate.c +++ b/src/tool_operate.c @@ -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)); |