configure: re-enable '-Wunused-parameter'
[babeltrace.git] / src / plugins / lttng-utils / debug-info / debug-info.c
index 7b6ea383548b2e8296cfe2fd844bdf5988d27fe9..927ba7a8e391bd9c36f340938fa279b9c3dd5508 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Babeltrace - Debug Information State Tracker
+ * SPDX-License-Identifier: MIT
  *
  * Copyright (c) 2015 EfficiOS Inc. and Linux Foundation
  * Copyright (c) 2015 Philippe Proulx <pproulx@efficios.com>
@@ -7,23 +7,7 @@
  * Copyright (c) 2016 Jérémie Galarneau <jeremie.galarneau@efficios.com>
  * Copyright (c) 2019 Francis Deslauriers <francis.deslauriers@efficios.com>
  *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
+ * Babeltrace - Debug Information State Tracker
  */
 
 #define BT_COMP_LOG_SELF_COMP self_comp
 
 #define DEFAULT_DEBUG_INFO_FIELD_NAME  "debug_info"
 #define LTTNG_UST_STATEDUMP_PREFIX     "lttng_ust"
-#define VPID_FIELD_NAME                        "vpid"
-#define IP_FIELD_NAME                  "ip"
-#define BADDR_FIELD_NAME               "baddr"
-#define CRC32_FIELD_NAME               "crc"
-#define BUILD_ID_FIELD_NAME            "build_id"
-#define FILENAME_FIELD_NAME            "filename"
-#define IS_PIC_FIELD_NAME              "is_pic"
-#define MEMSZ_FIELD_NAME               "memsz"
-#define PATH_FIELD_NAME                        "path"
 
 struct debug_info_component {
        bt_logging_level log_level;
@@ -213,7 +188,7 @@ struct debug_info_source *debug_info_source_create_from_bin(
                        g_strdup_printf("%"PRId64, src_loc->line_no);
                if (!debug_info_src->line_no) {
                        BT_COMP_LOGE_APPEND_CAUSE(self_comp,
-                               "Error occured when setting `line_no` field.");
+                               "Error occurred when setting `line_no` field.");
                        goto error;
                }
 
@@ -931,7 +906,7 @@ void handle_event_statedump(struct debug_info_msg_iter *debug_it,
        } else if (q_event_name == debug_info->q_statedump_build_id) {
                /* Build ID info */
                handle_event_statedump_build_id(debug_info, event);
-       } else if (q_event_name == debug_info-> q_lib_unload) {
+       } else if (q_event_name == debug_info->q_lib_unload) {
                handle_event_lib_unload(debug_info, event);
        }
 
@@ -1535,7 +1510,8 @@ end:
 }
 
 static
-bt_message *handle_msg_iterator_inactivity(struct debug_info_msg_iter *debug_it,
+bt_message *handle_msg_iterator_inactivity(
+               struct debug_info_msg_iter *debug_it __attribute__((unused)),
                const bt_message *in_message)
 {
        /*
@@ -1781,11 +1757,10 @@ end:
        return status;
 }
 
-BT_HIDDEN
 bt_component_class_initialize_method_status debug_info_comp_init(
                bt_self_component_filter *self_comp_flt,
-               bt_self_component_filter_configuration *config,
-               const bt_value *params, __attribute__((unused)) void *init_method_data)
+               bt_self_component_filter_configuration *config __attribute__((unused)),
+               const bt_value *params, void *init_method_data __attribute__((unused)))
 {
        struct debug_info_component *debug_info_comp;
        bt_component_class_initialize_method_status status =
@@ -1847,7 +1822,6 @@ end:
        return status;
 }
 
-BT_HIDDEN
 void debug_info_comp_finalize(bt_self_component_filter *self_comp_flt)
 {
        struct debug_info_component *debug_info =
@@ -1863,7 +1837,6 @@ void debug_info_comp_finalize(bt_self_component_filter *self_comp_flt)
        destroy_debug_info_comp(debug_info);
 }
 
-BT_HIDDEN
 bt_message_iterator_class_next_method_status debug_info_msg_iter_next(
                bt_self_message_iterator *self_msg_iter,
                const bt_message_array_const msgs, uint64_t capacity,
@@ -1980,12 +1953,10 @@ end:
        return;
 }
 
-BT_HIDDEN
 bt_message_iterator_class_initialize_method_status debug_info_msg_iter_init(
                bt_self_message_iterator *self_msg_iter,
                bt_self_message_iterator_configuration *config,
-               bt_self_component *self_comp,
-               bt_self_component_port_output *self_port)
+               bt_self_component_port_output *self_port __attribute__((unused)))
 {
        bt_message_iterator_class_initialize_method_status status;
        bt_message_iterator_create_from_message_iterator_status
@@ -1995,6 +1966,8 @@ bt_message_iterator_class_initialize_method_status debug_info_msg_iter_init(
        struct debug_info_msg_iter *debug_info_msg_iter = NULL;
        gchar *debug_info_field_name;
        int ret;
+       bt_self_component *self_comp =
+               bt_self_message_iterator_borrow_component(self_msg_iter);
        bt_logging_level log_level = bt_component_get_logging_level(
                bt_self_component_as_component(self_comp));
 
@@ -2072,7 +2045,6 @@ end:
        return status;
 }
 
-BT_HIDDEN
 bt_message_iterator_class_can_seek_beginning_method_status
 debug_info_msg_iter_can_seek_beginning(bt_self_message_iterator *self_msg_iter,
                bt_bool *can_seek)
@@ -2085,7 +2057,6 @@ debug_info_msg_iter_can_seek_beginning(bt_self_message_iterator *self_msg_iter,
                debug_info_msg_iter->msg_iter, can_seek);
 }
 
-BT_HIDDEN
 bt_message_iterator_class_seek_beginning_method_status
 debug_info_msg_iter_seek_beginning(bt_self_message_iterator *self_msg_iter)
 {
@@ -2113,7 +2084,6 @@ end:
        return status;
 }
 
-BT_HIDDEN
 void debug_info_msg_iter_finalize(bt_self_message_iterator *it)
 {
        struct debug_info_msg_iter *debug_info_msg_iter;
This page took 0.027594 seconds and 4 git commands to generate.