Port: handle 'size_t' / 'off_t' on Solaris
[babeltrace.git] / lib / ctf-ir / field-types.c
index 1cd231f2113d002049ef96374e993cf06ea1c99a..485c5e8f3ea71e2f68d6b84f62559af01c5a57e2 100644 (file)
@@ -313,6 +313,7 @@ void destroy_structure_field(struct structure_field *field)
        BT_LOGD("Destroying structure/variant field type's field object: "
                "addr=%p, field-ft-addr=%p, field-name=\"%s\"",
                field, field->type, g_quark_to_string(field->name));
+       BT_LOGD_STR("Putting field type.");
        bt_put(field->type);
        g_free(field);
 }
@@ -404,8 +405,12 @@ void bt_ctf_field_type_init(struct bt_ctf_field_type *type, bt_bool init_bo)
        type->serialize = type_serialize_funcs[type->id];
 
        if (init_bo) {
-               int ret = bt_ctf_field_type_set_byte_order(type,
-                       BT_CTF_BYTE_ORDER_NATIVE);
+               int ret;
+               const enum bt_ctf_byte_order bo = BT_CTF_BYTE_ORDER_NATIVE;
+
+               BT_LOGD("Setting initial field type's byte order: bo=%s",
+                       bt_ctf_byte_order_string(bo));
+               ret = bt_ctf_field_type_set_byte_order(type, bo);
                assert(ret == 0);
        }
 
@@ -751,6 +756,7 @@ int bt_ctf_field_type_variant_validate(struct bt_ctf_field_type *type)
        tag_mappings_count =
                bt_ctf_field_type_enumeration_get_mapping_count(
                        (struct bt_ctf_field_type *) variant->tag);
+       assert(tag_mappings_count >= 0);
 
        /*
         * Validate that each mapping found in the tag has a name which
@@ -846,6 +852,7 @@ int bt_ctf_field_type_validate(struct bt_ctf_field_type *type)
 
        if (!ret && type->frozen) {
                /* Field type is valid */
+               BT_LOGV("Marking field type as valid: addr=%p", type);
                type->valid = 1;
        }
 
@@ -974,7 +981,7 @@ end:
 }
 
 int bt_ctf_field_type_integer_set_size(struct bt_ctf_field_type *type,
-               size_t size)
+               unsigned int size)
 {
        int ret = 0;
        struct bt_ctf_field_type_integer *integer;
@@ -1066,6 +1073,7 @@ int bt_ctf_field_type_integer_set_base(struct bt_ctf_field_type *type,
        }
 
        switch (base) {
+       case BT_CTF_INTEGER_BASE_UNSPECIFIED:
        case BT_CTF_INTEGER_BASE_BINARY:
        case BT_CTF_INTEGER_BASE_OCTAL:
        case BT_CTF_INTEGER_BASE_DECIMAL:
@@ -1174,7 +1182,8 @@ end:
        return clock_class;
 }
 
-int bt_ctf_field_type_integer_set_mapped_clock_class(
+BT_HIDDEN
+int bt_ctf_field_type_integer_set_mapped_clock_class_no_check(
                struct bt_ctf_field_type *type,
                struct bt_ctf_clock_class *clock_class)
 {
@@ -1193,10 +1202,10 @@ int bt_ctf_field_type_integer_set_mapped_clock_class(
                goto end;
        }
 
-       if (type->frozen) {
-               BT_LOGW("Invalid parameter: field type is frozen: addr=%p",
-                       type);
-               ret = -1;
+       if (type->id != BT_CTF_FIELD_TYPE_ID_INTEGER) {
+               BT_LOGW("Invalid parameter: field type is not an integer field type: "
+                       "addr=%p, ft-id=%s", type,
+                       bt_ctf_field_type_id_string(type->id));
                goto end;
        }
 
@@ -1219,6 +1228,32 @@ end:
        return ret;
 }
 
+int bt_ctf_field_type_integer_set_mapped_clock_class(
+               struct bt_ctf_field_type *type,
+               struct bt_ctf_clock_class *clock_class)
+{
+       int ret = 0;
+
+       if (!type) {
+               BT_LOGW_STR("Invalid parameter: field type is NULL.");
+               ret = -1;
+               goto end;
+       }
+
+       if (type->frozen) {
+               BT_LOGW("Invalid parameter: field type is frozen: addr=%p",
+                       type);
+               ret = -1;
+               goto end;
+       }
+
+       ret = bt_ctf_field_type_integer_set_mapped_clock_class_no_check(
+               type, clock_class);
+
+end:
+       return ret;
+}
+
 static
 void bt_ctf_field_type_enum_iter_destroy(struct bt_object *obj)
 {
@@ -1227,6 +1262,9 @@ void bt_ctf_field_type_enum_iter_destroy(struct bt_object *obj)
                        struct bt_ctf_field_type_enumeration_mapping_iterator,
                        base);
 
+       BT_LOGD("Destroying enumeration field type mapping iterator: addr=%p",
+               obj);
+       BT_LOGD_STR("Putting parent enumeration field type.");
        bt_put(&iter->enumeration_type->parent);
        g_free(iter);
 }
@@ -1285,13 +1323,18 @@ bt_ctf_field_type_enumeration_find_mappings_by_name(
 
        iter->u.name_quark = g_quark_try_string(name);
        if (!iter->u.name_quark) {
-               BT_LOGE("Cannot get GQuark: string=\"%s\"", name);
+               BT_LOGV("No such enumeration field type mapping name: "
+                       "ft-addr=%p, mapping-name=\"%s\"",
+                       type, name);
                goto error;
        }
 
        /* Advance iterator to first entry, or leave index at -1. */
        if (bt_ctf_field_type_enumeration_mapping_iterator_next(iter)) {
                /* No entry found. */
+               BT_LOGV("No such enumeration field type mapping name: "
+                       "ft-addr=%p, mapping-name=\"%s\"",
+                       type, name);
                goto error;
        }
 
@@ -1351,6 +1394,8 @@ int bt_ctf_field_type_enumeration_mapping_iterator_next(
                        break;
                }
                default:
+                       BT_LOGF("Invalid enumeration field type mapping iterator type: "
+                               "type=%d", iter->type);
                        abort();
                }
        }
@@ -1499,6 +1544,7 @@ int bt_ctf_field_type_enumeration_get_mapping_signed(
 
        if (mapping_name) {
                *mapping_name = g_quark_to_string(mapping->string);
+               assert(*mapping_name);
        }
 
        if (range_begin) {
@@ -1536,6 +1582,7 @@ int bt_ctf_field_type_enumeration_get_mapping_unsigned(
 
        if (mapping_name) {
                *mapping_name = g_quark_to_string(mapping->string);
+               assert(*mapping_name);
        }
 
        if (range_begin) {
@@ -2156,6 +2203,7 @@ int bt_ctf_field_type_structure_get_field_by_index(
        }
        if (field_name) {
                *field_name = g_quark_to_string(field->name);
+               assert(*field_name);
        }
 end:
        return ret;
@@ -2183,14 +2231,19 @@ struct bt_ctf_field_type *bt_ctf_field_type_structure_get_field_type_by_name(
 
        name_quark = g_quark_try_string(name);
        if (!name_quark) {
-               BT_LOGE("Cannot get GQuark: string=\"%s\"", name);
+               BT_LOGV("No such structure field type field name: "
+                       "ft-addr=%p, field-name=\"%s\"",
+                       type, name);
                goto end;
        }
 
        structure = container_of(type, struct bt_ctf_field_type_structure,
                parent);
        if (!g_hash_table_lookup_extended(structure->field_name_to_index,
-               GUINT_TO_POINTER(name_quark), NULL, (gpointer *)&index)) {
+                       GUINT_TO_POINTER(name_quark), NULL, (gpointer *)&index)) {
+               BT_LOGV("No such structure field type field name: "
+                       "ft-addr=%p, field-name=\"%s\"",
+                       type, name);
                goto end;
        }
 
@@ -2467,13 +2520,18 @@ struct bt_ctf_field_type *bt_ctf_field_type_variant_get_field_type_by_name(
 
        name_quark = g_quark_try_string(field_name);
        if (!name_quark) {
-               BT_LOGE("Cannot get GQuark: string=\"%s\"", field_name);
+               BT_LOGV("No such variant field type field name: "
+                       "ft-addr=%p, field-name=\"%s\"",
+                       type, field_name);
                goto end;
        }
 
        variant = container_of(type, struct bt_ctf_field_type_variant, parent);
        if (!g_hash_table_lookup_extended(variant->field_name_to_index,
-               GUINT_TO_POINTER(name_quark), NULL, (gpointer *)&index)) {
+                       GUINT_TO_POINTER(name_quark), NULL, (gpointer *)&index)) {
+               BT_LOGV("No such variant field type field name: "
+                       "ft-addr=%p, field-name=\"%s\"",
+                       type, field_name);
                goto end;
        }
 
@@ -2598,6 +2656,7 @@ int bt_ctf_field_type_variant_get_field_by_index(struct bt_ctf_field_type *type,
        }
        if (field_name) {
                *field_name = g_quark_to_string(field->name);
+               assert(*field_name);
        }
 end:
        return ret;
@@ -3165,7 +3224,7 @@ int bt_ctf_field_type_set_byte_order(struct bt_ctf_field_type *type,
                        byte_order != BT_CTF_BYTE_ORDER_LITTLE_ENDIAN &&
                        byte_order != BT_CTF_BYTE_ORDER_BIG_ENDIAN &&
                        byte_order != BT_CTF_BYTE_ORDER_NETWORK) {
-               BT_LOGW("Invalid parameter: unknown byte order: "
+               BT_LOGW("Invalid parameter: invalid byte order: "
                        "addr=%p, bo=%s", type,
                        bt_ctf_byte_order_string(byte_order));
                ret = -1;
@@ -3280,7 +3339,7 @@ struct bt_ctf_field_type *bt_ctf_field_type_variant_get_field_type_signed(
 
        field_name_quark = query.mapping_name;
        if (!g_hash_table_lookup_extended(variant->field_name_to_index,
-               GUINT_TO_POINTER(field_name_quark), NULL, &index)) {
+                       GUINT_TO_POINTER(field_name_quark), NULL, &index)) {
                goto end;
        }
 
@@ -3398,7 +3457,9 @@ int bt_ctf_field_type_structure_get_field_name_index(
 
        name_quark = g_quark_try_string(name);
        if (!name_quark) {
-               BT_LOGE("Cannot get GQuark: string=\"%s\"", name);
+               BT_LOGV("No such structure field type field name: "
+                       "ft-addr=%p, field-name=\"%s\"",
+                       type, name);
                ret = -1;
                goto end;
        }
@@ -3406,7 +3467,11 @@ int bt_ctf_field_type_structure_get_field_name_index(
        structure = container_of(type, struct bt_ctf_field_type_structure,
                parent);
        if (!g_hash_table_lookup_extended(structure->field_name_to_index,
-               GUINT_TO_POINTER(name_quark), NULL, (gpointer *)&index)) {
+                       GUINT_TO_POINTER(name_quark),
+                       NULL, (gpointer *)&index)) {
+               BT_LOGV("No such structure field type field name: "
+                       "ft-addr=%p, field-name=\"%s\"",
+                       type, name);
                ret = -1;
                goto end;
        }
@@ -3446,7 +3511,9 @@ int bt_ctf_field_type_variant_get_field_name_index(
 
        name_quark = g_quark_try_string(name);
        if (!name_quark) {
-               BT_LOGE("Cannot get GQuark: string=\"%s\"", name);
+               BT_LOGV("No such variant field type field name: "
+                       "ft-addr=%p, field-name=\"%s\"",
+                       type, name);
                ret = -1;
                goto end;
        }
@@ -3454,7 +3521,11 @@ int bt_ctf_field_type_variant_get_field_name_index(
        variant = container_of(type, struct bt_ctf_field_type_variant,
                parent);
        if (!g_hash_table_lookup_extended(variant->field_name_to_index,
-               GUINT_TO_POINTER(name_quark), NULL, (gpointer *)&index)) {
+                       GUINT_TO_POINTER(name_quark),
+                       NULL, (gpointer *)&index)) {
+               BT_LOGV("No such variant field type field name: "
+                       "ft-addr=%p, field-name=\"%s\"",
+                       type, name);
                ret = -1;
                goto end;
        }
@@ -3578,6 +3649,7 @@ void bt_ctf_field_type_integer_destroy(struct bt_ctf_field_type *type)
        }
 
        BT_LOGD("Destroying integer field type object: addr=%p", type);
+       BT_LOGD_STR("Putting mapped clock class.");
        bt_put(integer->mapped_clock);
        g_free(integer);
 }
@@ -3594,6 +3666,7 @@ void bt_ctf_field_type_enumeration_destroy(struct bt_ctf_field_type *type)
 
        BT_LOGD("Destroying enumeration field type object: addr=%p", type);
        g_ptr_array_free(enumeration->entries, TRUE);
+       BT_LOGD_STR("Putting container field type.");
        bt_put(enumeration->container);
        g_free(enumeration);
 }
@@ -3642,6 +3715,7 @@ void bt_ctf_field_type_variant_destroy(struct bt_ctf_field_type *type)
        g_ptr_array_free(variant->fields, TRUE);
        g_hash_table_destroy(variant->field_name_to_index);
        g_string_free(variant->tag_name, TRUE);
+       BT_LOGD_STR("Putting tag field type.");
        bt_put(&variant->tag->parent);
        BT_PUT(variant->tag_field_path);
        g_free(variant);
@@ -3658,6 +3732,7 @@ void bt_ctf_field_type_array_destroy(struct bt_ctf_field_type *type)
        }
 
        BT_LOGD("Destroying array field type object: addr=%p", type);
+       BT_LOGD_STR("Putting element field type.");
        bt_put(array->element_type);
        g_free(array);
 }
@@ -3673,8 +3748,10 @@ void bt_ctf_field_type_sequence_destroy(struct bt_ctf_field_type *type)
        }
 
        BT_LOGD("Destroying sequence field type object: addr=%p", type);
+       BT_LOGD_STR("Putting element field type.");
        bt_put(sequence->element_type);
        g_string_free(sequence->length_field_name, TRUE);
+       BT_LOGD_STR("Putting length field path.");
        BT_PUT(sequence->length_field_path);
        g_free(sequence);
 }
@@ -3708,6 +3785,7 @@ void bt_ctf_field_type_integer_freeze(struct bt_ctf_field_type *type)
        BT_LOGD("Freezing integer field type object: addr=%p", type);
 
        if (integer_type->mapped_clock) {
+               BT_LOGD_STR("Freezing integer field type's mapped clock class.");
                bt_ctf_clock_class_freeze(integer_type->mapped_clock);
        }
 
@@ -3823,6 +3901,7 @@ const char *get_integer_base_string(enum bt_ctf_integer_base base)
 
        switch (base) {
        case BT_CTF_INTEGER_BASE_DECIMAL:
+       case BT_CTF_INTEGER_BASE_UNSPECIFIED:
                base_string = "decimal";
                break;
        case BT_CTF_INTEGER_BASE_HEXADECIMAL:
@@ -3890,6 +3969,7 @@ int bt_ctf_field_type_enumeration_serialize(struct bt_ctf_field_type *type,
        container_signed = bt_ctf_field_type_integer_get_signed(container_type);
        assert(container_signed >= 0);
        g_string_append(context->string, "enum : ");
+       BT_LOGD_STR("Serializing enumeration field type's container field type's metadata.");
        ret = bt_ctf_field_type_serialize(enumeration->container, context);
        if (ret) {
                BT_LOGW("Cannot serialize enumeration field type's container field type's metadata: "
@@ -3971,7 +4051,7 @@ int bt_ctf_field_type_structure_serialize(struct bt_ctf_field_type *type,
 {
        size_t i;
        unsigned int indent;
-       int64_t ret = 0;
+       int ret = 0;
        struct bt_ctf_field_type_structure *structure = container_of(type,
                struct bt_ctf_field_type_structure, parent);
        GString *structure_field_name = context->field_name;
@@ -3986,8 +4066,8 @@ int bt_ctf_field_type_structure_serialize(struct bt_ctf_field_type *type,
        for (i = 0; i < structure->fields->len; i++) {
                struct structure_field *field = structure->fields->pdata[i];
 
-               BT_LOGV("Serializing structure field type's field metadata: "
-                       "index=%" PRId64 ", "
+               BT_LOGD("Serializing structure field type's field metadata: "
+                       "index=%zu, "
                        "field-ft-addr=%p, field-name=\"%s\"",
                        i, field, g_quark_to_string(field->name));
 
@@ -4001,7 +4081,7 @@ int bt_ctf_field_type_structure_serialize(struct bt_ctf_field_type *type,
                ret = bt_ctf_field_type_serialize(field->type, context);
                if (ret) {
                        BT_LOGW("Cannot serialize structure field type's field's metadata: "
-                               "index=%" PRId64 ", "
+                               "index=%zu, "
                                "field-ft-addr=%p, field-name=\"%s\"",
                                i, field->type,
                                g_quark_to_string(field->name));
@@ -4054,8 +4134,8 @@ int bt_ctf_field_type_variant_serialize(struct bt_ctf_field_type *type,
        for (i = 0; i < variant->fields->len; i++) {
                struct structure_field *field = variant->fields->pdata[i];
 
-               BT_LOGV("Serializing variant field type's field metadata: "
-                       "index=%" PRId64 ", "
+               BT_LOGD("Serializing variant field type's field metadata: "
+                       "index=%zu, "
                        "field-ft-addr=%p, field-name=\"%s\"",
                        i, field, g_quark_to_string(field->name));
 
@@ -4071,7 +4151,7 @@ int bt_ctf_field_type_variant_serialize(struct bt_ctf_field_type *type,
                ret = bt_ctf_field_type_serialize(field->type, context);
                if (ret) {
                        BT_LOGW("Cannot serialize variant field type's field's metadata: "
-                               "index=%" PRId64 ", "
+                               "index=%zu, "
                                "field-ft-addr=%p, field-name=\"%s\"",
                                i, field->type,
                                g_quark_to_string(field->name));
@@ -4109,6 +4189,7 @@ int bt_ctf_field_type_array_serialize(struct bt_ctf_field_type *type,
 
        BT_LOGD("Serializing array field type's metadata: "
                "ft-addr=%p, metadata-context-addr=%p", type, context);
+       BT_LOGD_STR("Serializing array field type's element field type's metadata.");
        ret = bt_ctf_field_type_serialize(array->element_type, context);
        if (ret) {
                BT_LOGW("Cannot serialize array field type's element field type's metadata: "
@@ -4137,6 +4218,7 @@ int bt_ctf_field_type_sequence_serialize(struct bt_ctf_field_type *type,
 
        BT_LOGD("Serializing sequence field type's metadata: "
                "ft-addr=%p, metadata-context-addr=%p", type, context);
+       BT_LOGD_STR("Serializing sequence field type's element field type's metadata.");
        ret = bt_ctf_field_type_serialize(sequence->element_type, context);
        if (ret) {
                BT_LOGW("Cannot serialize sequence field type's element field type's metadata: "
@@ -4320,6 +4402,7 @@ struct bt_ctf_field_type *bt_ctf_field_type_enumeration_copy(
                parent);
 
        /* Copy the source enumeration's container */
+       BT_LOGD_STR("Copying enumeration field type's container field type.");
        copy_container = bt_ctf_field_type_copy(enumeration->container);
        if (!copy_container) {
                BT_LOGE_STR("Cannot copy enumeration field type's container field type.");
@@ -4423,7 +4506,7 @@ struct bt_ctf_field_type *bt_ctf_field_type_structure_copy(
                struct bt_ctf_field_type *copy_field;
 
                entry = g_ptr_array_index(structure->fields, i);
-               BT_LOGV("Copying structure field type's field: "
+               BT_LOGD("Copying structure field type's field: "
                        "index=%" PRId64 ", "
                        "field-ft-addr=%p, field-name=\"%s\"",
                        i, entry, g_quark_to_string(entry->name));
@@ -4472,6 +4555,7 @@ struct bt_ctf_field_type *bt_ctf_field_type_variant_copy(
        variant = container_of(type, struct bt_ctf_field_type_variant,
                parent);
        if (variant->tag) {
+               BT_LOGD_STR("Copying variant field type's tag field type.");
                copy_tag = bt_ctf_field_type_copy(&variant->tag->parent);
                if (!copy_tag) {
                        BT_LOGE_STR("Cannot copy variant field type's tag field type.");
@@ -4501,7 +4585,7 @@ struct bt_ctf_field_type *bt_ctf_field_type_variant_copy(
                struct bt_ctf_field_type *copy_field;
 
                entry = g_ptr_array_index(variant->fields, i);
-               BT_LOGV("Copying variant field type's field: "
+               BT_LOGD("Copying variant field type's field: "
                        "index=%" PRId64 ", "
                        "field-ft-addr=%p, field-name=\"%s\"",
                        i, entry, g_quark_to_string(entry->name));
@@ -4527,7 +4611,7 @@ struct bt_ctf_field_type *bt_ctf_field_type_variant_copy(
        }
 
        if (variant->tag_field_path) {
-               BT_LOGV_STR("Copying variant field type's tag field path.");
+               BT_LOGD_STR("Copying variant field type's tag field path.");
                copy_variant->tag_field_path = bt_ctf_field_path_copy(
                        variant->tag_field_path);
                if (!copy_variant->tag_field_path) {
@@ -4558,6 +4642,7 @@ struct bt_ctf_field_type *bt_ctf_field_type_array_copy(
        BT_LOGD("Copying array field type's: addr=%p", type);
        array = container_of(type, struct bt_ctf_field_type_array,
                parent);
+       BT_LOGD_STR("Copying array field type's element field type.");
        copy_element = bt_ctf_field_type_copy(array->element_type);
        if (!copy_element) {
                BT_LOGE_STR("Cannot copy array field type's element field type.");
@@ -4588,6 +4673,7 @@ struct bt_ctf_field_type *bt_ctf_field_type_sequence_copy(
        BT_LOGD("Copying sequence field type's: addr=%p", type);
        sequence = container_of(type, struct bt_ctf_field_type_sequence,
                parent);
+       BT_LOGD_STR("Copying sequence field type's element field type.");
        copy_element = bt_ctf_field_type_copy(sequence->element_type);
        if (!copy_element) {
                BT_LOGE_STR("Cannot copy sequence field type's element field type.");
@@ -4605,7 +4691,7 @@ struct bt_ctf_field_type *bt_ctf_field_type_sequence_copy(
        copy_sequence = container_of(copy, struct bt_ctf_field_type_sequence,
                parent);
        if (sequence->length_field_path) {
-               BT_LOGV_STR("Copying sequence field type's length field path.");
+               BT_LOGD_STR("Copying sequence field type's length field path.");
                copy_sequence->length_field_path = bt_ctf_field_path_copy(
                        sequence->length_field_path);
                if (!copy_sequence->length_field_path) {
@@ -4630,7 +4716,6 @@ struct bt_ctf_field_type *bt_ctf_field_type_string_copy(
                struct bt_ctf_field_type *type)
 {
        struct bt_ctf_field_type *copy;
-       struct bt_ctf_field_type_string *string;
 
        BT_LOGD("Copying string field type's: addr=%p", type);
        copy = bt_ctf_field_type_string_create();
@@ -4639,8 +4724,6 @@ struct bt_ctf_field_type *bt_ctf_field_type_string_copy(
                goto end;
        }
 
-       string = container_of(type, struct bt_ctf_field_type_string,
-               parent);
        BT_LOGD("Copied string field type: original-ft-addr=%p, copy-ft-addr=%p",
                type, copy);
 end:
@@ -4708,8 +4791,8 @@ int bt_ctf_field_type_integer_compare(struct bt_ctf_field_type *type_a,
        if (int_type_a->mapped_clock != int_type_b->mapped_clock) {
                BT_LOGV("Integer field types differ: different mapped clock classes: "
                        "ft-a-mapped-clock-class-addr=%p, "
-                       "ft-b-mapped-clock-class-addr=%p, ",
-                       "ft-a-mapped-clock-class-name=\"%s\", ",
+                       "ft-b-mapped-clock-class-addr=%p, "
+                       "ft-a-mapped-clock-class-name=\"%s\", "
                        "ft-b-mapped-clock-class-name=\"%s\"",
                        int_type_a->mapped_clock, int_type_b->mapped_clock,
                        int_type_a->mapped_clock ? bt_ctf_clock_class_get_name(int_type_a->mapped_clock) : "",
@@ -4749,7 +4832,7 @@ int bt_ctf_field_type_floating_point_compare(struct bt_ctf_field_type *type_a,
        /* Exponent length */
        if (float_a->exp_dig != float_b->exp_dig) {
                BT_LOGV("Floating point number field types differ: different exponent sizes: "
-                       "ft-a-exp-size=%s, ft-b-exp-size=%s",
+                       "ft-a-exp-size=%u, ft-b-exp-size=%u",
                        float_a->exp_dig, float_b->exp_dig);
                goto end;
        }
@@ -4757,7 +4840,7 @@ int bt_ctf_field_type_floating_point_compare(struct bt_ctf_field_type *type_a,
        /* Mantissa length */
        if (float_a->mant_dig != float_b->mant_dig) {
                BT_LOGV("Floating point number field types differ: different mantissa sizes: "
-                       "ft-a-mant-size=%s, ft-b-mant-size=%s",
+                       "ft-a-mant-size=%u, ft-b-mant-size=%u",
                        float_a->mant_dig, float_b->mant_dig);
                goto end;
        }
@@ -4915,7 +4998,7 @@ int compare_structure_fields(struct structure_field *field_a,
        ret = bt_ctf_field_type_compare(field_a->type, field_b->type);
        if (ret == 1) {
                BT_LOGV("Structure/variant field type fields differ: different field types: "
-                       "field-name=\"%s\", field-a-ft-addr=%s, field-b-ft-addr=%s",
+                       "field-name=\"%s\", field-a-ft-addr=%p, field-b-ft-addr=%p",
                        g_quark_to_string(field_a->name),
                        field_a->type, field_b->type);
        }
@@ -4994,7 +5077,7 @@ int bt_ctf_field_type_variant_compare(struct bt_ctf_field_type *type_a,
        /* Tag name */
        if (strcmp(variant_a->tag_name->str, variant_b->tag_name->str)) {
                BT_LOGV("Variant field types differ: different tag field names: "
-                       "ft-a-tag-field-name=%u, ft-b-tag-field-name=%u",
+                       "ft-a-tag-field-name=\"%s\", ft-b-tag-field-name=\"%s\"",
                        variant_a->tag_name->str, variant_b->tag_name->str);
                goto end;
        }
@@ -5092,7 +5175,8 @@ int bt_ctf_field_type_sequence_compare(struct bt_ctf_field_type *type_a,
        if (strcmp(sequence_a->length_field_name->str,
                        sequence_b->length_field_name->str)) {
                BT_LOGV("Sequence field types differ: different length field names: "
-                       "ft-a-length-field-name=%u, ft-b-length-field-name=%u",
+                       "ft-a-length-field-name=\"%s\", "
+                       "ft-b-length-field-name=\"%s\"",
                        sequence_a->length_field_name->str,
                        sequence_b->length_field_name->str);
                goto end;
This page took 0.031063 seconds and 4 git commands to generate.