mirror of
https://github.com/curl/curl.git
synced 2026-07-28 15:13:06 +03:00
wolfssl: silence compiler warning (MSVC 2019), simplify existing
Seen with VS2019 and older versions: ``` lib\vtls\wolfssl.c(773): warning C4706: assignment within conditional expression ``` Ref: https://github.com/curl/curl/actions/runs/13190321645/job/36821938202?pr=16217#step:9:30 Also replace pragma suppression with this simpler method, and silence `checksrc` where it complains about the extra ` != NULL` this needs. Closes #16230
This commit is contained in:
parent
5c7bf5fe59
commit
0b3afd133a
5 changed files with 7 additions and 37 deletions
|
|
@ -118,11 +118,6 @@ void ourWriteOutJSON(FILE *stream, const struct writeoutvar mappings[],
|
|||
fprintf(stream, "}");
|
||||
}
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(push)
|
||||
#pragma warning(disable:4706) /* assignment within conditional expression */
|
||||
#endif
|
||||
|
||||
void headerJSON(FILE *stream, struct per_transfer *per)
|
||||
{
|
||||
struct curl_header *header;
|
||||
|
|
@ -130,7 +125,7 @@ void headerJSON(FILE *stream, struct per_transfer *per)
|
|||
|
||||
fputc('{', stream);
|
||||
while((header = curl_easy_nextheader(per->curl, CURLH_HEADER, -1,
|
||||
prev))) {
|
||||
prev)) != NULL) {
|
||||
if(header->amount > 1) {
|
||||
if(!header->index) {
|
||||
/* act on the 0-index entry and pull the others in, then output in a
|
||||
|
|
@ -169,7 +164,3 @@ void headerJSON(FILE *stream, struct per_transfer *per)
|
|||
}
|
||||
fputs("\n}", stream);
|
||||
}
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(pop)
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue