mirror of
https://github.com/curl/curl.git
synced 2026-04-14 22:41:40 +03:00
build: fix -Wunused-macros warnings, and related tidy-ups
- fix internal macro `AN_APPLE_OS` reused between sources without resetting it. It may potentially have left the system sha256 function unused. - fix to define `WOLFSSL_OPTIONS_IGNORE_SYS` so that it always applies to wolfSSL headers, also during feature detection. - md4, md5, sha256: simplify fallback logic. - delete 20+ unused macros. - scope or move macros to avoid `-Wunused-macros` warnings. - examples: delete unused code. The warning detects macros defined but not used within the same C source. It does not warn for macros defined in headers. It also works with unity builds, but to a lesser extent. Closes #20593
This commit is contained in:
parent
633ec719d5
commit
5fa5cb3825
28 changed files with 105 additions and 161 deletions
|
|
@ -63,11 +63,6 @@
|
|||
#include <ares_version.h> /* really old c-ares did not include this by
|
||||
itself */
|
||||
|
||||
#if ARES_VERSION >= 0x010601
|
||||
/* IPv6 supported since 1.6.1 */
|
||||
#define HAVE_CARES_IPV6 1
|
||||
#endif
|
||||
|
||||
#if ARES_VERSION >= 0x010704
|
||||
#define HAVE_CARES_SERVERS_CSV 1
|
||||
#define HAVE_CARES_LOCAL_DEV 1
|
||||
|
|
@ -783,7 +778,7 @@ CURLcode Curl_async_getaddrinfo(struct Curl_easy *data, const char *hostname,
|
|||
}
|
||||
#else
|
||||
|
||||
#ifdef HAVE_CARES_IPV6
|
||||
#if ARES_VERSION >= 0x010601 /* IPv6 supported since 1.6.1 */
|
||||
if((ip_version != CURL_IPRESOLVE_V4) && Curl_ipv6works(data)) {
|
||||
/* The stack seems to be IPv6-enabled */
|
||||
/* areschannel is already setup in the Curl_open() function */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue