From: James Prestwood <prestwoj@gmail.com>
To: ell@lists.linux.dev
Cc: James Prestwood <prestwoj@gmail.com>
Subject: [PATCH 5/5] unit: assert return of several gvariant-util calls
Date: Tue, 5 Mar 2024 05:28:07 -0800 [thread overview]
Message-ID: <20240305132807.85724-5-prestwoj@gmail.com> (raw)
In-Reply-To: <20240305132807.85724-1-prestwoj@gmail.com>
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
next prev parent reply other threads:[~2024-03-05 13:28 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-05 13:28 [PATCH 1/5] cert: remove usused elem_data variable James Prestwood
2024-03-05 13:28 ` [PATCH 2/5] dbus: remove unused 'type' variable James Prestwood
2024-03-05 13:28 ` [PATCH 3/5] gvariant-util: remove unneeded initializer James Prestwood
2024-03-05 13:28 ` [PATCH 4/5] queue: remove unneeded entry advancement James Prestwood
2024-03-05 13:28 ` James Prestwood [this message]
2024-03-12 3:12 ` [PATCH 1/5] cert: remove usused elem_data variable Denis Kenzior
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240305132807.85724-5-prestwoj@gmail.com \
--to=prestwoj@gmail.com \
--cc=ell@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).