diff options
author | Marcel Raad <raad@teamviewer.com> | 2017-04-24 17:56:19 +0200 |
---|---|---|
committer | Marcel Raad <raad@teamviewer.com> | 2017-04-25 11:17:50 +0200 |
commit | 9c5aed185209838b524251886238da9b3d58382b (patch) | |
tree | e7079b21ab99218c7d4e31c90c343210619b6e4f | |
parent | 96ece5c0eef0ca4953ec306e59fd7aa8d48be793 (diff) |
typecheck-gcc: fix _curl_is_slist_info
Info values starting with CURLINFO_SOCKET expect a curl_socket_t, not a
curl_slist argument.
This fixes the following GCC warning when building the examples with
--enable-optimize:
../../include/curl/typecheck-gcc.h:126:42: warning: call to
‘_curl_easy_getinfo_err_curl_slist’ declared with attribute warning:
curl_easy_getinfo expects a pointer to 'struct curl_slist *' for this
info [enabled by default]
sendrecv.c:90:11: note: in expansion of macro ‘curl_easy_getinfo’
res = curl_easy_getinfo(curl, CURLINFO_ACTIVESOCKET, &sockfd);
Closes https://github.com/curl/curl/pull/1447
-rw-r--r-- | include/curl/typecheck-gcc.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/curl/typecheck-gcc.h b/include/curl/typecheck-gcc.h index 5cdc5e4d7..32cdaf17f 100644 --- a/include/curl/typecheck-gcc.h +++ b/include/curl/typecheck-gcc.h @@ -349,7 +349,7 @@ _CURL_WARNING(_curl_easy_getinfo_err_curl_slist, /* true if info expects a pointer to struct curl_slist * argument */ #define _curl_is_slist_info(info) \ - (CURLINFO_SLIST < (info)) + (CURLINFO_SLIST < (info) && (info) < CURLINFO_SOCKET) /* typecheck helpers -- check whether given expression has requested type*/ |