mirror of
https://github.com/curl/curl.git
synced 2025-09-10 22:22:43 +03:00
lib: supress deprecation warnings in apple builds
On apple builds, the gssapi/ldap/securetransport headers deprecate almost everything which leads to a wall of compiler warnings on use in code. Suppress those warning that may hide other warnings/errors. Closes #15763
This commit is contained in:
parent
f7e065f314
commit
ef90ee39e1
4
.github/workflows/macos.yml
vendored
4
.github/workflows/macos.yml
vendored
|
@ -45,9 +45,6 @@ permissions: {}
|
|||
#
|
||||
# For Secure Transport, curl implements features that require a target
|
||||
# newer than the 10.8 required by `CFURLCreateDataAndPropertiesFromResource`.
|
||||
# In this case `-Wno-deprecated-declarations` still comes handy to pacify
|
||||
# deprecation warnings, though the real solution would be to avoid calling
|
||||
# that function.
|
||||
|
||||
env:
|
||||
LDFLAGS: -w # suppress 'object file was built for newer macOS version than being linked' warnings
|
||||
|
@ -118,7 +115,6 @@ jobs:
|
|||
compiler: clang
|
||||
configure: --enable-debug --with-secure-transport --with-libssh2=$(brew --prefix libssh2)
|
||||
macos-version-min: '10.12' # for monotonic timers
|
||||
cflags: '-Wno-deprecated-declarations'
|
||||
- name: 'SecureTransport libssh2'
|
||||
compiler: gcc-12
|
||||
configure: --enable-debug --with-secure-transport --with-libssh2=$(brew --prefix libssh2)
|
||||
|
|
|
@ -40,6 +40,11 @@
|
|||
#define CURL_ALIGN8
|
||||
#endif
|
||||
|
||||
#if defined(__GNUC__) && defined(__APPLE__)
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
|
||||
#endif
|
||||
|
||||
gss_OID_desc Curl_spnego_mech_oid CURL_ALIGN8 = {
|
||||
6, (char *)"\x2b\x06\x01\x05\x05\x02"
|
||||
};
|
||||
|
@ -149,4 +154,8 @@ void Curl_gss_log_error(struct Curl_easy *data, const char *prefix,
|
|||
#endif
|
||||
}
|
||||
|
||||
#if defined(__GNUC__) && defined(__APPLE__)
|
||||
#pragma GCC diagnostic pop
|
||||
#endif
|
||||
|
||||
#endif /* HAVE_GSSAPI */
|
||||
|
|
|
@ -63,6 +63,11 @@
|
|||
#include "curl_memory.h"
|
||||
#include "memdebug.h"
|
||||
|
||||
#if defined(__GNUC__) && defined(__APPLE__)
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
|
||||
#endif
|
||||
|
||||
static CURLcode ftpsend(struct Curl_easy *data, struct connectdata *conn,
|
||||
const char *cmd)
|
||||
{
|
||||
|
@ -924,4 +929,8 @@ Curl_sec_end(struct connectdata *conn)
|
|||
conn->mech = NULL;
|
||||
}
|
||||
|
||||
#if defined(__GNUC__) && defined(__APPLE__)
|
||||
#pragma GCC diagnostic pop
|
||||
#endif
|
||||
|
||||
#endif /* HAVE_GSSAPI && !CURL_DISABLE_FTP */
|
||||
|
|
10
lib/ldap.c
10
lib/ldap.c
|
@ -26,6 +26,11 @@
|
|||
|
||||
#if !defined(CURL_DISABLE_LDAP) && !defined(USE_OPENLDAP)
|
||||
|
||||
#if defined(__GNUC__) && defined(__APPLE__)
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Notice that USE_OPENLDAP is only a source code selection switch. When
|
||||
* libcurl is built with USE_OPENLDAP defined the libcurl source code that
|
||||
|
@ -1113,4 +1118,9 @@ static void _ldap_free_urldesc(LDAPURLDesc *ludp)
|
|||
free(ludp);
|
||||
}
|
||||
#endif /* !HAVE_LDAP_URL_PARSE */
|
||||
|
||||
#if defined(__GNUC__) && defined(__APPLE__)
|
||||
#pragma GCC diagnostic pop
|
||||
#endif
|
||||
|
||||
#endif /* !CURL_DISABLE_LDAP && !USE_OPENLDAP */
|
||||
|
|
|
@ -42,6 +42,11 @@
|
|||
#include "curl_memory.h"
|
||||
#include "memdebug.h"
|
||||
|
||||
#if defined(__GNUC__) && defined(__APPLE__)
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
|
||||
#endif
|
||||
|
||||
#define MAX_GSS_LEN 1024
|
||||
|
||||
static gss_ctx_id_t gss_context = GSS_C_NO_CONTEXT;
|
||||
|
@ -537,4 +542,8 @@ CURLcode Curl_SOCKS5_gssapi_negotiate(struct Curl_cfilter *cf,
|
|||
return CURLE_OK;
|
||||
}
|
||||
|
||||
#if defined(__GNUC__) && defined(__APPLE__)
|
||||
#pragma GCC diagnostic pop
|
||||
#endif
|
||||
|
||||
#endif /* HAVE_GSSAPI && !CURL_DISABLE_PROXY */
|
||||
|
|
|
@ -42,6 +42,11 @@
|
|||
#include "curl_memory.h"
|
||||
#include "memdebug.h"
|
||||
|
||||
#if defined(__GNUC__) && defined(__APPLE__)
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Curl_auth_is_gssapi_supported()
|
||||
*
|
||||
|
@ -321,4 +326,8 @@ void Curl_auth_cleanup_gssapi(struct kerberos5data *krb5)
|
|||
}
|
||||
}
|
||||
|
||||
#if defined(__GNUC__) && defined(__APPLE__)
|
||||
#pragma GCC diagnostic pop
|
||||
#endif
|
||||
|
||||
#endif /* HAVE_GSSAPI && USE_KERBEROS5 */
|
||||
|
|
|
@ -42,6 +42,11 @@
|
|||
#include "curl_memory.h"
|
||||
#include "memdebug.h"
|
||||
|
||||
#if defined(__GNUC__) && defined(__APPLE__)
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Curl_auth_is_spnego_supported()
|
||||
*
|
||||
|
@ -288,4 +293,8 @@ void Curl_auth_cleanup_spnego(struct negotiatedata *nego)
|
|||
nego->havemultiplerequests = FALSE;
|
||||
}
|
||||
|
||||
#if defined(__GNUC__) && defined(__APPLE__)
|
||||
#pragma GCC diagnostic pop
|
||||
#endif
|
||||
|
||||
#endif /* HAVE_GSSAPI && USE_SPNEGO */
|
||||
|
|
|
@ -51,6 +51,11 @@
|
|||
#pragma GCC diagnostic ignored "-Waddress"
|
||||
#endif
|
||||
|
||||
#if defined(__GNUC__) && defined(__APPLE__)
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
|
||||
#endif
|
||||
|
||||
#include <limits.h>
|
||||
|
||||
#include <Security/Security.h>
|
||||
|
@ -2770,6 +2775,10 @@ const struct Curl_ssl Curl_ssl_sectransp = {
|
|||
NULL, /* get_channel_binding */
|
||||
};
|
||||
|
||||
#if defined(__GNUC__) && defined(__APPLE__)
|
||||
#pragma GCC diagnostic pop
|
||||
#endif
|
||||
|
||||
#ifdef __GNUC__
|
||||
#pragma GCC diagnostic pop
|
||||
#endif
|
||||
|
|
Loading…
Reference in New Issue
Block a user