summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPablo Barciela <[email protected]>2019-03-08 01:11:43 +0100
committerZenWalker <[email protected]>2019-03-09 00:29:22 +0100
commitb37ec8892b4121016285d6ae505b6131e87dccb2 (patch)
treef63a4fe69645f763e10bf8d5f8415b791f073d9c /src
parent38cd6190c8b2c1553fa814b23734439e0e95f577 (diff)
downloadmarco-b37ec8892b4121016285d6ae505b6131e87dccb2.tar.bz2
marco-b37ec8892b4121016285d6ae505b6131e87dccb2.tar.xz
boxes: avoid false positive warning in Clang static analyzer
avoid Clang static analyzer warning: core/boxes.c:412:15: warning: Use of memory after it is freed if (meta_rectangle_contains_rect (a, b)) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Diffstat (limited to 'src')
-rw-r--r--src/core/boxes.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/core/boxes.c b/src/core/boxes.c
index 19dd939e..7ae5f699 100644
--- a/src/core/boxes.c
+++ b/src/core/boxes.c
@@ -472,6 +472,9 @@ merge_spanning_rects_in_region (GList *region)
a = compare->data;
}
+ /* avoid false positive warning in Clang static analyzer */
+ g_assert (a != delete_me->data);
+
/* Okay, we can free it now */
g_free (delete_me->data);
region = g_list_delete_link (region, delete_me);