mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-20 00:51:42 +00:00
53 lines
1.7 KiB
Diff
53 lines
1.7 KiB
Diff
From ee8a72764f602928cc08d16d661602c0aefde050 Mon Sep 17 00:00:00 2001
|
|
From: Tyler Veness <calcmogul@gmail.com>
|
|
Date: Tue, 17 May 2022 21:36:57 -0700
|
|
Subject: [PATCH 7/9] Squelch GCC 12.1 warnings
|
|
|
|
---
|
|
src/unix/stream.c | 9 +++++++++
|
|
src/uv-common.c | 9 +++++++++
|
|
2 files changed, 18 insertions(+)
|
|
|
|
diff --git a/src/unix/stream.c b/src/unix/stream.c
|
|
index c6cc50e7..fa25812a 100644
|
|
--- a/src/unix/stream.c
|
|
+++ b/src/unix/stream.c
|
|
@@ -938,7 +938,16 @@ static void uv__write_callbacks(uv_stream_t* stream) {
|
|
if (QUEUE_EMPTY(&stream->write_completed_queue))
|
|
return;
|
|
|
|
+// FIXME: GCC 12.1 gives a possibly real warning, but we don't know how to fix
|
|
+// it
|
|
+#if __GNUC__ >= 12
|
|
+#pragma GCC diagnostic push
|
|
+#pragma GCC diagnostic ignored "-Wdangling-pointer="
|
|
+#endif // __GNUC__ >= 12
|
|
QUEUE_MOVE(&stream->write_completed_queue, &pq);
|
|
+#if __GNUC__ >= 12
|
|
+#pragma GCC diagnostic pop
|
|
+#endif // __GNUC__ >= 12
|
|
|
|
while (!QUEUE_EMPTY(&pq)) {
|
|
/* Pop a req off write_completed_queue. */
|
|
diff --git a/src/uv-common.c b/src/uv-common.c
|
|
index c9a32c03..8ab600df 100644
|
|
--- a/src/uv-common.c
|
|
+++ b/src/uv-common.c
|
|
@@ -504,7 +504,16 @@ void uv_walk(uv_loop_t* loop, uv_walk_cb walk_cb, void* arg) {
|
|
QUEUE* q;
|
|
uv_handle_t* h;
|
|
|
|
+// FIXME: GCC 12.1 gives a possibly real warning, but we don't know how to fix
|
|
+// it
|
|
+#if __GNUC__ >= 12
|
|
+#pragma GCC diagnostic push
|
|
+#pragma GCC diagnostic ignored "-Wdangling-pointer="
|
|
+#endif // __GNUC__ >= 12
|
|
QUEUE_MOVE(&loop->handle_queue, &queue);
|
|
+#if __GNUC__ >= 12
|
|
+#pragma GCC diagnostic pop
|
|
+#endif // __GNUC__ >= 12
|
|
while (!QUEUE_EMPTY(&queue)) {
|
|
q = QUEUE_HEAD(&queue);
|
|
h = QUEUE_DATA(q, uv_handle_t, handle_queue);
|