lib: fix disabled-verbose-strings + enable-debug build warnings

This commit is contained in:
Daniel Stenberg 2024-09-27 13:19:55 +02:00
parent d78e129d50
commit aca28abac7
No known key found for this signature in database
GPG Key ID: 5CC908FDB71E12C2
3 changed files with 5 additions and 11 deletions

View File

@ -152,8 +152,6 @@ void Curl_infof(struct Curl_easy *data,
*/
void Curl_trc_cf_infof(struct Curl_easy *data, struct Curl_cfilter *cf,
const char *fmt, ...) CURL_PRINTF(3, 4);
void Curl_trc_ft_infof(struct Curl_easy *data, struct curl_trc_feat *ft,
const char *fmt, ...) CURL_PRINTF(3, 4);
void Curl_trc_write(struct Curl_easy *data,
const char *fmt, ...) CURL_PRINTF(2, 3);
void Curl_trc_read(struct Curl_easy *data,
@ -197,13 +195,6 @@ static void Curl_trc_cf_infof(struct Curl_easy *data,
struct curl_trc_feat;
static void Curl_trc_ft_infof(struct Curl_easy *data,
struct curl_trc_feat *ft,
const char *fmt, ...)
{
(void)data; (void)ft; (void)fmt;
}
static void Curl_trc_write(struct Curl_easy *data, const char *fmt, ...)
{
(void)data; (void)fmt;

View File

@ -498,9 +498,10 @@ static int on_header(nghttp2_session *session, const nghttp2_frame *frame,
const uint8_t *value, size_t valuelen,
uint8_t flags,
void *userp);
#if !defined(CURL_DISABLE_VERBOSE_STRINGS)
static int error_callback(nghttp2_session *session, const char *msg,
size_t len, void *userp);
#endif
static CURLcode cf_h2_ctx_open(struct Curl_cfilter *cf,
struct Curl_easy *data)
{
@ -530,7 +531,9 @@ static CURLcode cf_h2_ctx_open(struct Curl_cfilter *cf,
nghttp2_session_callbacks_set_on_begin_headers_callback(
cbs, on_begin_headers);
nghttp2_session_callbacks_set_on_header_callback(cbs, on_header);
#if !defined(CURL_DISABLE_VERBOSE_STRINGS)
nghttp2_session_callbacks_set_error_callback(cbs, error_callback);
#endif
/* The nghttp2 session is not yet setup, do it */
rc = h2_client_new(cf, cbs);

View File

@ -101,7 +101,7 @@ static void multi_xfer_bufs_free(struct Curl_multi *multi);
static void Curl_expire_ex(struct Curl_easy *data, const struct curltime *nowp,
timediff_t milli, expire_id id);
#ifdef DEBUGBUILD
#if defined( DEBUGBUILD) && !defined(CURL_DISABLE_VERBOSE_STRINGS)
static const char * const multi_statename[]={
"INIT",
"PENDING",