From 687ae06293a7be2b995764f0d551fe22c43fb243 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=A9mie=20Galarneau?= Date: Tue, 31 May 2016 07:59:46 -0400 Subject: [PATCH] Tests: Unchecked return value in test_ctf_writer MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Reported by Coverity as: CID 1355342 (#1 of 1): Unchecked return value (CHECKED_RETURN) Signed-off-by: Jérémie Galarneau --- tests/lib/test_ctf_writer.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/tests/lib/test_ctf_writer.c b/tests/lib/test_ctf_writer.c index 09eb05f8..128d60ee 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 618 +#define NR_TESTS 620 static int64_t current_time = 42; @@ -334,7 +334,8 @@ void append_simple_event(struct bt_ctf_stream_class *stream_class, ok(uint_12_type, "Create an unsigned integer type"); - bt_ctf_field_type_integer_set_signed(int_64_type, 1); + ok(!bt_ctf_field_type_integer_set_signed(int_64_type, 1), + "Set signed 64 bit integer signedness to true"); ok(int_64_type, "Create a signed integer type"); enum_type = bt_ctf_field_type_enumeration_create(int_64_type); @@ -1924,7 +1925,8 @@ void type_field_tests() int_16_type = bt_ctf_field_type_integer_create(16); assert(int_16_type); - bt_ctf_field_type_integer_set_signed(int_16_type, 1); + ok(!bt_ctf_field_type_integer_set_signed(int_16_type, 1), + "Set signedness of 16 bit integer to true"); ok(bt_ctf_field_type_integer_get_signed(int_16_type) == 1, "bt_ctf_field_type_integer_get_signed returns a correct value for signed types"); uint_8_type = bt_ctf_field_type_integer_create(8); -- 2.34.1