From e9516fb2022d12f4628f1fec62aa65f8f65d7a2c Mon Sep 17 00:00:00 2001 From: Christian Hergert Date: Fri, 1 Apr 2022 17:08:42 -0700 Subject: [PATCH] stackstash: ignore dangling-pointer warning in do_callback As previously asserted, this just squashes the annoying warnings coming from GCC. --- src/stackstash.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/stackstash.c b/src/stackstash.c index f51737fe..12256184 100644 --- a/src/stackstash.c +++ b/src/stackstash.c @@ -270,6 +270,9 @@ do_callback (StackNode *node, StackFunction func, gpointer data) { +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wdangling-pointer" + StackLink link; if (trace) @@ -298,6 +301,8 @@ do_callback (StackNode *node, g_assert (trace->prev == &link); trace->prev = NULL; } + +#pragma GCC diagnostic pop } void