mirror of
https://github.com/varun-r-mallya/sysprof.git
synced 2025-12-31 20:36:25 +00:00
stackstash: add assertions before silencing warnings
GCC warns about dangling pointers here, which is completely fine given how this code works.
This commit is contained in:
@ -273,7 +273,10 @@ do_callback (StackNode *node,
|
||||
StackLink link;
|
||||
|
||||
if (trace)
|
||||
{
|
||||
g_assert (trace->prev == NULL);
|
||||
trace->prev = &link;
|
||||
}
|
||||
|
||||
link.next = trace;
|
||||
link.prev = NULL;
|
||||
@ -291,7 +294,10 @@ do_callback (StackNode *node,
|
||||
}
|
||||
|
||||
if (trace)
|
||||
{
|
||||
g_assert (trace->prev == &link);
|
||||
trace->prev = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
|
||||
Reference in New Issue
Block a user