mirror of
https://github.com/curl/curl.git
synced 2026-04-14 21:51:41 +03:00
examples: drop warning silencers no longer hit
Also:
- scope clang `-Wcast-function-type-strict` silencing, add missed `pop`.
Follow-up to d06b49d8b2 #18260
Closes #20896
This commit is contained in:
parent
435eabeac8
commit
56739855f3
2 changed files with 7 additions and 13 deletions
|
|
@ -34,15 +34,6 @@
|
|||
|
||||
#include <curl/curl.h>
|
||||
|
||||
#if defined(__GNUC__) || defined(__clang__)
|
||||
#pragma GCC diagnostic ignored "-Woverlength-strings"
|
||||
#endif
|
||||
/* Silence warning when calling sk_X509_INFO_pop_free() */
|
||||
#if defined(__clang__) && __clang_major__ >= 16
|
||||
#pragma clang diagnostic push
|
||||
#pragma clang diagnostic ignored "-Wcast-function-type-strict"
|
||||
#endif
|
||||
|
||||
#if defined(OPENSSL_IS_BORINGSSL) || defined(OPENSSL_IS_AWSLC)
|
||||
typedef size_t ossl_valsize_t;
|
||||
#else
|
||||
|
|
@ -116,7 +107,14 @@ static CURLcode sslctx_function(CURL *curl, void *sslctx, void *pointer)
|
|||
}
|
||||
}
|
||||
|
||||
#if defined(__clang__) && __clang_major__ >= 16
|
||||
#pragma clang diagnostic push
|
||||
#pragma clang diagnostic ignored "-Wcast-function-type-strict"
|
||||
#endif
|
||||
sk_X509_INFO_pop_free(inf, X509_INFO_free);
|
||||
#if defined(__clang__) && __clang_major__ >= 16
|
||||
#pragma clang diagnostic pop
|
||||
#endif
|
||||
|
||||
result = CURLE_OK;
|
||||
|
||||
|
|
|
|||
|
|
@ -40,10 +40,6 @@
|
|||
|
||||
#include <curl/curl.h>
|
||||
|
||||
#if defined(__GNUC__) || defined(__clang__)
|
||||
#pragma GCC diagnostic ignored "-Woverlength-strings"
|
||||
#endif
|
||||
|
||||
static size_t write_cb(void *ptr, size_t size, size_t nmemb, void *stream)
|
||||
{
|
||||
fwrite(ptr, size, nmemb, (FILE *)stream);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue