mirror of
https://github.com/curl/curl.git
synced 2026-08-24 17:53:33 +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
|
|
@ -26,24 +26,18 @@
|
|||
|
||||
#include "memdebug.h"
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(push)
|
||||
#pragma warning(disable:4706) /* assignment within conditional expression */
|
||||
#endif
|
||||
static void showem(CURL *easy, unsigned int type)
|
||||
{
|
||||
struct curl_header *header = NULL;
|
||||
struct curl_header *prev = NULL;
|
||||
|
||||
while((header = curl_easy_nextheader(easy, type, 0, prev))) {
|
||||
/* !checksrc! disable EQUALSNULL 1 */
|
||||
while((header = curl_easy_nextheader(easy, type, 0, prev)) != NULL) {
|
||||
printf(" %s == %s (%u/%u)\n", header->name, header->value,
|
||||
(int)header->index, (int)header->amount);
|
||||
prev = header;
|
||||
}
|
||||
}
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(pop)
|
||||
#endif
|
||||
|
||||
static size_t write_cb(char *data, size_t n, size_t l, void *userp)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue