mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-09 10:20:07 +00:00
roaring: Fix a compiler warning
This is a simple fix, I did not investigate if NULL is actually possible here. In function ‘bitset_container_empty’, inlined from ‘bitset_container_const_nonzero_cardinality’ at ../gtk/roaring/roaring.h:1942:13, inlined from ‘container_nonzero_cardinality’ at ../gtk/roaring/roaring.h:4055:20, inlined from ‘roaring_bitmap_lazy_xor’ at ../gtk/roaring/roaring.c:9727:17: ../gtk/roaring/roaring.h:1928:13: error: potential null pointer dereference [-Werror=null-dereference] 1928 | if (bitset->cardinality == BITSET_UNKNOWN_CARDINALITY) { | ~~~~~~^~~~~~~~~~~~~
This commit is contained in:
parent
c60ae0b575
commit
6c06e1855e
@ -9724,7 +9724,7 @@ roaring_bitmap_t *roaring_bitmap_lazy_xor(const roaring_bitmap_t *x1,
|
||||
container_lazy_xor(c1, container_type_1, c2, container_type_2,
|
||||
&container_result_type);
|
||||
|
||||
if (container_nonzero_cardinality(c, container_result_type)) {
|
||||
if (c && container_nonzero_cardinality(c, container_result_type)) {
|
||||
ra_append(&answer->high_low_container, s1, c,
|
||||
container_result_type);
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user