Tests: unchecked return values in test_ctf_writer
authorJérémie Galarneau <jeremie.galarneau@efficios.com>
Mon, 30 May 2016 19:19:07 +0000 (15:19 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Mon, 30 May 2016 19:19:07 +0000 (15:19 -0400)
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 <jeremie.galarneau@efficios.com>
tests/lib/test_ctf_writer.c

index 9d92aa61c1d9b70db1d8b1c3a328a0b616e11af3..ae0f9705e273b204fb3bd1cae7ab9452469ec649 100644 (file)
@@ -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,
This page took 0.026805 seconds and 4 git commands to generate.