Skip to content

Commit

Permalink
Assert/assume that create_find_context in md_find_range_from_cursor i…
Browse files Browse the repository at this point in the history
…s successful so compiler control flow analysis doesn't see fcxt as uninitialized.
  • Loading branch information
jkoritzinsky committed Oct 16, 2024
1 parent 16dbbab commit 8be1167
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/dnmd/query.c
Original file line number Diff line number Diff line change
Expand Up @@ -625,7 +625,8 @@ md_range_result_t md_find_range_from_cursor(mdcursor_t begin, col_index_t idx, u
find_cxt_t fcxt;
// This was already created and validated when the row was found.
// We assume the data is still valid.
(void)create_find_context(table, idx, &fcxt);
bool success = create_find_context(table, idx, &fcxt);
ASSERT_ASSUME(success);

// A valid value was found, so we are at least within the range.
// Now find the extrema.
Expand Down

0 comments on commit 8be1167

Please sign in to comment.