This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] misc: Add twalk_r function
* Joseph Myers:
> On Thu, 2 May 2019, Florian Weimer wrote:
>
>> It's arguably a test bug. Does this patch fix it for you?
>
> Yes, this fixes the testsuite build.
Thanks, this is what I pushed to master.
Florian
misc/tst-tsearch: Additional explicit error checking
This avoids an undefined variable warning with certain GCC versions.
2019-05-03 Florian Weimer <fweimer@redhat.com>
* misc/tst-tsearch.c (walk_tree): Add more error checking.
diff --git a/misc/tst-tsearch.c b/misc/tst-tsearch.c
index 9a570dd6c9..44895d4c0a 100644
--- a/misc/tst-tsearch.c
+++ b/misc/tst-tsearch.c
@@ -223,8 +223,10 @@ walk_tree (void *root, int expected_count)
size_t first_list_size;
struct walk_trace_element *first_list
= walk_trace_finalize (&walk_trace, &first_list_size);
+ TEST_VERIFY_EXIT (first_list != NULL);
walk_tree_with (root, expected_count, twalk_with_twalk_r);
+ TEST_VERIFY (!walk_trace_has_failed (&walk_trace));
/* Compare the two traces. */
TEST_COMPARE (first_list_size, walk_trace_size (&walk_trace));