mirror of
https://github.com/curl/curl.git
synced 2026-08-06 07:26:12 +03:00
src/test: avoid (void)! constructs
The reason to use them seems to be that just (void) before a function call is not enough to silence compiler warnings when return codes are ignored and -Werror=unused-result is used. While (void)! apparently works to silence those warnings, it is just too weird and surprising to readers to use. It is rather a reason to reconsider the usefulness of the warning. Closes #22023
This commit is contained in:
parent
9f25dcea55
commit
c8d8f081fd
2 changed files with 11 additions and 6 deletions
|
|
@ -226,8 +226,10 @@ static char *c_escape(const char *str, curl_off_t len)
|
|||
result = curlx_dyn_addn(&escaped, str, s - str);
|
||||
|
||||
if(!result)
|
||||
(void)!curlx_dyn_addn(&escaped, "...", cutoff);
|
||||
result = curlx_dyn_addn(&escaped, "...", cutoff);
|
||||
|
||||
if(result)
|
||||
return NULL;
|
||||
return curlx_dyn_ptr(&escaped);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue