Re: [PATCH] http: fix an unused variable warning for 'curl_no_proxy'

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

 



Hi,

Ramsay Jones wrote:

> Signed-off-by: Ramsay Jones <ramsay@xxxxxxxxxxxxxxxxxxxx>
> ---
>
> 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@xxxxxxxxx>

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;



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux