Fix compiler -Wall warnings (mostly incompatible enumerations)
authorPhilippe Proulx <eeppeliteloop@gmail.com>
Wed, 3 Jul 2019 18:30:55 +0000 (14:30 -0400)
committerPhilippe Proulx <eeppeliteloop@gmail.com>
Wed, 3 Jul 2019 19:16:10 +0000 (15:16 -0400)
Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Change-Id: I399b4f8d69d116e057e4b7c89ae758744ec3f5a9
Reviewed-on: https://review.lttng.org/c/babeltrace/+/1605
Tested-by: jenkins <jenkins@lttng.org>
src/cli/babeltrace2.c
src/lib/graph/component-class-sink-colander.c
src/lib/graph/component.c
src/lib/graph/iterator.c
src/plugins/ctf/fs-src/fs.c
src/plugins/text/pretty/pretty.c
src/plugins/utils/trimmer/trimmer.c

index 0b026f78207d81791b2c133104a0ac50a52f8789..e5d4370ccf6365c0c1e8452324dae77c5eebd5d0 100644 (file)
@@ -2080,7 +2080,7 @@ static
 int cmd_run_ctx_init(struct cmd_run_ctx *ctx, struct bt_config *cfg)
 {
        int ret = 0;
-       bt_graph_add_component_status add_comp_status;
+       bt_graph_add_listener_status add_listener_status;
 
        ctx->cfg = cfg;
        ctx->connect_ports = false;
@@ -2117,18 +2117,18 @@ int cmd_run_ctx_init(struct cmd_run_ctx *ctx, struct bt_config *cfg)
        }
 
        the_graph = ctx->graph;
-       add_comp_status = bt_graph_add_source_component_output_port_added_listener(
+       add_listener_status = bt_graph_add_source_component_output_port_added_listener(
                ctx->graph, graph_source_output_port_added_listener, NULL, ctx,
                NULL);
-       if (add_comp_status != BT_GRAPH_ADD_COMPONENT_STATUS_OK) {
+       if (add_listener_status != BT_GRAPH_ADD_LISTENER_STATUS_OK) {
                BT_LOGE_STR("Cannot add \"port added\" listener to graph.");
                goto error;
        }
 
-       add_comp_status = bt_graph_add_filter_component_output_port_added_listener(
+       add_listener_status = bt_graph_add_filter_component_output_port_added_listener(
                ctx->graph, graph_filter_output_port_added_listener, NULL, ctx,
                NULL);
-       if (add_comp_status != BT_GRAPH_ADD_COMPONENT_STATUS_OK) {
+       if (add_listener_status != BT_GRAPH_ADD_LISTENER_STATUS_OK) {
                BT_LOGE_STR("Cannot add \"port added\" listener to graph.");
                goto error;
        }
index b68a3ab0461074cc71f26b456671b4688697ad42..b1c4ee70f0d310c3b4dd0b7d576fe723335d9327 100644 (file)
@@ -44,8 +44,7 @@ enum bt_component_class_init_method_status colander_init(
                struct bt_self_component_sink *self_comp,
                const struct bt_value *params, void *init_method_data)
 {
-       enum bt_component_class_init_method_status status =
-               BT_FUNC_STATUS_OK;
+       int status = BT_FUNC_STATUS_OK;
        struct bt_component_class_sink_colander_priv_data *colander_data = NULL;
        struct bt_component_class_sink_colander_data *user_provided_data =
                init_method_data;
index 825d8963a96a4726f82e019de765647b8262c01a..24d7deded596ae5d9ab50e4567702a3f45825250 100644 (file)
@@ -491,7 +491,7 @@ bt_component_port_connected(
        typedef enum bt_component_class_port_connected_method_status (*method_t)(
                void *, void *, const void *);
 
-       enum bt_self_component_add_port_status status =
+       enum bt_component_class_port_connected_method_status status =
                BT_FUNC_STATUS_OK;
        method_t method = NULL;
 
index b1d57b592c1fdee2f6b9e34e8144236dbba85a33..86d7a1e414952ffda32415fbfa9d0d7c1d0eb944 100644 (file)
@@ -1221,7 +1221,7 @@ enum bt_message_iterator_seek_beginning_status
 bt_self_component_port_input_message_iterator_seek_beginning(
                struct bt_self_component_port_input_message_iterator *iterator)
 {
-       enum bt_message_iterator_seek_beginning_status status;
+       int status;
 
        BT_ASSERT_PRE_NON_NULL(iterator, "Message iterator");
        BT_ASSERT_PRE_ITER_HAS_STATE_TO_SEEK(iterator);
index da5a1eb6d9bdd1e54895ab6fbc734a7e48fa03f2..b9faf97af71309c06cc88b13318359c9505f1b21 100644 (file)
@@ -260,7 +260,7 @@ bt_component_class_message_iterator_init_method_status ctf_fs_iterator_init(
        self_comp = port_data->ctf_fs->self_comp;
        msg_iter_data = g_new0(struct ctf_fs_msg_iter_data, 1);
        if (!msg_iter_data) {
-               ret = BT_COMPONENT_CLASS_MESSAGE_ITERATOR_NEXT_METHOD_STATUS_MEMORY_ERROR;
+               ret = BT_COMPONENT_CLASS_MESSAGE_ITERATOR_INIT_METHOD_STATUS_MEMORY_ERROR;
                goto error;
        }
 
index 0a85530e7f95d49a1206fe1086deaaa0e36e30dc..089d4871a97ff9e93033377a210d49d3309cf8d0 100644 (file)
@@ -168,7 +168,7 @@ pretty_graph_is_configured(bt_self_component_sink *comp)
                bt_self_component_sink_borrow_input_port_by_name(comp,
                        in_port_name));
        if (!pretty->iterator) {
-               status = BT_COMPONENT_CLASS_MESSAGE_ITERATOR_NEXT_METHOD_STATUS_MEMORY_ERROR;
+               status = BT_COMPONENT_CLASS_SINK_GRAPH_IS_CONFIGURED_METHOD_STATUS_ERROR;
        }
 
        return status;
@@ -211,7 +211,7 @@ bt_component_class_sink_consume_method_status pretty_consume(
        BT_ASSERT(next_status == BT_MESSAGE_ITERATOR_NEXT_STATUS_OK);
 
        for (i = 0; i < count; i++) {
-               ret = handle_message(pretty, msgs[i]);
+               ret = (int) handle_message(pretty, msgs[i]);
                if (ret) {
                        goto end;
                }
index 7d510bd990540de90c3f5fcc9f2ad9d34f4736f6..d771ec277d0104d4be7e45eac21c1c5d89e5d043 100644 (file)
@@ -814,7 +814,7 @@ state_set_trimmer_iterator_bounds(
                struct trimmer_iterator *trimmer_it)
 {
        bt_message_iterator_next_status upstream_iter_status =
-               BT_COMPONENT_CLASS_MESSAGE_ITERATOR_NEXT_METHOD_STATUS_OK;
+               BT_MESSAGE_ITERATOR_NEXT_STATUS_OK;
        struct trimmer_comp *trimmer_comp = trimmer_it->trimmer_comp;
        bt_message_array_const msgs;
        uint64_t count = 0;
@@ -886,8 +886,7 @@ found:
 
 error:
        put_messages(msgs, count);
-       upstream_iter_status =
-               BT_COMPONENT_CLASS_MESSAGE_ITERATOR_NEXT_METHOD_STATUS_ERROR;
+       upstream_iter_status = BT_MESSAGE_ITERATOR_NEXT_STATUS_ERROR;
 
 end:
        return (int) upstream_iter_status;
This page took 0.029816 seconds and 4 git commands to generate.