Fix typos
[babeltrace.git] / src / plugins / utils / trimmer / trimmer.c
index a65b2ecc881fcd5928e969a353a35bae9a3f58bb..d13a9fef3d4227f3abc7b741c2f2796e7c096501 100644 (file)
@@ -140,7 +140,6 @@ struct trimmer_comp *create_trimmer_comp(void)
        return g_new0(struct trimmer_comp, 1);
 }
 
-BT_HIDDEN
 void trimmer_finalize(bt_self_component_filter *self_comp)
 {
        struct trimmer_comp *trimmer_comp =
@@ -174,7 +173,7 @@ bool compile_and_match(const char *pattern, const char *string, GMatchInfo **mat
                /*
                 * g_regex_match allocates `*match_info` even if it returns
                 * FALSE.  If there's no match, we have no use for it, so free
-                * it immediatly and don't return it to the caller.
+                * it immediately and don't return it to the caller.
                 */
                g_match_info_free(*match_info);
                *match_info = NULL;
@@ -426,7 +425,7 @@ end:
  */
 static
 int set_bound_from_param(struct trimmer_comp *trimmer_comp,
-               const char *param_name, const bt_value *param,
+               const bt_value *param,
                struct trimmer_bound *bound, bool is_gmt)
 {
        int ret;
@@ -440,7 +439,7 @@ int set_bound_from_param(struct trimmer_comp *trimmer_comp,
                 * Just convert it to a temporary string to handle
                 * everything the same way.
                 */
-               sprintf(tmp_arg, "%" PRId64, value);
+               snprintf(tmp_arg, sizeof(tmp_arg), "%" PRId64, value);
                arg = tmp_arg;
        } else {
                BT_ASSERT(bt_value_is_string(param));
@@ -552,7 +551,7 @@ bt_component_class_initialize_method_status init_trimmer_comp_from_params(
 
         value = bt_value_map_borrow_entry_value_const(params, "begin");
        if (value) {
-               if (set_bound_from_param(trimmer_comp, "begin", value,
+               if (set_bound_from_param(trimmer_comp, value,
                                &trimmer_comp->begin, trimmer_comp->is_gmt)) {
                        /* set_bound_from_param() logs errors */
                        status = BT_COMPONENT_CLASS_INITIALIZE_METHOD_STATUS_ERROR;
@@ -565,7 +564,7 @@ bt_component_class_initialize_method_status init_trimmer_comp_from_params(
 
         value = bt_value_map_borrow_entry_value_const(params, "end");
        if (value) {
-               if (set_bound_from_param(trimmer_comp, "end", value,
+               if (set_bound_from_param(trimmer_comp, value,
                                &trimmer_comp->end, trimmer_comp->is_gmt)) {
                        /* set_bound_from_param() logs errors */
                        status = BT_COMPONENT_CLASS_INITIALIZE_METHOD_STATUS_ERROR;
@@ -595,8 +594,9 @@ end:
 
 bt_component_class_initialize_method_status trimmer_init(
                bt_self_component_filter *self_comp_flt,
-               bt_self_component_filter_configuration *config,
-               const bt_value *params, void *init_data)
+               bt_self_component_filter_configuration *config __attribute__((unused)),
+               const bt_value *params,
+               void *init_data __attribute__((unused)))
 {
        bt_component_class_initialize_method_status status;
        bt_self_component_add_port_status add_port_status;
@@ -679,11 +679,10 @@ void destroy_trimmer_iterator_stream_state(
        g_free(sstate);
 }
 
-BT_HIDDEN
 bt_message_iterator_class_initialize_method_status trimmer_msg_iter_init(
                bt_self_message_iterator *self_msg_iter,
                bt_self_message_iterator_configuration *config,
-               bt_self_component_port_output *port)
+               bt_self_component_port_output *port __attribute__((unused)))
 {
        bt_message_iterator_class_initialize_method_status status;
        bt_message_iterator_create_from_message_iterator_status
@@ -1875,7 +1874,6 @@ end:
        return status;
 }
 
-BT_HIDDEN
 bt_message_iterator_class_next_method_status trimmer_msg_iter_next(
                bt_self_message_iterator *self_msg_iter,
                bt_message_array_const msgs, uint64_t capacity,
@@ -1944,7 +1942,6 @@ end:
        return status;
 }
 
-BT_HIDDEN
 void trimmer_msg_iter_finalize(bt_self_message_iterator *self_msg_iter)
 {
        struct trimmer_iterator *trimmer_it =
This page took 0.02591 seconds and 4 git commands to generate.