Re: [PATCH] ci: do not die on deprecated-declarations warning
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Jan 14, 2023, 16:13 UTC
- Message-ID
- <xmqq1qnxm6vu.fsf@gitster.g>
- In-Reply-To
- <11dccdea-0e33-6669-9554-19f064df6010@ramsayjones.plus.com>
Ramsay Jones <ramsay@ramsayjones.plus.com> writes:
Show 9 quoted lines
> Yes, on 30-Dec-2022 I updated my cygwin installation, which updated > the curl package(s) from v7.86.0 to v7.87.0, and caused my build > to fail. I had a quick look at the new 'curl.h' header file and > disabled the deprecation warnings to fix my build. I used vim to > add the following to my config.mak: > > CFLAGS += -DCURL_DISABLE_DEPRECATION > > .. and then promptly forgot about it for a couple of weeks! :)
Ahh, this is why I love to be working with this community, where I can float a problem with a possible solution and fellow developers respond with better solutions very quickly.
Show 8 quoted lines
>> +DEVELOPER_CFLAGS += -Wno-error=deprecated-declarations >> + > > Rather than suppressing 'deprecated-declarations' globally, we could > just add '-DCURL_DISABLE_DEPRECATION' to the compilation of http.c, > http-push.c and remote-curl.c; similar to how we use target specific > rules to pass '-DCURL_DISABLE_TYPECHECK' to sparse (only) to a similar > set of files.
OK, or, assuming that non-curl including code will not be affected with the macro, we can globally add -DCURL_DISABLE_DEPRECATION to CFLAGS or DEVELOPER_CFLAGS.
I guess I can sit back and wait until a better version materializes ;-)?
Thanks.