From: Jonathan Nieder <jrnieder@gmail.com>
To: Ramsay Jones <ramsay@ramsayjones.plus.com>
Cc: Junio C Hamano <gitster@pobox.com>, Jeff King <peff@peff.net>,
GIT Mailing-list <git@vger.kernel.org>
Subject: Re: [PATCH] http: fix an unused variable warning for 'curl_no_proxy'
Date: Wed, 14 Mar 2018 15:03:07 -0700 [thread overview]
Message-ID: <20180314220307.GB136265@aiede.svl.corp.google.com> (raw)
In-Reply-To: <517c4210-c381-899e-b13a-00f8e4caba74@ramsayjones.plus.com>
Hi,
Ramsay Jones wrote:
> Signed-off-by: Ramsay Jones <ramsay@ramsayjones.plus.com>
> ---
>
> Hi Junio,
>
> I happened to be building git on an _old_ laptop earlier this evening
> and gcc complained, thus:
>
> CC http.o
> http.c:77:20: warning: ‘curl_no_proxy’ defined but not used [-Wunused-variable]
> static const char *curl_no_proxy;
> ^
> The version of libcurl installed was 0x070f04. So, while it was fresh in my
> mind, I applied and tested this patch.
Mind including this in the commit message? Especially the error message
can be very useful.
With or without such a commit message tweak,
Reviewed-by: Jonathan Nieder <jrnieder@gmail.com>
This variable has been unused in the old-curl case since it was
introduced in v2.8.0-rc2~2^2 (http: honor no_http env variable to
bypass proxy, 2016-02-29). Thanks for fixing it.
Sincerely,
Jonathan
> ATB,
> Ramsay Jones
>
> http.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/http.c b/http.c
> index 8c11156ae..a5bd5d62c 100644
> --- a/http.c
> +++ b/http.c
> @@ -69,6 +69,9 @@ static const char *ssl_key;
> #if LIBCURL_VERSION_NUM >= 0x070908
> static const char *ssl_capath;
> #endif
> +#if LIBCURL_VERSION_NUM >= 0x071304
> +static const char *curl_no_proxy;
> +#endif
> #if LIBCURL_VERSION_NUM >= 0x072c00
> static const char *ssl_pinnedkey;
> #endif
> @@ -77,7 +80,6 @@ static long curl_low_speed_limit = -1;
> static long curl_low_speed_time = -1;
> static int curl_ftp_no_epsv;
> static const char *curl_http_proxy;
> -static const char *curl_no_proxy;
> static const char *http_proxy_authmethod;
> static struct {
> const char *name;
next prev parent reply other threads:[~2018-03-14 22:03 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-03-14 21:56 [PATCH] http: fix an unused variable warning for 'curl_no_proxy' Ramsay Jones
2018-03-14 22:03 ` Jonathan Nieder [this message]
2018-03-14 22:15 ` Jeff King
2018-03-14 23:01 ` Ramsay Jones
2018-03-15 0:50 ` Jeff King
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180314220307.GB136265@aiede.svl.corp.google.com \
--to=jrnieder@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=peff@peff.net \
--cc=ramsay@ramsayjones.plus.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).