From 9c5aed185209838b524251886238da9b3d58382b Mon Sep 17 00:00:00 2001 From: Marcel Raad Date: Mon, 24 Apr 2017 17:56:19 +0200 Subject: [PATCH] typecheck-gcc: fix _curl_is_slist_info MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- include/curl/typecheck-gcc.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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*/