From 6f01055683febfdf081fe0758ebd8564aace0f70 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=A9mie=20Galarneau?= Date: Mon, 30 May 2016 15:19:07 -0400 Subject: [PATCH] Tests: unchecked return values in test_ctf_writer MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Reported by Coverity as: CID 1351743 (#1 of 1): Unchecked return value (CHECKED_RETURN) CID 1351740 (#1 of 1): Unchecked return value (CHECKED_RETURN) CID 1351741 (#1 of 1): Unchecked return value (CHECKED_RETURN) Signed-off-by: Jérémie Galarneau --- tests/lib/test_ctf_writer.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/tests/lib/test_ctf_writer.c b/tests/lib/test_ctf_writer.c index 9d92aa61..ae0f9705 100644 --- a/tests/lib/test_ctf_writer.c +++ b/tests/lib/test_ctf_writer.c @@ -59,7 +59,7 @@ #define DEFAULT_CLOCK_TIME 0 #define DEFAULT_CLOCK_VALUE 0 -#define NR_TESTS 606 +#define NR_TESTS 609 static int64_t current_time = 42; @@ -768,10 +768,13 @@ void append_complex_event(struct bt_ctf_stream_class *stream_class, "bt_ctf_field_type_set_alignment handles wrong alignment correctly (24)"); ok(!bt_ctf_field_type_set_alignment(int_16_type, 4), "bt_ctf_field_type_set_alignment handles correct alignment correctly (4)"); - bt_ctf_field_type_set_alignment(int_16_type, 32); - bt_ctf_field_type_integer_set_signed(int_16_type, 1); - bt_ctf_field_type_integer_set_base(uint_35_type, - BT_CTF_INTEGER_BASE_HEXADECIMAL); + ok(!bt_ctf_field_type_set_alignment(int_16_type, 32), + "Set alignment of signed 16 bit integer to 32"); + ok(!bt_ctf_field_type_integer_set_signed(int_16_type, 1), + "Set integer signedness to true"); + ok(!bt_ctf_field_type_integer_set_base(uint_35_type, + BT_CTF_INTEGER_BASE_HEXADECIMAL), + "Set signed 16 bit integer base to hexadecimal"); array_type = bt_ctf_field_type_array_create(int_16_type, ARRAY_TEST_LENGTH); sequence_type = bt_ctf_field_type_sequence_create(int_16_type, -- 2.34.1