From: Jérémie Galarneau Date: Mon, 30 May 2016 19:37:43 +0000 (-0400) Subject: Tests: unchecked return values in test_ctf_writer X-Git-Tag: v2.0.0-pre1~934 X-Git-Url: http://git.efficios.com/?p=babeltrace.git;a=commitdiff_plain;h=822b92d52178fea75a1faaf976e8b234770e9e7e;hp=2c53bf6d7246f741d6361000c5c3eb44ac16bc56 Tests: unchecked return values in test_ctf_writer Reported by Coverity as: CID 1351745: Unchecked return value (CHECKED_RETURN) Signed-off-by: Jérémie Galarneau --- diff --git a/tests/lib/test_ctf_writer.c b/tests/lib/test_ctf_writer.c index 696d99ea..38679d2c 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 616 +#define NR_TESTS 618 static int64_t current_time = 42; @@ -828,10 +828,10 @@ void append_complex_event(struct bt_ctf_stream_class *stream_class, "An unknown entry"), "Reject a variant field based on an unknown tag value"); ok(bt_ctf_field_type_variant_add_field(variant_type, uint_3_type, "UINT3_TYPE") == 0, "Add a field to a variant"); - bt_ctf_field_type_variant_add_field(variant_type, int_16_type, - "INT16_TYPE"); - bt_ctf_field_type_variant_add_field(variant_type, uint_35_type, - "UINT35_TYPE"); + ok(!bt_ctf_field_type_variant_add_field(variant_type, int_16_type, + "INT16_TYPE"), "Add INT16_TYPE field to variant"); + ok(!bt_ctf_field_type_variant_add_field(variant_type, uint_35_type, + "UINT35_TYPE"), "Add UINT35_TYPE field to variant"); ok(bt_ctf_field_type_variant_get_tag_type(NULL) == NULL, "bt_ctf_field_type_variant_get_tag_type handles NULL correctly");