Logging: fix wrong parameters, superfluous commas, etc.
authorPhilippe Proulx <eeppeliteloop@gmail.com>
Sat, 20 May 2017 00:32:16 +0000 (20:32 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Sun, 28 May 2017 16:57:44 +0000 (12:57 -0400)
Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
cli/babeltrace.c
lib/ctf-ir/attributes.c
lib/ctf-ir/event-class.c
lib/ctf-ir/field-types.c
lib/ctf-ir/fields.c
lib/values.c

index 124ee53ae54b29ac34c9dc0eabe4ccb42a12f521..1af0e21b5f7f7aeb3b13c5b468f9a9989a32deb9 100644 (file)
@@ -1564,7 +1564,7 @@ int cmd_run_ctx_create_components_from_config_components(
                        cfg_comp->instance_name->str, cfg_comp->params);
                if (!comp) {
                        BT_LOGE("Cannot create component: plugin-name=\"%s\", "
-                               "comp-cls-name=\"%s\", comp-cls-type=%d",
+                               "comp-cls-name=\"%s\", comp-cls-type=%d, "
                                "comp-name=\"%s\"",
                                cfg_comp->plugin_name->str,
                                cfg_comp->comp_cls_name->str,
index f0029a048dbd9aad81168a58f46dbdc49450226f..f7e03a86cf9e89dd54bebb8fc9b258ebb2126f82 100644 (file)
@@ -186,7 +186,7 @@ struct bt_value *bt_ctf_attributes_get_field_by_name(
                if (!attr_field_name_obj) {
                        BT_LOGE("Cannot get attribute array value's element by index: "
                                "value-addr=%p, index=%" PRIu64,
-                               value_obj, 0);
+                               value_obj, (int64_t) 0);
                        goto error;
                }
 
index 4e71ab55ac17abe00caaf9a2de426598157822be..f1859d347cbb58f9b639b141481c2d2358c2a6d1 100644 (file)
@@ -420,7 +420,7 @@ bt_ctf_event_class_get_attribute_value_by_name(
        struct bt_value *ret;
 
        if (!event_class || !name) {
-               BT_LOGW("Invalid parameter: event class or name is NULL: ",
+               BT_LOGW("Invalid parameter: event class or name is NULL: "
                        "event-class-addr=%p, name-addr=%p",
                        event_class, name);
                ret = NULL;
@@ -621,7 +621,7 @@ bt_ctf_event_class_get_payload_type_field_type_by_name(
        struct bt_ctf_field_type *field_type = NULL;
 
        if (!event_class || !name) {
-               BT_LOGW("Invalid parameter: event class or name is NULL: ",
+               BT_LOGW("Invalid parameter: event class or name is NULL: "
                        "event-class-addr=%p, name-addr=%p",
                        event_class, name);
                goto end;
index 0cf5d1ef4293c7a0f3732f4be49ee59346abfec8..4a4d789c48e8c5c394e6706781ca8b7d6c37a5fd 100644 (file)
@@ -1009,14 +1009,14 @@ int bt_ctf_field_type_integer_set_size(struct bt_ctf_field_type *type,
 
        if (size == 0 || size > 64) {
                BT_LOGW("Invalid parameter: size must be between 1 and 64: "
-                       "addr=%p, size=%u", type, size);
+                       "addr=%p, size=%zu", type, size);
                ret = -1;
                goto end;
        }
 
        integer = container_of(type, struct bt_ctf_field_type_integer, parent);
        integer->size = size;
-       BT_LOGV("Set integer field type's size: addr=%p, size=%u",
+       BT_LOGV("Set integer field type's size: addr=%p, size=%zu",
                type, size);
 end:
        return ret;
@@ -4792,8 +4792,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) : "",
@@ -4833,7 +4833,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;
        }
@@ -4841,7 +4841,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;
        }
@@ -4999,7 +4999,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);
        }
@@ -5078,7 +5078,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;
        }
@@ -5176,7 +5176,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;
index 6caf2e45658524d9bced4df764bae3577a5fcb22..d95fe3351af5199bf249e926b0038f050ce08c8c 100644 (file)
@@ -2831,7 +2831,7 @@ int bt_ctf_field_structure_copy(struct bt_ctf_field *src,
                struct bt_ctf_field *field_copy = NULL;
 
                if (field) {
-                       BT_LOGD("Copying structure field's field: src-field-addr=%p",
+                       BT_LOGD("Copying structure field's field: src-field-addr=%p"
                                "index=%" PRId64, field, i);
                        field_copy = bt_ctf_field_copy(field);
                        if (!field_copy) {
index bf4bc2d61795802d2f4cd59987b60b7847be4415..65f53ebc9eace7942283b1a6a682d43acaeeda4c 100644 (file)
@@ -394,7 +394,7 @@ bt_bool bt_value_array_compare(const struct bt_value *object_a,
                if (!bt_value_compare(element_obj_a, element_obj_b)) {
                        BT_LOGV("Array values's elements are different: "
                                "value-a-addr=%p, value-b-addr=%p, index=%d",
-                               element_obj_a, element_obj_b, index);
+                               element_obj_a, element_obj_b, i);
                        BT_PUT(element_obj_a);
                        BT_PUT(element_obj_b);
                        ret = BT_FALSE;
@@ -670,7 +670,7 @@ struct bt_value *bt_value_string_create_init(const char *val)
                goto end;
        }
 
-       BT_LOGD("Creating string value object: val-len=%u", strlen(val));
+       BT_LOGD("Creating string value object: val-len=%lu", strlen(val));
        string_obj = g_new0(struct bt_value_string, 1);
 
        if (!string_obj) {
@@ -776,7 +776,7 @@ enum bt_value_status bt_value_bool_get(const struct bt_value *bool_obj,
 
        if (!bt_value_is_bool(bool_obj)) {
                BT_LOGW("Invalid parameter: value is not a boolean value: addr=%p, "
-                       "type=%s", bool_obj, bool_obj->type,
+                       "type=%s", bool_obj,
                        bt_value_type_string(bool_obj->type));
                ret = BT_VALUE_STATUS_INVAL;
                goto end;
@@ -1577,13 +1577,13 @@ struct bt_value *bt_value_map_extend(struct bt_value *base_map_obj,
 
        if (bt_value_map_foreach(extension_obj, extend_map_element,
                        &extend_data)) {
-               BT_LOGE("Cannot iterate on the extension object's elements: ",
+               BT_LOGE("Cannot iterate on the extension object's elements: "
                        "extension-value-addr=%p", extension_obj);
                goto error;
        }
 
        if (extend_data.got_error) {
-               BT_LOGE("Failed to successfully iterate on the extension object's elements: ",
+               BT_LOGE("Failed to successfully iterate on the extension object's elements: "
                        "extension-value-addr=%p", extension_obj);
                goto error;
        }
This page took 0.032263 seconds and 4 git commands to generate.