]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
vquic: silence `-Wmissing-field-initializers` for nghttp3/ngtcp2 callback tables
authorViktor Szakats <commit@vsz.me>
Sun, 26 Jul 2026 14:57:51 +0000 (16:57 +0200)
committerViktor Szakats <commit@vsz.me>
Mon, 27 Jul 2026 08:16:43 +0000 (10:16 +0200)
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

lib/vquic/cf-ngtcp2-cmn.c
lib/vquic/cf-ngtcp2-proxy.c
lib/vquic/cf-ngtcp2.c

index e6efd2bd64e6a2312196438225ff86f112724d29..c474fdbdc54908a8ec94f227dc5965a2af4fc5ca 100644 (file)
@@ -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)
index 2592b05dab2ebdc5655995bc03f1c31b3cf0036f..ec6de93368af94bc167d3b6da2146948201b9c6b 100644 (file)
@@ -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,
index 9a2b64f235e2fb9169c1dbfd13fae2f34ec858be..4d5c122183fb26028b0b42d41b042f1a02bca2d8 100644 (file)
@@ -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,