I was using the CURLOPT_PRIVATE to store some data. Here's what I did,
struct http_request_private_data *priv_data;
curl_easy_getinfo(easy_curl, CURLINFO_PRIVATE, &priv_data);
But then when I compiled with Linux gcc, I got this error (as in issue #846),
curl/typecheck-gcc.h:122:13: error: call to ‘_curl_easy_getinfo_err_string’ declared with attribute warning: curl_easy_getinfo expects a pointer to 'char *' for this info [-Werror]
_curl_easy_getinfo_err_string();
Curiously, there was no warning when I compiled with -O0 flag, without making any changes to the code.
When using any other optimization flags, -O2 for instance, the warning shows up.
curl/libcurl version
curl-config --version
libcurl 7.70.0
operating system
Linux 4.15.0-91-generic #92-Ubuntu SMP Fri Feb 28 11:09:48 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
I was using the
CURLOPT_PRIVATEto store some data. Here's what I did,But then when I compiled with Linux gcc, I got this error (as in issue #846),
Curiously, there was no warning when I compiled with
-O0flag, without making any changes to the code.When using any other optimization flags,
-O2for instance, the warning shows up.curl/libcurl version
curl-config --version
libcurl 7.70.0operating system
Linux 4.15.0-91-generic #92-Ubuntu SMP Fri Feb 28 11:09:48 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux