build: fix building rare combinations

- http/2 + !headers
- gnutls + !verbose
- ssls-export + !verbose

Closes #20712
This commit is contained in:
Viktor Szakats 2026-02-24 13:42:13 +01:00
parent 102d4c8ba9
commit 3e198f7586
No known key found for this signature in database
3 changed files with 10 additions and 4 deletions

View file

@ -55,7 +55,8 @@ CURLcode Curl_headers_cleanup(struct Curl_easy *data);
#else
#define Curl_headers_init(x) CURLE_OK
#define Curl_headers_push(x, y, z, a) CURLE_OK
#define Curl_headers_push(x, y, z, a) \
((void)(x), (void)(y), (void)(z), (void)(a), CURLE_OK)
#define Curl_headers_cleanup(x) Curl_nop_stmt
#endif

View file

@ -2341,6 +2341,7 @@ static int quic_ossl_new_session_cb(SSL *ssl, SSL_SESSION *ssl_sessionid)
#ifdef USE_GNUTLS
#ifdef CURLVERBOSE
static const char *gtls_hs_msg_name(int mtype)
{
switch(mtype) {
@ -2367,6 +2368,7 @@ static const char *gtls_hs_msg_name(int mtype)
}
return "Unknown";
}
#endif
static int quic_gtls_handshake_cb(gnutls_session_t session, unsigned int htype,
unsigned when, unsigned int incoming,

View file

@ -1148,9 +1148,12 @@ CURLcode Curl_ssl_session_export(struct Curl_easy *data,
struct Curl_ssl_scache_peer *peer;
struct dynbuf sbuf, hbuf;
struct Curl_llist_node *n;
size_t i, npeers = 0, ntickets = 0;
size_t i;
curl_off_t now = time(NULL);
CURLcode r = CURLE_OK;
#ifdef CURLVERBOSE
size_t npeers = 0, ntickets = 0;
#endif
if(!export_fn)
return CURLE_BAD_FUNCTION_ARGUMENT;
@ -1173,7 +1176,7 @@ CURLcode Curl_ssl_session_export(struct Curl_easy *data,
cf_scache_peer_remove_expired(peer, now);
n = Curl_llist_head(&peer->sessions);
if(n)
++npeers;
VERBOSE(++npeers);
while(n) {
struct Curl_ssl_session *s = Curl_node_elem(n);
if(!peer->hmac_set) {
@ -1201,7 +1204,7 @@ CURLcode Curl_ssl_session_export(struct Curl_easy *data,
s->alpn, s->earlydata_max);
if(r)
goto out;
++ntickets;
VERBOSE(++ntickets);
n = Curl_node_next(n);
}
}