gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] [gnurl] 23/254: typecheck-gcc: fix _curl_is_slist_info


From: gnunet
Subject: [GNUnet-SVN] [gnurl] 23/254: typecheck-gcc: fix _curl_is_slist_info
Date: Sat, 17 Jun 2017 16:50:55 +0200

This is an automated email from the git hooks/post-receive script.

ng0 pushed a commit to annotated tag gnurl-7.54.1
in repository gnurl.

commit 9c5aed185209838b524251886238da9b3d58382b
Author: Marcel Raad <address@hidden>
AuthorDate: Mon Apr 24 17:56:19 2017 +0200

    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
---
 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*/

-- 
To stop receiving notification emails like this one, please contact
address@hidden



reply via email to

[Prev in Thread] Current Thread [Next in Thread]