From 8be1167355678c159e2da984bc4691c467767fc7 Mon Sep 17 00:00:00 2001 From: Jeremy Koritzinsky Date: Wed, 16 Oct 2024 10:28:54 -0700 Subject: [PATCH] Assert/assume that create_find_context in md_find_range_from_cursor is successful so compiler control flow analysis doesn't see fcxt as uninitialized. --- src/dnmd/query.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/dnmd/query.c b/src/dnmd/query.c index a6e062d..2c6d103 100644 --- a/src/dnmd/query.c +++ b/src/dnmd/query.c @@ -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.