[sysprof] stackstash: ignore dangling-pointer warning in do_callback



commit e9516fb2022d12f4628f1fec62aa65f8f65d7a2c
Author: Christian Hergert <chergert redhat com>
Date:   Fri Apr 1 17:08:42 2022 -0700

    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


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]