From: Marcel Raad Date: Wed, 5 Feb 2025 09:46:30 +0000 (+0100) Subject: asyn-thread: fix build with `CURL_DISABLE_SOCKETPAIR` X-Git-Tag: curl-8_12_1~45 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=c012c6062e963085f915975464e887264bf741fd;p=thirdparty%2Fcurl.git asyn-thread: fix build with `CURL_DISABLE_SOCKETPAIR` With `CURL_DISABLE_SOCKETPAIR` defined and `USE_HTTPSRR_ARES` undefined, the local variable `socketi` was unused. This fixes a regression from commit 0d4fdbf15d8. Closes https://github.com/curl/curl/pull/16179 --- diff --git a/lib/asyn-thread.c b/lib/asyn-thread.c index 8383edad72..986fc355c1 100644 --- a/lib/asyn-thread.c +++ b/lib/asyn-thread.c @@ -668,9 +668,11 @@ int Curl_resolver_getsock(struct Curl_easy *data, curl_socket_t *socks) timediff_t milli; timediff_t ms; struct resdata *reslv = (struct resdata *)data->state.async.resolver; - int socketi = 0; #ifndef CURL_DISABLE_SOCKETPAIR struct thread_data *td = data->state.async.tdata; +#endif +#if !defined(CURL_DISABLE_SOCKETPAIR) || defined(USE_HTTPSRR_ARES) + int socketi = 0; #else (void)socks; #endif