Where missing. Or explicitly `(void)` it where we ignore it on purpose.
Reported-by: Joshua Rogers (for `sepheaders.c`)
Closes #19052
curl = curl_easy_init();
curl_easy_setopt(curl, CURLOPT_URL, urls[i]);
- curl_easy_perform(curl); /* ignores error */
+ (void)curl_easy_perform(curl); /* ignores error */
curl_easy_cleanup(curl);
return NULL;
int main(void)
{
+ CURLcode res;
CURL *curl_handle;
static const char *headerfilename = "head.out";
FILE *headerfile;
curl_easy_setopt(curl_handle, CURLOPT_WRITEDATA, bodyfile);
/* get it! */
- curl_easy_perform(curl_handle);
+ res = curl_easy_perform(curl_handle);
/* close the header file */
fclose(headerfile);
curl_global_cleanup();
- return 0;
+ return (int)res;
}
/* Write to the file */
curl_easy_setopt(curl, CURLOPT_WRITEDATA, outfile);
curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, write_file);
- curl_easy_perform(curl);
+ (void)curl_easy_perform(curl);
fclose(outfile);
curl_easy_cleanup(curl);
might be downloading stuff from an impostor */
curl_easy_setopt(curl, CURLOPT_SSL_VERIFYPEER, 0L);
curl_easy_setopt(curl, CURLOPT_SSL_VERIFYHOST, 0L);
- curl_easy_perform(curl); /* ignores error */
+ (void)curl_easy_perform(curl); /* ignores error */
curl_easy_cleanup(curl);
return NULL;
int main(int argc, char *argv[])
{
+ CURLcode res = CURLE_OK;
+
CURL *curl_handle;
static const char *pagefilename = "page.out";
FILE *pagefile;
curl_easy_setopt(curl_handle, CURLOPT_WRITEDATA, pagefile);
/* get it! */
- curl_easy_perform(curl_handle);
+ res = curl_easy_perform(curl_handle);
/* close the header file */
fclose(pagefile);
curl_global_cleanup();
- return 0;
+ return (int)res;
}