[PATCH 5/5] unit: assert return of several gvariant-util calls
James Prestwood <[email protected]> Tue, 5 Mar 2024 05:28:07 -0800
| Newsgroups | dev.linux.lists.ell |
|---|---|
| Message-ID | <[email protected]> |
Caught by clang static analysis, there were several calls where the return value was unused. --- unit/test-gvariant-util.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/unit/test-gvariant-util.c b/unit/test-gvariant-util.c index 7b2e860..9a7a5df 100644 --- a/unit/test-gvariant-util.c +++ b/unit/test-gvariant-util.c @@ -644,6 +644,7 @@ static void test_iter_variant_2(const void *test_data) assert(ret); ret = _gvariant_iter_enter_struct(&variant, &structure); + assert(ret); ret = _gvariant_iter_next_entry_basic(&structure, 's', &s); assert(ret); @@ -1047,6 +1048,7 @@ static void test_iter_header_1(const void *test_data) ret = _gvariant_iter_init(&iter, NULL, "a(yv)", NULL, test->data + 16, u); + assert(ret); ret = _gvariant_iter_enter_array(&iter, &array); assert(ret); @@ -1308,6 +1310,7 @@ static void test_builder_fixed_struct_2(const void *test_data) assert(ret); ret = _gvariant_builder_append_basic(builder, 't', &t); + assert(ret); ret = _gvariant_builder_leave_struct(builder); assert(ret); -- 2.34.1