[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] [gnurl] 111/208: asyn-thread.c: fix unused variable warning
From: |
gnunet |
Subject: |
[GNUnet-SVN] [gnurl] 111/208: asyn-thread.c: fix unused variable warnings on macOS |
Date: |
Wed, 09 Aug 2017 17:35:08 +0200 |
This is an automated email from the git hooks/post-receive script.
ng0 pushed a commit to annotated tag gnurl-7.55.0
in repository gnurl.
commit 6b0aa00abb8836bb4328f07cbe75421e21cd341e
Author: Daniel Stenberg <address@hidden>
AuthorDate: Thu Jul 6 10:22:28 2017 +0200
asyn-thread.c: fix unused variable warnings on macOS
---
lib/asyn-thread.c | 27 ++++++++++++++-------------
1 file changed, 14 insertions(+), 13 deletions(-)
diff --git a/lib/asyn-thread.c b/lib/asyn-thread.c
index 65fa6c5be..4250e276a 100644
--- a/lib/asyn-thread.c
+++ b/lib/asyn-thread.c
@@ -594,28 +594,29 @@ Curl_addrinfo *Curl_resolver_getaddrinfo(struct
connectdata *conn,
int *waitp)
{
struct addrinfo hints;
- struct in_addr in;
Curl_addrinfo *res;
int error;
char sbuf[12];
int pf = PF_INET;
-#ifdef CURLRES_IPV6
- struct in6_addr in6;
-#endif /* CURLRES_IPV6 */
*waitp = 0; /* default to synchronous response */
#ifndef USE_RESOLVE_ON_IPS
- /* First check if this is an IPv4 address string */
- if(Curl_inet_pton(AF_INET, hostname, &in) > 0)
- /* This is a dotted IP address 123.123.123.123-style */
- return Curl_ip2addr(AF_INET, &in, hostname, port);
-
+ {
+ struct in_addr in;
+ /* First check if this is an IPv4 address string */
+ if(Curl_inet_pton(AF_INET, hostname, &in) > 0)
+ /* This is a dotted IP address 123.123.123.123-style */
+ return Curl_ip2addr(AF_INET, &in, hostname, port);
+ }
#ifdef CURLRES_IPV6
- /* check if this is an IPv6 address string */
- if(Curl_inet_pton(AF_INET6, hostname, &in6) > 0)
- /* This is an IPv6 address literal */
- return Curl_ip2addr(AF_INET6, &in6, hostname, port);
+ {
+ struct in6_addr in6;
+ /* check if this is an IPv6 address string */
+ if(Curl_inet_pton(AF_INET6, hostname, &in6) > 0)
+ /* This is an IPv6 address literal */
+ return Curl_ip2addr(AF_INET6, &in6, hostname, port);
+ }
#endif /* CURLRES_IPV6 */
#endif /* !USE_RESOLVE_ON_IPS */
--
To stop receiving notification emails like this one, please contact
address@hidden
- [GNUnet-SVN] [gnurl] 146/208: winbuild: re-enable warning C4127 for curl tool, (continued)
- [GNUnet-SVN] [gnurl] 146/208: winbuild: re-enable warning C4127 for curl tool, gnunet, 2017/08/09
- [GNUnet-SVN] [gnurl] 175/208: curl_threads: fix MSVC compiler warning, gnunet, 2017/08/09
- [GNUnet-SVN] [gnurl] 196/208: getparameter: avoid returning uninitialized 'usedarg', gnunet, 2017/08/09
- [GNUnet-SVN] [gnurl] 182/208: netrc: skip lines starting with '#', gnunet, 2017/08/09
- [GNUnet-SVN] [gnurl] 58/208: --request-target: instead of --strip-path-slash, gnunet, 2017/08/09
- [GNUnet-SVN] [gnurl] 47/208: automake: use $(MKHELP) variable instead if constant mkhelp.pl, gnunet, 2017/08/09
- [GNUnet-SVN] [gnurl] 205/208: docs/comments: Update to secure URL versions, gnunet, 2017/08/09
- [GNUnet-SVN] [gnurl] 56/208: travis: enable typecheck-gcc warnings, gnunet, 2017/08/09
- [GNUnet-SVN] [gnurl] 55/208: typecheck-gcc: add support for CURLINFO_OFF_T, gnunet, 2017/08/09
- [GNUnet-SVN] [gnurl] 199/208: tftp: reject file name lengths that don't fit, gnunet, 2017/08/09
- [GNUnet-SVN] [gnurl] 111/208: asyn-thread.c: fix unused variable warnings on macOS,
gnunet <=
- [GNUnet-SVN] [gnurl] 190/208: FTP: skip unnecessary CWD when in nocwd mode, gnunet, 2017/08/09
- [GNUnet-SVN] [gnurl] 63/208: CURLINFO_REDIRECT_URL.3: mention the CURLOPT_MAXREDIRS case, gnunet, 2017/08/09
- [GNUnet-SVN] [gnurl] 157/208: darwinssl: fix variable type mistake (regression), gnunet, 2017/08/09
- [GNUnet-SVN] [gnurl] 143/208: travis: enable warnings also in release mode, gnunet, 2017/08/09
- [GNUnet-SVN] [gnurl] 01/208: includes: remove curl/curlbuild.h and curl/curlrules.h, gnunet, 2017/08/09
- [GNUnet-SVN] [gnurl] 65/208: curl-compilers.m4: fix unknown-warning-option on Apple clang, gnunet, 2017/08/09
- [GNUnet-SVN] [gnurl] 90/208: gtls: fix build when sizeof(long) < sizeof(void *), gnunet, 2017/08/09
- [GNUnet-SVN] [gnurl] 120/208: test1452: add telnet negotiation, gnunet, 2017/08/09
- [GNUnet-SVN] [gnurl] 96/208: test1451: add SMB support to the testbed, gnunet, 2017/08/09
- [GNUnet-SVN] [gnurl] 26/208: HTTPS-Proxy: don't offer h2 for https proxy connections, gnunet, 2017/08/09