Re: [PATCH] ci: do not die on deprecated-declarations warning

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

 



On Fri, Jan 13, 2023 at 07:47:12PM -0800, Junio C Hamano wrote:

> 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< --

I didn't look into why the musl build behaves differently, but
presumably it has an older compiler or something that causes curl to
decide not to trigger the typecheck macros.

Adding relevant curl folks to the cc (the curl list itself is
subscriber-only).

-Peff



[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