void append_trace_metadata(struct bt_ctf_writer *writer,
struct metadata_context *context)
{
+ unsigned char *uuid = writer->uuid;
+ int ret;
+
g_string_append(context->string, "trace {\n");
g_string_append(context->string, "\tmajor = 1;\n");
g_string_append(context->string, "\tminor = 8;\n");
- unsigned char *uuid = writer->uuid;
g_string_append_printf(context->string,
"\tuuid = \"%02x%02x%02x%02x-%02x%02x-%02x%02x-%02x%02x-%02x%02x%02x%02x%02x%02x\";\n",
uuid[0], uuid[1], uuid[2], uuid[3],
g_string_append(context->string, "\tpacket.header := ");
context->current_indentation_level++;
g_string_assign(context->field_name, "");
- bt_ctf_field_type_serialize(writer->trace_packet_header_type, context);
+ ret = bt_ctf_field_type_serialize(writer->trace_packet_header_type,
+ context);
+ assert(!ret);
context->current_indentation_level--;
g_string_append(context->string, ";\n};\n\n");