Re: [PATCH] ci: do not die on deprecated-declarations warning
From: Ramsay Jones <hidden>
Date: 2023-01-16 00:39:50
On 14/01/2023 14:56, Jeff King wrote:
On Fri, Jan 13, 2023 at 07:47:12PM -0800, Junio C Hamano wrote:quoted
Like a recent GitHub CI run on linux-musl [1] shows, we seem to be getting a bunch of errors of the form: Error: http.c:1002:9: 'CURLOPT_REDIR_PROTOCOLS' is deprecated: since 7.85.0. Use CURLOPT_REDIR_PROTOCOLS_STR [-Werror=deprecated-declarations]By the way, it seemed odd to me that this failed in just the linux-musl job, and not elsewhere (nor on my development machine, which has curl 7.87.0). It looks like there's a bad interaction within curl between the typecheck and deprecation macros. Here's a minimal reproduction: -- >8 -- cat >foo.c <<-\EOF #include <curl/curl.h> void foo(CURL *c) { curl_easy_setopt(c, CURLOPT_PROTOCOLS, 0); } EOF # this will complain about deprecated CURLOPT_PROTOCOLS gcc -DCURL_DISABLE_TYPECHECK -Wdeprecated-declarations -c foo.c # this will not gcc -Wdeprecated-declarations -c foo.c -- 8< --
FYI, I just tried this on cygwin and both gcc invocations above complain about deprecated CURLOPT_PROTOCOLS. (On Linux I have curl 7.81.0, so I can't test there). [cygwin uses newlib, of course]. ATB, Ramsay Jones