From 3523d4ba66a6256e74f3896a039d87f0398d68e7 Mon Sep 17 00:00:00 2001 From: Dana Robinson <43805+derobins@users.noreply.github.com> Date: Tue, 17 Oct 2023 12:14:24 -0700 Subject: Fix unused variable in tselect.c (#3701) --- test/tselect.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/test/tselect.c b/test/tselect.c index 55599b3..55430f2 100644 --- a/test/tselect.c +++ b/test/tselect.c @@ -1875,8 +1875,8 @@ test_select_hyper_contig3(hid_t dset_type, hid_t xfer_plist) ** ****************************************************************/ static void -verify_select_hyper_contig_dr__run_test(const uint16_t *cube_buf, size_t H5_ATTR_NDEBUG_UNUSED cube_size, - unsigned edge_size, unsigned cube_rank) +verify_select_hyper_contig_dr__run_test(const uint16_t *cube_buf, size_t cube_size, unsigned edge_size, + unsigned cube_rank) { const uint16_t *cube_ptr; /* Pointer into the cube buffer */ uint16_t expected_value; /* Expected value in dataset */ @@ -1902,7 +1902,9 @@ verify_select_hyper_contig_dr__run_test(const uint16_t *cube_buf, size_t H5_ATTR m = 0; do { /* Sanity check */ - assert(s < cube_size); + if (s >= cube_size) + TestErrPrintf("s should not be >= cube_size! s = %zu, cube_size = %zu\n", s, + cube_size); /* Check for correct value */ if (*cube_ptr != expected_value) -- cgit v0.12