configure: re-enable '-Wunused-parameter'
[babeltrace.git] / src / lib / plugin / plugin.c
index 93a56c27eec835fd1798d56686fca200e169d0bb..3287f662eb0caec05814c2c3b9646c92b7d0bc57 100644 (file)
@@ -12,6 +12,7 @@
 #include "lib/assert-cond.h"
 #include "common/macros.h"
 #include "compat/compiler.h"
+#include "compat/limits.h"
 #include "common/common.h"
 #include <babeltrace2/plugin/plugin-loading.h>
 #include <babeltrace2/graph/component-class.h>
@@ -152,12 +153,14 @@ void fini_python_plugin_provider(void) {
 }
 #endif
 
+BT_EXPORT
 uint64_t bt_plugin_set_get_plugin_count(const struct bt_plugin_set *plugin_set)
 {
        BT_ASSERT_PRE_DEV_PLUGIN_SET_NON_NULL(plugin_set);
        return (uint64_t) plugin_set->plugins->len;
 }
 
+BT_EXPORT
 const struct bt_plugin *bt_plugin_set_borrow_plugin_by_index_const(
                const struct bt_plugin_set *plugin_set, uint64_t index)
 {
@@ -166,6 +169,7 @@ const struct bt_plugin *bt_plugin_set_borrow_plugin_by_index_const(
        return g_ptr_array_index(plugin_set->plugins, index);
 }
 
+BT_EXPORT
 enum bt_plugin_find_all_from_static_status bt_plugin_find_all_from_static(
                bt_bool fail_on_load_error,
                const struct bt_plugin_set **plugin_set_out)
@@ -177,6 +181,7 @@ enum bt_plugin_find_all_from_static_status bt_plugin_find_all_from_static(
                (void *) plugin_set_out);
 }
 
+BT_EXPORT
 enum bt_plugin_find_all_from_file_status bt_plugin_find_all_from_file(
                const char *path, bt_bool fail_on_load_error,
                const struct bt_plugin_set **plugin_set_out)
@@ -255,6 +260,7 @@ void destroy_gstring(void *data)
        g_string_free(data, TRUE);
 }
 
+BT_EXPORT
 enum bt_plugin_find_all_status bt_plugin_find_all(bt_bool find_in_std_env_var,
                bt_bool find_in_user_dir, bt_bool find_in_sys_dir,
                bt_bool find_in_static, bt_bool fail_on_load_error,
@@ -442,6 +448,7 @@ end:
        return status;
 }
 
+BT_EXPORT
 enum bt_plugin_find_status bt_plugin_find(const char *plugin_name,
                bt_bool find_in_std_env_var, bt_bool find_in_user_dir,
                bt_bool find_in_sys_dir, bt_bool find_in_static,
@@ -508,7 +515,8 @@ static struct {
 
 static
 int nftw_append_all_from_dir(const char *file,
-               const struct stat *sb, int flag, struct FTW *s)
+               const struct stat *sb __attribute__((unused)),
+               int flag, struct FTW *s)
 {
        int ret = 0;
        const char *name = file + s->base;
@@ -646,6 +654,7 @@ end:
        return status;
 }
 
+BT_EXPORT
 enum bt_plugin_find_all_from_dir_status bt_plugin_find_all_from_dir(
                const char *path, bt_bool recurse, bt_bool fail_on_load_error,
                const struct bt_plugin_set **plugin_set_out)
@@ -704,30 +713,35 @@ end:
        return status;
 }
 
+BT_EXPORT
 const char *bt_plugin_get_name(const struct bt_plugin *plugin)
 {
        BT_ASSERT_PRE_DEV_PLUGIN_NON_NULL(plugin);
        return plugin->info.name_set ? plugin->info.name->str : NULL;
 }
 
+BT_EXPORT
 const char *bt_plugin_get_author(const struct bt_plugin *plugin)
 {
        BT_ASSERT_PRE_DEV_PLUGIN_NON_NULL(plugin);
        return plugin->info.author_set ? plugin->info.author->str : NULL;
 }
 
+BT_EXPORT
 const char *bt_plugin_get_license(const struct bt_plugin *plugin)
 {
        BT_ASSERT_PRE_DEV_PLUGIN_NON_NULL(plugin);
        return plugin->info.license_set ? plugin->info.license->str : NULL;
 }
 
+BT_EXPORT
 const char *bt_plugin_get_path(const struct bt_plugin *plugin)
 {
        BT_ASSERT_PRE_DEV_PLUGIN_NON_NULL(plugin);
        return plugin->info.path_set ? plugin->info.path->str : NULL;
 }
 
+BT_EXPORT
 const char *bt_plugin_get_description(const struct bt_plugin *plugin)
 {
        BT_ASSERT_PRE_DEV_PLUGIN_NON_NULL(plugin);
@@ -735,6 +749,7 @@ const char *bt_plugin_get_description(const struct bt_plugin *plugin)
                plugin->info.description->str : NULL;
 }
 
+BT_EXPORT
 enum bt_property_availability bt_plugin_get_version(const struct bt_plugin *plugin,
                unsigned int *major, unsigned int *minor, unsigned int *patch,
                const char **extra)
@@ -770,18 +785,21 @@ end:
        return avail;
 }
 
+BT_EXPORT
 uint64_t bt_plugin_get_source_component_class_count(const struct bt_plugin *plugin)
 {
        BT_ASSERT_PRE_DEV_PLUGIN_NON_NULL(plugin);
        return (uint64_t) plugin->src_comp_classes->len;
 }
 
+BT_EXPORT
 uint64_t bt_plugin_get_filter_component_class_count(const struct bt_plugin *plugin)
 {
        BT_ASSERT_PRE_DEV_PLUGIN_NON_NULL(plugin);
        return (uint64_t) plugin->flt_comp_classes->len;
 }
 
+BT_EXPORT
 uint64_t bt_plugin_get_sink_component_class_count(const struct bt_plugin *plugin)
 {
        BT_ASSERT_PRE_DEV_PLUGIN_NON_NULL(plugin);
@@ -798,6 +816,7 @@ struct bt_component_class *borrow_component_class_by_index(
        return g_ptr_array_index(comp_classes, index);
 }
 
+BT_EXPORT
 const struct bt_component_class_source *
 bt_plugin_borrow_source_component_class_by_index_const(
                const struct bt_plugin *plugin, uint64_t index)
@@ -806,6 +825,7 @@ bt_plugin_borrow_source_component_class_by_index_const(
                plugin->src_comp_classes, index);
 }
 
+BT_EXPORT
 const struct bt_component_class_filter *
 bt_plugin_borrow_filter_component_class_by_index_const(
                const struct bt_plugin *plugin, uint64_t index)
@@ -814,6 +834,7 @@ bt_plugin_borrow_filter_component_class_by_index_const(
                plugin->flt_comp_classes, index);
 }
 
+BT_EXPORT
 const struct bt_component_class_sink *
 bt_plugin_borrow_sink_component_class_by_index_const(
                const struct bt_plugin *plugin, uint64_t index)
@@ -850,6 +871,7 @@ struct bt_component_class *borrow_component_class_by_name(
        return comp_class;
 }
 
+BT_EXPORT
 const struct bt_component_class_source *
 bt_plugin_borrow_source_component_class_by_name_const(
                const struct bt_plugin *plugin, const char *name)
@@ -858,6 +880,7 @@ bt_plugin_borrow_source_component_class_by_name_const(
                plugin->src_comp_classes, name);
 }
 
+BT_EXPORT
 const struct bt_component_class_filter *
 bt_plugin_borrow_filter_component_class_by_name_const(
                const struct bt_plugin *plugin, const char *name)
@@ -866,6 +889,7 @@ bt_plugin_borrow_filter_component_class_by_name_const(
                plugin->flt_comp_classes, name);
 }
 
+BT_EXPORT
 const struct bt_component_class_sink *
 bt_plugin_borrow_sink_component_class_by_name_const(
                const struct bt_plugin *plugin, const char *name)
@@ -874,21 +898,25 @@ bt_plugin_borrow_sink_component_class_by_name_const(
                plugin->sink_comp_classes, name);
 }
 
+BT_EXPORT
 void bt_plugin_get_ref(const struct bt_plugin *plugin)
 {
        bt_object_get_ref(plugin);
 }
 
+BT_EXPORT
 void bt_plugin_put_ref(const struct bt_plugin *plugin)
 {
        bt_object_put_ref(plugin);
 }
 
+BT_EXPORT
 void bt_plugin_set_get_ref(const struct bt_plugin_set *plugin_set)
 {
        bt_object_get_ref(plugin_set);
 }
 
+BT_EXPORT
 void bt_plugin_set_put_ref(const struct bt_plugin_set *plugin_set)
 {
        bt_object_put_ref(plugin_set);
This page took 0.067427 seconds and 4 git commands to generate.