Fix -Wmissing-prototypes/-Wmissing-declarations warnings
[babeltrace.git] / src / bindings / python / bt2 / bt2 / native_bt_autodisc.i.h
index e09f54e768b803f713e82380fb44c8a4395be3d1..612c9328fd8c6a60a05a528e08a735d2318e0600 100644 (file)
@@ -47,6 +47,7 @@
  * This function can also return None, if it failed to allocate memory
  * for the return value and status code.
  */
+static
 bt_value *bt_bt2_auto_discover_source_components(const bt_value *inputs,
                const bt_plugin_set *plugin_set)
 {
@@ -62,7 +63,7 @@ bt_value *bt_bt2_auto_discover_source_components(const bt_value *inputs,
        bt_value_map_insert_entry_status insert_entry_status;
 
        BT_ASSERT(bt_value_get_type(inputs) == BT_VALUE_TYPE_ARRAY);
-       for (i = 0; i < bt_value_array_get_size(inputs); i++) {
+       for (i = 0; i < bt_value_array_get_length(inputs); i++) {
                const bt_value *elem = bt_value_array_borrow_element_by_index_const(inputs, i);
                BT_ASSERT(bt_value_get_type(elem) == BT_VALUE_TYPE_STRING);
        }
@@ -102,7 +103,8 @@ bt_value *bt_bt2_auto_discover_source_components(const bt_value *inputs,
                plugin_count,
                NULL,
                bt_python_bindings_bt2_log_level,
-               &auto_disc);
+               &auto_disc,
+               NULL);
        if (status != 0) {
                BT_CURRENT_THREAD_ERROR_APPEND_CAUSE_FROM_UNKNOWN(module_name,
                        "Failed to auto discover sources.");
@@ -126,7 +128,7 @@ bt_value *bt_bt2_auto_discover_source_components(const bt_value *inputs,
        }
 
        for (i = 0; i < auto_disc.results->len; i++) {
-               struct auto_source_discovery_result *result =
+               struct auto_source_discovery_result *autodisc_result =
                        g_ptr_array_index(auto_disc.results, i);
                bt_value_array_append_element_status append_element_status;
 
@@ -139,7 +141,7 @@ bt_value *bt_bt2_auto_discover_source_components(const bt_value *inputs,
                }
 
                append_element_status = bt_value_array_append_string_element(
-                       component_info, result->plugin_name);
+                       component_info, autodisc_result->plugin_name);
                if (append_element_status != BT_VALUE_ARRAY_APPEND_ELEMENT_STATUS_OK) {
                        BT_CURRENT_THREAD_ERROR_APPEND_CAUSE_FROM_UNKNOWN(module_name,
                                "Failed to append one array element.");
@@ -148,7 +150,7 @@ bt_value *bt_bt2_auto_discover_source_components(const bt_value *inputs,
                }
 
                append_element_status = bt_value_array_append_string_element(
-                       component_info, result->source_cc_name);
+                       component_info, autodisc_result->source_cc_name);
                if (append_element_status != BT_VALUE_ARRAY_APPEND_ELEMENT_STATUS_OK) {
                        BT_CURRENT_THREAD_ERROR_APPEND_CAUSE_FROM_UNKNOWN(module_name,
                                "Failed to append one array element.");
@@ -157,7 +159,7 @@ bt_value *bt_bt2_auto_discover_source_components(const bt_value *inputs,
                }
 
                append_element_status = bt_value_array_append_element(
-                       component_info, result->inputs);
+                       component_info, autodisc_result->inputs);
                if (append_element_status != BT_VALUE_ARRAY_APPEND_ELEMENT_STATUS_OK) {
                        BT_CURRENT_THREAD_ERROR_APPEND_CAUSE_FROM_UNKNOWN(module_name,
                                "Failed to append one array element.");
@@ -166,7 +168,7 @@ bt_value *bt_bt2_auto_discover_source_components(const bt_value *inputs,
                }
 
                append_element_status = bt_value_array_append_element(
-                       component_info, result->original_input_indices);
+                       component_info, autodisc_result->original_input_indices);
                if (append_element_status != BT_VALUE_ARRAY_APPEND_ELEMENT_STATUS_OK) {
                        BT_CURRENT_THREAD_ERROR_APPEND_CAUSE_FROM_UNKNOWN(module_name,
                                "Failed to append one array element.");
This page took 0.026436 seconds and 4 git commands to generate.