Re: [PATCH] ci: do not die on deprecated-declarations warning
From: Junio C Hamano <hidden>
Date: 2023-01-14 16:13:31
Ramsay Jones [off-list ref] writes:
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.
quoted
+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.