Skip to content

Commit

Permalink
avoid clang static analyzer false positive
Browse files Browse the repository at this point in the history
  • Loading branch information
farindk committed Aug 24, 2024
1 parent 31d4db0 commit 7189f92
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions libheif/api/libheif/heif.cc
Original file line number Diff line number Diff line change
Expand Up @@ -986,6 +986,8 @@ struct heif_entity_group* heif_context_get_entity_groups(const struct heif_conte
groups[i].entities = (items.empty() ? nullptr : new heif_item_id[items.size()]);
groups[i].num_entities = static_cast<uint32_t>(items.size());

assert((items.size()==0) == items.empty()); // avoid clang static analyzer false positive

for (size_t k = 0; k < items.size(); k++) {
groups[i].entities[k] = items[k];
}
Expand Down

0 comments on commit 7189f92

Please sign in to comment.