mirror of
https://github.com/curl/curl.git
synced 2026-07-28 04:03:14 +03:00
vquic: silence -Wmissing-field-initializers for nghttp3/ngtcp2 callback tables
To avoid a breakage in CI and curl-for-win builds on upstream updates extending the callback lists. Each such breakage needed patching curl, rolling these patches into curl-for-win, and doing it in near real-time, to keep CI and builds working (and still causing some red CI jobs). Bring calmness here by suppressing the warnings and allowing time to extend the callback tables as/if needed and at a convenient moment. Closes #22400
This commit is contained in:
parent
17855dd447
commit
e90c4397c8
3 changed files with 21 additions and 0 deletions
|
|
@ -546,6 +546,10 @@ static int cb_recv_rx_key(ngtcp2_conn *tconn, ngtcp2_encryption_level level,
|
|||
return 0;
|
||||
}
|
||||
|
||||
#ifdef CURL_HAVE_DIAG
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wmissing-field-initializers"
|
||||
#endif
|
||||
static ngtcp2_callbacks ng_callbacks = {
|
||||
ngtcp2_crypto_client_initial_cb,
|
||||
NULL, /* recv_client_initial */
|
||||
|
|
@ -600,6 +604,9 @@ static ngtcp2_callbacks ng_callbacks = {
|
|||
NULL, /* recv_stop_sending */
|
||||
#endif
|
||||
};
|
||||
#ifdef CURL_HAVE_DIAG
|
||||
#pragma GCC diagnostic pop
|
||||
#endif
|
||||
|
||||
#if defined(_MSC_VER) && defined(_DLL)
|
||||
#pragma warning(pop)
|
||||
|
|
|
|||
|
|
@ -601,6 +601,10 @@ static nghttp3_ssize cb_h3_tunnel_read_data(nghttp3_conn *conn,
|
|||
return (nghttp3_ssize)nvecs;
|
||||
}
|
||||
|
||||
#ifdef CURL_HAVE_DIAG
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wmissing-field-initializers"
|
||||
#endif
|
||||
static nghttp3_callbacks ngh3_proxy_callbacks = {
|
||||
cb_h3_proxy_acked_req_body, /* acked_stream_data */
|
||||
cb_h3_proxy_stream_close,
|
||||
|
|
@ -629,6 +633,9 @@ static nghttp3_callbacks ngh3_proxy_callbacks = {
|
|||
NULL, /* stream_close2 */
|
||||
#endif
|
||||
};
|
||||
#ifdef CURL_HAVE_DIAG
|
||||
#pragma GCC diagnostic pop
|
||||
#endif
|
||||
|
||||
static CURLcode cf_ngtcp2_proxy_h3_init(struct Curl_cfilter *cf,
|
||||
struct Curl_easy *data,
|
||||
|
|
|
|||
|
|
@ -386,6 +386,10 @@ static int cb_h3_reset_stream(nghttp3_conn *conn, int64_t stream_id,
|
|||
return 0;
|
||||
}
|
||||
|
||||
#ifdef CURL_HAVE_DIAG
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wmissing-field-initializers"
|
||||
#endif
|
||||
static nghttp3_callbacks ngh3_callbacks = {
|
||||
cb_h3_acked_req_body, /* acked_stream_data */
|
||||
cb_h3_stream_close,
|
||||
|
|
@ -414,6 +418,9 @@ static nghttp3_callbacks ngh3_callbacks = {
|
|||
NULL, /* stream_close2 */
|
||||
#endif
|
||||
};
|
||||
#ifdef CURL_HAVE_DIAG
|
||||
#pragma GCC diagnostic pop
|
||||
#endif
|
||||
|
||||
static CURLcode init_ngh3_conn(struct Curl_cfilter *cf,
|
||||
struct Curl_easy *data,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue