configure: re-enable '-Wunused-parameter'
authorMichael Jeanson <mjeanson@efficios.com>
Wed, 9 Mar 2022 22:52:21 +0000 (17:52 -0500)
committerPhilippe Proulx <eeppeliteloop@gmail.com>
Thu, 2 Nov 2023 04:27:37 +0000 (00:27 -0400)
This warning is part of '-Wextra' in GCC.

Change-Id: Ifb514a41cb9c62cf703d415eeb2ccefc331dee77
Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Reviewed-on: https://review.lttng.org/c/babeltrace/+/7559
Tested-by: jenkins <jenkins@lttng.org>
Reviewed-by: Philippe Proulx <eeppeliteloop@gmail.com>
68 files changed:
configure.ac
src/bindings/python/bt2/Makefile.am
src/cli/babeltrace2.c
src/common/common.c
src/common/common.h
src/compat/memstream.h
src/compat/mman.c
src/compat/mman.h
src/compat/socket.h
src/ctf-writer/event.c
src/ctf-writer/field-wrapper.c
src/ctf-writer/fields.h
src/ctf-writer/resolve.c
src/ctf-writer/trace.c
src/ctf-writer/values.c
src/lib/graph/component-class-sink-simple.c
src/lib/graph/component-filter.c
src/lib/graph/component-sink.c
src/lib/graph/component-source.c
src/lib/graph/graph.c
src/lib/graph/iterator.c
src/lib/lib-logging.c
src/lib/plugin/plugin-so.c
src/lib/plugin/plugin.c
src/lib/prio-heap/prio-heap.h
src/lib/trace-ir/clock-class.c
src/lib/trace-ir/event-class.c
src/lib/trace-ir/field-class.c
src/lib/trace-ir/field-wrapper.c
src/lib/trace-ir/stream-class.c
src/lib/trace-ir/stream.c
src/lib/trace-ir/utils.h
src/lib/value.c
src/plugins/ctf/common/metadata/Makefile.am
src/plugins/ctf/common/metadata/ast.hpp
src/plugins/ctf/common/metadata/ctf-meta-resolve.cpp
src/plugins/ctf/common/metadata/ctf-meta-translate.cpp
src/plugins/ctf/common/metadata/ctf-meta.hpp
src/plugins/ctf/common/metadata/visitor-semantic-validator.cpp
src/plugins/ctf/fs-sink/fs-sink-stream.cpp
src/plugins/ctf/fs-sink/fs-sink.cpp
src/plugins/ctf/fs-sink/translate-ctf-ir-to-tsdl.cpp
src/plugins/ctf/fs-src/data-stream-file.cpp
src/plugins/ctf/fs-src/fs.cpp
src/plugins/ctf/fs-src/metadata.cpp
src/plugins/ctf/lttng-live/lttng-live.cpp
src/plugins/ctf/lttng-live/metadata.cpp
src/plugins/lttng-utils/debug-info/debug-info.c
src/plugins/text/details/details.c
src/plugins/text/details/write.c
src/plugins/text/dmesg/dmesg.c
src/plugins/text/pretty/pretty.c
src/plugins/utils/counter/counter.c
src/plugins/utils/dummy/dummy.c
src/plugins/utils/muxer/muxer.c
src/plugins/utils/trimmer/trimmer.c
tests/lib/conds/conds-triggers.cpp
tests/lib/test-bt-uuid.c
tests/lib/test-bt-values.c
tests/lib/test-graph-topo.c
tests/lib/test-plugin-plugins/minimal.c
tests/lib/test-plugin-plugins/sfs.c
tests/lib/test-remove-destruction-listener-in-destruction-listener.c
tests/lib/test-simple-sink.c
tests/lib/test-trace-ir-ref.c
tests/param-validation/test-param-validation.c
tests/utils/common.c
tests/utils/tap/tap.c

index 90ce3d2077f62a6f9801548512f660f5fb0e89a0..c72e876252da1bf41984dc04b86b7fc0c88cfe56 100644 (file)
@@ -746,7 +746,6 @@ m4_define([WARN_FLAGS_LIST], [ dnl
   -Wduplicated-branches dnl
   -Wlogical-op dnl
   -Wsuggest-override dnl
-  -Wno-unused-parameter dnl
   -Wno-sign-compare dnl
   dnl
   dnl Some versions of SWIG (like 3.0.12) generate code that produces
index 4be841442aa4134eea3979c21367e796ea09f5bd..edbf95b40ae4e460d16e0823c879a74dd2d61a2d 100644 (file)
@@ -124,6 +124,7 @@ WARN_CFLAGS += -Wno-redundant-decls
 
 # For SWIG generated code
 WARN_CFLAGS += -Wno-missing-field-initializers
+WARN_CFLAGS += -Wno-unused-parameter
 
 BUILD_FLAGS=CC="$(CC)" \
                CFLAGS="$(GLIB_CFLAGS) $(AM_CFLAGS) $(CFLAGS) $(WARN_CFLAGS)" \
index bf6c49d53ede25b6e81ef4a7d877b9dedc5aebe4..6b60ff6fca50d55b765f733552eca72b92455b88 100644 (file)
@@ -59,7 +59,7 @@ static bt_interrupter *the_interrupter;
 #include <windows.h>
 
 static
-BOOL WINAPI signal_handler(DWORD signal) {
+BOOL WINAPI signal_handler(DWORD signal __attribute__((unused))) {
        if (the_interrupter) {
                bt_interrupter_set(the_interrupter);
        }
@@ -253,7 +253,9 @@ end:
 
 static
 bt_value_map_foreach_entry_const_func_status collect_map_keys(
-               const char *key, const bt_value *object, void *data)
+               const char *key,
+               const bt_value *object __attribute__((unused)),
+               void *data)
 {
        GPtrArray *map_keys = data;
 
@@ -1647,7 +1649,7 @@ end:
 
 static
 bt_graph_listener_func_status graph_source_output_port_added_listener(
-               const bt_component_source *component,
+               const bt_component_source *component __attribute__((unused)),
                const bt_port_output *port, void *data)
 {
        return graph_output_port_added_listener(data, port);
@@ -1655,7 +1657,7 @@ bt_graph_listener_func_status graph_source_output_port_added_listener(
 
 static
 bt_graph_listener_func_status graph_filter_output_port_added_listener(
-               const bt_component_filter *component,
+               const bt_component_filter *component __attribute__((unused)),
                const bt_port_output *port, void *data)
 {
        return graph_output_port_added_listener(data, port);
index 0cdc17393caf9701a09eead68428a331cc93d27f..b0d048772ef5ad8c56e471a91c3c5f8e22f6e2d0 100644 (file)
@@ -240,7 +240,7 @@ bool bt_common_is_setuid_setgid(void)
 
 #ifdef __MINGW32__
 static
-const char *bt_get_home_dir(int log_level)
+const char *bt_get_home_dir(int log_level __attribute__((unused)))
 {
        return g_get_home_dir();
 }
@@ -1246,7 +1246,8 @@ end_of_pattern:
 }
 
 #ifdef __MINGW32__
-GString *bt_common_normalize_path(const char *path, const char *wd)
+GString *bt_common_normalize_path(const char *path,
+               const char *wd __attribute__((unused)))
 {
        char *tmp;
        GString *norm_path = NULL;
@@ -1940,7 +1941,8 @@ end:
 }
 
 #ifdef __MINGW32__
-int bt_common_get_term_size(unsigned int *width, unsigned int *height)
+int bt_common_get_term_size(unsigned int *width __attribute__((unused)),
+               unsigned int *height __attribute__((unused)))
 {
        /* Not supported on Windows yet */
        return -1;
index b447ec889e51fa68d2ed5963b073b95759aec8f2..1da6b3c263907fc0d288cf25fe88c7a4fa731c7b 100644 (file)
@@ -378,13 +378,20 @@ int bt_common_append_file_content_to_g_string(GString *str, FILE *fp);
 
 void bt_common_abort(void) __attribute__((noreturn));
 
+#if (!defined(BT_LOG_WRITE_CUR_LVL) && !defined(BT_LOG_WRITE_ERRNO_CUR_LVL))
+#define BT_LOG_LEVEL_UNUSED_ATTR __attribute__((unused))
+#else
+#define BT_LOG_LEVEL_UNUSED_ATTR
+#endif
+
 /*
  * Wraps read() function to handle EINTR and partial reads.
  * On success, it returns `count` received as parameter. On error, it returns a
  * value smaller than the requested `count`.
  */
 static inline
-ssize_t bt_common_read(int fd, void *buf, size_t count, int log_level)
+ssize_t bt_common_read(int fd, void *buf, size_t count,
+               int log_level BT_LOG_LEVEL_UNUSED_ATTR)
 {
        size_t i = 0;
        ssize_t ret;
index dcadf048828daefc57ec61ee02ba442d71f456c0..374a5e729a2a644058b6f8d6292ad534084023cb 100644 (file)
@@ -174,7 +174,10 @@ FILE *bt_open_memstream(char **ptr, size_t *sizeloc)
 }
 
 static inline
-int bt_close_memstream(char **buf, size_t *size, FILE *fp)
+int bt_close_memstream(
+               char **buf __attribute__((unused)),
+               size_t *size __attribute__((unused)),
+               FILE *fp)
 {
        return fclose(fp);
 }
@@ -194,7 +197,8 @@ int bt_close_memstream(char **buf, size_t *size, FILE *fp)
  * into the buffer (which we allocate).
  */
 static inline
-FILE *bt_open_memstream(char **ptr, size_t *sizeloc)
+FILE *bt_open_memstream(char **ptr __attribute__((unused)),
+               size_t *sizeloc __attribute__((unused)))
 {
        char *tmpname;
        FILE *fp;
@@ -233,7 +237,8 @@ error_free:
  * into the buffer (which we allocate).
  */
 static inline
-FILE *bt_open_memstream(char **ptr, size_t *sizeloc)
+FILE *bt_open_memstream(char **ptr __attribute__((unused)),
+               size_t *sizeloc __attribute__((unused)))
 {
        char *tmpname;
        int ret;
index e8eea8768c540dfc40ae353e5db43fcfa1c52728..1cc1c44c8380f571284cc6e3948b1c8f72fce2e2 100644 (file)
@@ -152,8 +152,8 @@ DWORD map_prot_flags(int prot, DWORD *dwDesiredAccess)
        return 0;
 }
 
-void *bt_mmap(void *addr, size_t length, int prot, int flags, int fd,
-               off_t offset, int log_level)
+void *bt_mmap(void *addr __attribute__((unused)), size_t length, int prot,
+               int flags, int fd, off_t offset, int log_level)
 {
        struct mmap_mapping *mapping = NULL;
        void *mapping_addr;
@@ -252,7 +252,7 @@ error:
        return MAP_FAILED;
 }
 
-int bt_munmap(void *addr, size_t length)
+int bt_munmap(void *addr, size_t length __attribute__((unused)))
 {
        int ret = 0;
        struct mmap_mapping *mapping = addr;
index 0053e3071cf7dbcdeb8512eddd821a26827b042d..5aaab7602f2c4d111e8ad4bfca41ade7cfe9593c 100644 (file)
@@ -48,7 +48,7 @@ BT_EXTERN_C size_t bt_mmap_get_offset_align_size(int log_level);
 
 static inline
 void *bt_mmap(void *addr, size_t length, int prot, int flags, int fd,
-       off_t offset, int log_level)
+       off_t offset, int log_level __attribute__((unused)))
 {
        return (void *) mmap(addr, length, prot, flags, fd, offset);
 }
index 7a57678b377e1995b147ce72d9f7aaaf144e0283..7452990ff0850c018995d44d271ed9f53bca9ad6 100644 (file)
 #define BT_SOCKET_ERROR SOCKET_ERROR
 #define BT_SOCKET SOCKET
 
+#ifndef BT_LOG_WRITE_CUR_LVL
+#define BT_SOCKET_LOG_LEVEL_UNUSED_ATTR __attribute__((unused))
+#else
+#define BT_SOCKET_LOG_LEVEL_UNUSED_ATTR
+#endif
+
 static inline
-int bt_socket_init(int log_level)
+int bt_socket_init(int log_level BT_SOCKET_LOG_LEVEL_UNUSED_ATTR)
 {
        WORD verreq;
        WSADATA wsa;
@@ -273,7 +279,7 @@ const char *bt_socket_errormsg(void)
 #define BT_SOCKET int
 
 static inline
-int bt_socket_init(int log_level)
+int bt_socket_init(int log_level __attribute__((unused)))
 {
        return 0;
 }
index a1486abaeb343ca85a13574ce7c1fde88c4fe955..3b67685623e53047a8436aa015966b22c1305ecb 100644 (file)
@@ -519,7 +519,7 @@ int map_clock_classes_func(struct bt_ctf_stream_class_common *stream_class,
 
 static
 void destroy_event_header_field(struct bt_ctf_field_wrapper *field_wrapper,
-               struct bt_ctf_stream_class *stream_class)
+               struct bt_ctf_stream_class *stream_class __attribute__((unused)))
 {
        BT_ASSERT_DBG(field_wrapper);
        bt_ctf_object_put_ref(field_wrapper->field);
@@ -561,7 +561,7 @@ end:
 
 static
 void release_event_header_field(struct bt_ctf_field_wrapper *field_wrapper,
-               struct bt_ctf_event_common *event_common)
+               struct bt_ctf_event_common *event_common __attribute__((unused)))
 {
        BT_ASSERT_DBG(field_wrapper);
        BT_CTF_OBJECT_PUT_REF_AND_RESET(field_wrapper->field);
index 0adc54e9b4db23f592f9b47ce6b57399595bd47e..c801de4bfad36a6a4133575f4220507165fccb5d 100644 (file)
@@ -13,7 +13,8 @@
 #include "field-wrapper.h"
 #include "object.h"
 
-struct bt_ctf_field_wrapper *bt_ctf_field_wrapper_new(void *data)
+struct bt_ctf_field_wrapper *bt_ctf_field_wrapper_new(
+               void *data __attribute__((unused)))
 {
        struct bt_ctf_field_wrapper *field_wrapper =
                g_new0(struct bt_ctf_field_wrapper, 1);
index 3893f911eb0cbe5b6a0209ecf501d50c04236057..768be510e578c9584d0229fb18c0b3e9beaf9bb4 100644 (file)
@@ -795,8 +795,15 @@ int bt_ctf_field_structure_set_field_by_name(struct bt_ctf_field *field,
 struct bt_ctf_field *bt_ctf_field_enumeration_borrow_container(
                struct bt_ctf_field *field);
 
+#ifndef BT_DEV_MODE
+#define BT_FIELD_UNUSED_ATTR __attribute__((unused))
+#else
+#define BT_FIELD_UNUSED_ATTR
+#endif
+
 static inline
-bt_ctf_bool bt_ctf_field_is_set_recursive(struct bt_ctf_field *field)
+bt_ctf_bool bt_ctf_field_is_set_recursive(
+               struct bt_ctf_field *field BT_FIELD_UNUSED_ATTR)
 {
        return bt_ctf_field_common_is_set_recursive((void *) field);
 }
index 2ceaba3390ed9eb26652a73eafa51a89bb5d3d50..578af1c5322a2845c2587e5e185ba87c70189f0f 100644 (file)
@@ -278,7 +278,8 @@ end:
  * Destroys a path token.
  */
 static
-void ptokens_destroy_func(gpointer ptoken, gpointer data)
+void ptokens_destroy_func(gpointer ptoken,
+               gpointer data __attribute__((unused)))
 {
        g_string_free(ptoken, TRUE);
 }
index ff13f9c37e4096aa4d2f695ad2ea546c6c92377f..ba0e0ed5228ce34060b47efd89ce4e34815bbf31 100644 (file)
@@ -576,8 +576,9 @@ end:
 }
 
 static
-bool packet_context_field_type_is_valid(struct bt_ctf_trace_common *trace,
-               struct bt_ctf_stream_class_common *stream_class,
+bool packet_context_field_type_is_valid(
+               struct bt_ctf_trace_common *trace __attribute__((unused)),
+               struct bt_ctf_stream_class_common *stream_class __attribute__((unused)),
                struct bt_ctf_field_type_common *packet_context_type,
                bool check_ts_begin_end_mapped)
 {
@@ -746,7 +747,8 @@ end:
 }
 
 static
-bool event_header_field_type_is_valid(struct bt_ctf_trace_common *trace,
+bool event_header_field_type_is_valid(
+               struct bt_ctf_trace_common *trace __attribute__((unused)),
                struct bt_ctf_stream_class_common *stream_class,
                struct bt_ctf_field_type_common *event_header_type)
 {
index f6cc21b0346af7e8054529949c91f0416cba0302..a6ba5fc90046d0f3692b32b103b6a12168d6255a 100644 (file)
@@ -152,7 +152,8 @@ void (* const destroy_funcs[])(struct bt_ctf_value *) = {
 };
 
 static
-struct bt_ctf_private_value *bt_ctf_value_null_copy(const struct bt_ctf_value *null_obj)
+struct bt_ctf_private_value *bt_ctf_value_null_copy(
+               const struct bt_ctf_value *null_obj __attribute__((unused)))
 {
        return (void *) bt_ctf_value_null;
 }
@@ -303,8 +304,9 @@ struct bt_ctf_private_value *(* const copy_funcs[])(const struct bt_ctf_value *)
 };
 
 static
-bt_ctf_bool bt_ctf_value_null_compare(const struct bt_ctf_value *object_a,
-               const struct bt_ctf_value *object_b)
+bt_ctf_bool bt_ctf_value_null_compare(
+               const struct bt_ctf_value *object_a __attribute__((unused)),
+               const struct bt_ctf_value *object_b __attribute__((unused)))
 {
        /*
         * Always BT_CTF_TRUE since bt_ctf_value_compare() already checks if both
@@ -477,7 +479,7 @@ bt_ctf_bool (* const compare_funcs[])(const struct bt_ctf_value *,
 };
 
 static
-void bt_ctf_value_null_freeze(struct bt_ctf_value *object)
+void bt_ctf_value_null_freeze(struct bt_ctf_value *object __attribute__((unused)))
 {
 }
 
index b7c183610800810db36e3bd0c48bc60d9b029287..801ddc6219648db7781dcffa18b408ede9eb40c6 100644 (file)
@@ -45,8 +45,9 @@ void simple_sink_data_destroy(struct simple_sink_data *data)
 static
 enum bt_component_class_initialize_method_status simple_sink_init(
                bt_self_component_sink *self_comp,
-               bt_self_component_sink_configuration *config,
-               const struct bt_value *params, void *init_method_data)
+               bt_self_component_sink_configuration *config __attribute__((unused)),
+               const struct bt_value *params __attribute__((unused)),
+               void *init_method_data)
 {
        int status = BT_FUNC_STATUS_OK;
        struct simple_sink_data *data = NULL;
index 79e577454452c0c1cf533054b79febbd7546f60d..db8dfc4c2bbf75591302e624c94e6627d699581d 100644 (file)
 #include "component-class.h"
 #include "lib/func-status.h"
 
-void bt_component_filter_destroy(struct bt_component *component)
+void bt_component_filter_destroy(
+               struct bt_component *component __attribute__((unused)))
 {
 }
 
 struct bt_component *bt_component_filter_create(
-               const struct bt_component_class *class)
+               const struct bt_component_class *class __attribute__((unused)))
 {
        struct bt_component_filter *filter = NULL;
 
index 37eda35a6b680119160b3b2c9ee51b452609300f..4f087ddaa727956d40419c3babe8c20adfe5f931 100644 (file)
 #include "graph.h"
 #include "lib/func-status.h"
 
-void bt_component_sink_destroy(struct bt_component *component)
+void bt_component_sink_destroy(
+               struct bt_component *component __attribute__((unused)))
 {
 }
 
 struct bt_component *bt_component_sink_create(
-               const struct bt_component_class *class)
+               const struct bt_component_class *class __attribute__((unused)))
 {
        struct bt_component_sink *sink = NULL;
 
index 83f1ef6973194b4e4195848df332cb7d3cd07cd8..caeb1e0b8a53acd5bab027439f8a132bea304d77 100644 (file)
 #include "message/iterator.h"
 #include "lib/func-status.h"
 
-void bt_component_source_destroy(struct bt_component *component)
+void bt_component_source_destroy(
+               struct bt_component *component __attribute__((unused)))
 {
 }
 
 struct bt_component *bt_component_source_create(
-               const struct bt_component_class *class)
+               const struct bt_component_class *class __attribute__((unused)))
 {
        struct bt_component_source *source = NULL;
 
index 08d8846dcf79f467c204f0fdc08651ed5031cbd8..4290039f0c3179590bb183c21a94328f14fc3aa7 100644 (file)
@@ -145,21 +145,21 @@ void destroy_graph(struct bt_object *obj)
 
 static
 void destroy_message_event(struct bt_message *msg,
-               struct bt_graph *graph)
+               struct bt_graph *graph __attribute__((unused)))
 {
        bt_message_event_destroy(msg);
 }
 
 static
 void destroy_message_packet_begin(struct bt_message *msg,
-               struct bt_graph *graph)
+               struct bt_graph *graph __attribute__((unused)))
 {
        bt_message_packet_destroy(msg);
 }
 
 static
 void destroy_message_packet_end(struct bt_message *msg,
-               struct bt_graph *graph)
+               struct bt_graph *graph __attribute__((unused)))
 {
        bt_message_packet_destroy(msg);
 }
index 588d0b40bdf532d206e6ecab8168acac2139180c..9bcbab55ee6b59627c710c6146566fb6ca593d3d 100644 (file)
@@ -251,8 +251,9 @@ void bt_message_iterator_set_connection(
 
 static
 enum bt_message_iterator_can_seek_beginning_status can_seek_ns_from_origin_true(
-               struct bt_message_iterator *iterator,
-               int64_t ns_from_origin, bt_bool *can_seek)
+               struct bt_message_iterator *iterator __attribute__((unused)),
+               int64_t ns_from_origin __attribute__((unused)),
+               bt_bool *can_seek)
 {
        *can_seek = BT_TRUE;
 
@@ -261,7 +262,7 @@ enum bt_message_iterator_can_seek_beginning_status can_seek_ns_from_origin_true(
 
 static
 enum bt_message_iterator_can_seek_beginning_status can_seek_beginning_true(
-               struct bt_message_iterator *iterator,
+               struct bt_message_iterator *iterator __attribute__((unused)),
                bt_bool *can_seek)
 {
        *can_seek = BT_TRUE;
index b0b3488bea276b80f22c7e9845de31cd43b6c56d..95b1cebbd328f4f8b45023445e0a1f7ae446285d 100644 (file)
@@ -114,7 +114,7 @@ static inline void format_clock_snapshot(char **buf_ch, bool extended,
 static inline void format_field_path(char **buf_ch, bool extended,
                const char *prefix, const struct bt_field_path *field_path);
 
-static inline void format_object(char **buf_ch, bool extended,
+static inline void format_object(char **buf_ch, bool extended __attribute__((unused)),
                const char *prefix, const struct bt_object *obj)
 {
        BUF_APPEND(", %sref-count=%llu", prefix, obj->ref_count);
@@ -125,7 +125,7 @@ static inline void format_uuid(char **buf_ch, bt_uuid uuid)
        BUF_APPEND("\"" BT_UUID_FMT "\"", BT_UUID_FMT_VALUES(uuid));
 }
 
-static inline void format_object_pool(char **buf_ch, bool extended,
+static inline void format_object_pool(char **buf_ch, bool extended __attribute__((unused)),
                const char *prefix, const struct bt_object_pool *pool)
 {
        BUF_APPEND(", %ssize=%zu", PRFIELD(pool->size));
@@ -136,7 +136,7 @@ static inline void format_object_pool(char **buf_ch, bool extended,
 }
 
 static inline void format_integer_field_class(char **buf_ch,
-               bool extended, const char *prefix,
+               bool extended __attribute__((unused)), const char *prefix,
                const struct bt_field_class *field_class)
 {
        const struct bt_field_class_integer *int_fc =
@@ -148,7 +148,7 @@ static inline void format_integer_field_class(char **buf_ch,
 }
 
 static inline void format_array_field_class(char **buf_ch,
-               bool extended, const char *prefix,
+               bool extended __attribute__((unused)), const char *prefix,
                const struct bt_field_class *field_class)
 {
        const struct bt_field_class_array *array_fc =
@@ -843,7 +843,8 @@ static inline void format_clock_snapshot(char **buf_ch, bool extended,
        }
 }
 
-static inline void format_interrupter(char **buf_ch, bool extended,
+static inline void format_interrupter(char **buf_ch,
+               bool extended __attribute__((unused)),
                const char *prefix, const struct bt_interrupter *intr)
 {
        BUF_APPEND(", %sis-set=%d", PRFIELD(intr->is_set));
@@ -1183,9 +1184,11 @@ static inline void format_graph(char **buf_ch, bool extended,
                &graph->packet_end_msg_pool);
 }
 
-static inline void format_message_iterator_class(char **buf_ch,
-               bool extended, const char *prefix,
-               const struct bt_message_iterator_class *iterator_class)
+static inline void format_message_iterator_class(
+               char **buf_ch __attribute__((unused)),
+               bool extended __attribute__((unused)),
+               const char *prefix __attribute__((unused)),
+               const struct bt_message_iterator_class *iterator_class __attribute__((unused)))
 {
        /* Empty, the address is automatically printed. */
 }
@@ -1342,8 +1345,10 @@ static inline void format_error_cause(char **buf_ch, bool extended,
        }
 }
 
-static inline void handle_conversion_specifier_bt(void *priv_data,
-               char **buf_ch, size_t avail_size,
+static inline void handle_conversion_specifier_bt(
+               void *priv_data __attribute__((unused)),
+               char **buf_ch,
+               size_t avail_size __attribute__((unused)),
                const char **out_fmt_ch, va_list *args)
 {
        const char *fmt_ch = *out_fmt_ch;
index 6cb140801bd4874dc93999ae1bf373fb2c602658..7887a21c91709c325ae6baf2c5dcf7111cbe0bee 100644 (file)
@@ -1662,7 +1662,7 @@ end:
 
 static
 void plugin_comp_class_destroy_listener(struct bt_component_class *comp_class,
-               void *data)
+               void *data __attribute__((unused)))
 {
        bt_list_del(&comp_class->node);
        BT_OBJECT_PUT_REF_AND_RESET(comp_class->so_handle);
index 547859f89b4f130829d392a4f33e7d56def2d502..3287f662eb0caec05814c2c3b9646c92b7d0bc57 100644 (file)
@@ -515,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;
index 08ae757ab240a8073d52b6f0e939ad9a6753b7bc..06f72a11a28051ac769e9ba056032dabf85d035d 100644 (file)
@@ -23,7 +23,7 @@ struct ptr_heap {
 void check_heap(const struct ptr_heap *heap);
 #else
 static inline
-void check_heap(const struct ptr_heap *heap)
+void check_heap(const struct ptr_heap *heap __attribute__((unused)))
 {
 }
 #endif
index b4e150091f53e0da07df14e9feb31c30c3db55bc..aee031d5ceff3f888cfcec4489c2344e8733fc9e 100644 (file)
@@ -54,7 +54,7 @@ void destroy_clock_class(struct bt_object *obj)
 
 static
 void free_clock_snapshot(struct bt_clock_snapshot *clock_snapshot,
-               struct bt_clock_class *clock_class)
+               struct bt_clock_class *clock_class __attribute__((unused)))
 {
        bt_clock_snapshot_destroy(clock_snapshot);
 }
index 1ba9a1aefa8a0599c92f5e6d6f483bf2502368e8..463e5ee30053acc1a6a840807fbaa2c78628b056 100644 (file)
@@ -66,7 +66,7 @@ void destroy_event_class(struct bt_object *obj)
 
 static
 void free_event(struct bt_event *event,
-               struct bt_event_class *event_class)
+               struct bt_event_class *event_class __attribute__((unused)))
 {
        bt_event_destroy(event);
 }
index 753643f3015e8579b8523205f16c003ffbf0ce3d..1990a690dc2d367ab0f74a523c0d44cc7839937c 100644 (file)
@@ -253,8 +253,9 @@ uint64_t bt_field_class_integer_get_field_value_range(
 }
 
 static
-bool size_is_valid_for_enumeration_field_class(struct bt_field_class *fc,
-               uint64_t size)
+bool size_is_valid_for_enumeration_field_class(
+               struct bt_field_class *fc __attribute__((unused)),
+               uint64_t size __attribute__((unused)))
 {
        // TODO
        return true;
index 99e99c5bdd3043a62f2f4e047f58339320e820aa..b9eee6708a649fc33c6165c522b9cce38db305e6 100644 (file)
@@ -14,7 +14,7 @@
 #include "field-wrapper.h"
 #include "field.h"
 
-struct bt_field_wrapper *bt_field_wrapper_new(void *data)
+struct bt_field_wrapper *bt_field_wrapper_new(void *data __attribute__((unused)))
 {
        struct bt_field_wrapper *field_wrapper =
                g_new0(struct bt_field_wrapper, 1);
index 43551b7171a75198dfd928b2262f64657a54e783..07c12afe7e5dddfef12aa2101c850e0b18fe95e5 100644 (file)
@@ -67,7 +67,7 @@ void destroy_stream_class(struct bt_object *obj)
 
 static
 void free_field_wrapper(struct bt_field_wrapper *field_wrapper,
-               struct bt_stream_class *stream_class)
+               struct bt_stream_class *stream_class __attribute__((unused)))
 {
        bt_field_wrapper_destroy((void *) field_wrapper);
 }
index 269fc72a8c25ceadc5904b8abf0526506d0bd528..f85b4b2323d3b0bad84a03a598d33f1b98aadfe4 100644 (file)
@@ -52,7 +52,8 @@ void destroy_stream(struct bt_object *obj)
 }
 
 static
-void bt_stream_free_packet(struct bt_packet *packet, struct bt_stream *stream)
+void bt_stream_free_packet(struct bt_packet *packet,
+               struct bt_stream *stream __attribute__((unused)))
 {
        bt_packet_destroy(packet);
 }
index f37d1a828d6a2d81eb5078a2431bb5630163966b..8ac74183da7030ceb264f9585db6c61f450ee3d6 100644 (file)
@@ -79,7 +79,8 @@ end:
 
 static inline
 int bt_util_ns_from_origin_inline(int64_t base_offset_ns,
-               int64_t offset_seconds, uint64_t offset_cycles,
+               int64_t offset_seconds __attribute__((unused)),
+               uint64_t offset_cycles __attribute__((unused)),
                uint64_t frequency, uint64_t value, int64_t *ns_from_origin)
 {
        int ret = 0;
index 125449398aa93f868c3a31b67b380f3b265fd8fe..5e26fddfb0ea5e2bdc7771c21fd3c176a646018b 100644 (file)
@@ -267,8 +267,9 @@ struct bt_value *(* const copy_funcs[])(const struct bt_value *) = {
 };
 
 static
-bt_bool bt_value_null_is_equal(const struct bt_value *object_a,
-               const struct bt_value *object_b)
+bt_bool bt_value_null_is_equal(
+               const struct bt_value *object_a __attribute__((unused)),
+               const struct bt_value *object_b __attribute__((unused)))
 {
        /*
         * Always BT_TRUE since bt_value_is_equal() already checks if both
@@ -450,7 +451,7 @@ bt_bool (* const is_equal_funcs[])(const struct bt_value *,
 };
 
 static
-void bt_value_null_freeze(struct bt_value *object)
+void bt_value_null_freeze(struct bt_value *object __attribute__((unused)))
 {
 }
 
@@ -828,7 +829,8 @@ int64_t bt_value_integer_signed_get(const struct bt_value *integer_obj)
 
 static inline
 void set_integer_value(struct bt_value *integer_obj,
-               enum bt_value_type expected_type, uint64_t uval,
+               enum bt_value_type expected_type __attribute__((unused)),
+               uint64_t uval,
                const char *api_func)
 {
        BT_ASSERT_PRE_DEV_VALUE_HOT_FROM_FUNC(api_func, integer_obj);
index 2fca29b39a1638c2dd22bc116534a6669403b270..d3b25e2341ffe8dff0430b3c57b3e5b630afad8b 100644 (file)
@@ -18,7 +18,8 @@ libctf_parser_la_CPPFLAGS = $(AM_CPPFLAGS) \
 libctf_parser_la_CXXFLAGS = $(AM_CXXFLAGS) \
        -Wno-unused-function \
        -Wno-null-dereference \
-       -Wno-missing-field-initializers
+       -Wno-missing-field-initializers \
+       -Wno-unused-parameter
 
 libctf_ast_la_SOURCES = \
        visitor-generate-ir.cpp \
index 7ac2618d04867ba0d1ce1ebd0601f3cd53fa6356..037a1e6a0d9755bb66c0c37db1c7ecab2ebc2190 100644 (file)
@@ -414,8 +414,15 @@ error:
     return g_string_free(str, TRUE);
 }
 
-static inline int ctf_ast_get_unary_uuid(struct bt_list_head *head, bt_uuid_t uuid, int log_level,
-                                         bt_self_component *self_comp)
+#ifndef BT_COMP_LOG_CUR_LVL
+#define BT_AST_LOG_LEVEL_UNUSED_ATTR __attribute__((unused))
+#else
+#define BT_AST_LOG_LEVEL_UNUSED_ATTR
+#endif
+
+static inline int ctf_ast_get_unary_uuid(struct bt_list_head *head, bt_uuid_t uuid,
+        int log_level BT_AST_LOG_LEVEL_UNUSED_ATTR,
+        bt_self_component *self_comp BT_AST_LOG_LEVEL_UNUSED_ATTR)
 {
     int i = 0;
     int ret = 0;
index 4e977a1d57f24414b83d9cd6cb83210e92233183..423202a94a39831ed115223c7f773b50aed20531 100644 (file)
@@ -278,7 +278,7 @@ end:
 /*
  * Destroys a path token.
  */
-static void ptokens_destroy_func(gpointer ptoken, gpointer data)
+static void ptokens_destroy_func(gpointer ptoken, gpointer)
 {
     g_string_free((GString *) ptoken, TRUE);
 }
index 09707108b6fca664f8119334b95bdb1353999af9..6f5d2d58d50fdf1de3f402e51701b2bede5e195c 100644 (file)
@@ -129,7 +129,7 @@ static inline bt_field_class *ctf_field_class_float_to_ir(struct ctx *ctx,
 }
 
 static inline bt_field_class *ctf_field_class_string_to_ir(struct ctx *ctx,
-                                                           struct ctf_field_class_string *fc)
+                                                           struct ctf_field_class_string *)
 {
     bt_field_class *ir_fc = bt_field_class_string_create(ctx->ir_tc);
 
@@ -140,8 +140,8 @@ static inline bt_field_class *ctf_field_class_string_to_ir(struct ctx *ctx,
 static inline void translate_struct_field_class_members(struct ctx *ctx,
                                                         struct ctf_field_class_struct *fc,
                                                         bt_field_class *ir_fc,
-                                                        bool with_header_prefix,
-                                                        struct ctf_field_class_struct *context_fc)
+                                                        bool,
+                                                        struct ctf_field_class_struct *)
 {
     uint64_t i;
     int ret;
index f87b426092ba2bb4f250f8d376edb86c647d27fc..24dc01a5527b8a44aa85841d3e70a8875ba6540d 100644 (file)
@@ -1304,7 +1304,7 @@ _ctf_field_class_float_copy(struct ctf_field_class_float *fc)
 }
 
 static inline struct ctf_field_class_string *
-_ctf_field_class_string_copy(struct ctf_field_class_string *fc)
+_ctf_field_class_string_copy(struct ctf_field_class_string *)
 {
     struct ctf_field_class_string *copy_fc = ctf_field_class_string_create();
 
index d2d084df3feec1b9fcc1245ca7f3457c7a8a84d2..f219a19fecbfb318ea62f723b01cf15046141864 100644 (file)
@@ -29,7 +29,7 @@
 static int _ctf_visitor_semantic_check(int depth, struct ctf_node *node,
                                        struct meta_log_config *log_cfg);
 
-static int ctf_visitor_unary_expression(int depth, struct ctf_node *node,
+static int ctf_visitor_unary_expression(int, struct ctf_node *node,
                                         struct meta_log_config *log_cfg)
 {
     struct ctf_node *iter;
@@ -201,7 +201,7 @@ errperm:
     return -EPERM; /* Structure not allowed */
 }
 
-static int ctf_visitor_field_class_specifier_list(int depth, struct ctf_node *node,
+static int ctf_visitor_field_class_specifier_list(int, struct ctf_node *node,
                                                   struct meta_log_config *log_cfg)
 {
     switch (node->parent->type) {
@@ -243,7 +243,7 @@ errinval:
     return -EINVAL; /* Incoherent structure */
 }
 
-static int ctf_visitor_field_class_specifier(int depth, struct ctf_node *node,
+static int ctf_visitor_field_class_specifier(int, struct ctf_node *node,
                                              struct meta_log_config *log_cfg)
 {
     switch (node->parent->type) {
index 6e3bfb36226747ec86b593903705ad94474075e2..9a955a22c8056e877f9f0666467a2fa8590fc191 100644 (file)
@@ -229,7 +229,7 @@ static inline int write_float_field(struct fs_sink_stream *stream,
 }
 
 static inline int write_string_field(struct fs_sink_stream *stream,
-                                     struct fs_sink_ctf_field_class_string *fc,
+                                     struct fs_sink_ctf_field_class_string *,
                                      const bt_field *field)
 {
     return bt_ctfser_write_string(&stream->ctfser, bt_field_string_get_value(field));
index cab1fbaa71d22596c487716e62d627916807c6bb..d13f314294c75b5f1253213a7900332c836ee59b 100644 (file)
@@ -133,8 +133,8 @@ end:
 
 bt_component_class_initialize_method_status
 ctf_fs_sink_init(bt_self_component_sink *self_comp_sink,
-                 bt_self_component_sink_configuration *config, const bt_value *params,
-                 void *init_method_data)
+                 bt_self_component_sink_configuration *, const bt_value *params,
+                 void *)
 {
     bt_component_class_initialize_method_status status;
     bt_self_component_add_port_status add_port_status;
index aa85ec4e189f764500ccb55f78d001619cb409c9..c4224252c496206eb860d0db860fa0ea361fdc6b 100644 (file)
@@ -287,7 +287,7 @@ static void append_float_field_class(struct ctx *ctx, struct fs_sink_ctf_field_c
                            mant_dig, exp_dig, fc->base.base.alignment);
 }
 
-static void append_string_field_class(struct ctx *ctx, struct fs_sink_ctf_field_class_string *fc)
+static void append_string_field_class(struct ctx *ctx, struct fs_sink_ctf_field_class_string *)
 {
     g_string_append(ctx->tsdl, "string { encoding = UTF8; }");
 }
index 3c28721fe2a87040746e6ba3aec1a4ffbc055368..1a49d87889c1c76ec0efc330fbe7680fb94d1280 100644 (file)
@@ -229,7 +229,7 @@ end:
     return status;
 }
 
-static bt_stream *medop_borrow_stream(bt_stream_class *stream_class, int64_t stream_id, void *data)
+static bt_stream *medop_borrow_stream(bt_stream_class *stream_class, int64_t, void *data)
 {
     struct ctf_fs_ds_file *ds_file = (struct ctf_fs_ds_file *) data;
     bt_stream_class *ds_file_stream_class;
index 04ae6d2b4f856644154ed6faef109877c08c3804..0118efbdaec4ecdd0b7e56618269f294faf07861 100644 (file)
@@ -327,7 +327,7 @@ static void ctf_fs_trace_destroy_notifier(void *data)
 }
 
 struct ctf_fs_component *ctf_fs_component_create(bt_logging_level log_level,
-                                                 bt_self_component *self_comp)
+                                                 bt_self_component *)
 {
     struct ctf_fs_component *ctf_fs;
 
@@ -403,7 +403,7 @@ gchar *ctf_fs_make_port_name(struct ctf_fs_ds_file_group *ds_file_group)
 }
 
 static int create_one_port_for_trace(struct ctf_fs_component *ctf_fs,
-                                     struct ctf_fs_trace *ctf_fs_trace,
+                                     struct ctf_fs_trace *,
                                      struct ctf_fs_ds_file_group *ds_file_group,
                                      bt_self_component_source *self_comp_src)
 {
@@ -2295,8 +2295,8 @@ end:
 }
 
 bt_component_class_initialize_method_status
-ctf_fs_init(bt_self_component_source *self_comp_src, bt_self_component_source_configuration *config,
-            const bt_value *params, __attribute__((unused)) void *init_method_data)
+ctf_fs_init(bt_self_component_source *self_comp_src, bt_self_component_source_configuration *,
+            const bt_value *params, void *)
 {
     struct ctf_fs_component *ctf_fs;
     bt_component_class_initialize_method_status ret =
index 0681b6f2d0900ef6088f99b3de04468c5058710d..5e6f7d108a2ec860818aa81c11d163118c06d29f 100644 (file)
@@ -123,7 +123,7 @@ end:
     return ret;
 }
 
-int ctf_fs_metadata_init(struct ctf_fs_metadata *metadata)
+int ctf_fs_metadata_init(struct ctf_fs_metadata *)
 {
     /* Nothing to initialize for the moment. */
     return 0;
index 5ff0ff3fdb86d1cae380fff696159179b6539656..02900df411a0f4375a28d0f8b42989204ff78a0d 100644 (file)
@@ -720,7 +720,7 @@ end:
     return ret;
 }
 
-static int live_get_msg_ts_ns(struct lttng_live_stream_iterator *stream_iter,
+static int live_get_msg_ts_ns(struct lttng_live_stream_iterator *,
                               struct lttng_live_msg_iter *lttng_live_msg_iter,
                               const bt_message *msg, int64_t last_msg_ts_ns, int64_t *ts_ns)
 {
@@ -1781,8 +1781,8 @@ end:
 
 bt_message_iterator_class_initialize_method_status
 lttng_live_msg_iter_init(bt_self_message_iterator *self_msg_it,
-                         bt_self_message_iterator_configuration *config,
-                         bt_self_component_port_output *self_port)
+                         bt_self_message_iterator_configuration *,
+                         bt_self_component_port_output *)
 {
     bt_message_iterator_class_initialize_method_status status;
     struct lttng_live_component *lttng_live;
@@ -2173,8 +2173,8 @@ end:
 
 bt_component_class_initialize_method_status
 lttng_live_component_init(bt_self_component_source *self_comp_src,
-                          bt_self_component_source_configuration *config, const bt_value *params,
-                          __attribute__((unused)) void *init_method_data)
+                          bt_self_component_source_configuration *, const bt_value *params,
+                          void *)
 {
     struct lttng_live_component *lttng_live;
     bt_component_class_initialize_method_status ret;
index 5c66d10f73883f128e5a09f5229b5a843f6617a3..eee28c41145cff19ee202743fee19882d35c53e9 100644 (file)
@@ -288,7 +288,7 @@ end:
 }
 
 int lttng_live_metadata_create_stream(struct lttng_live_session *session, uint64_t ctf_trace_id,
-                                      uint64_t stream_id, const char *trace_name)
+                                      uint64_t stream_id, const char *)
 {
     bt_self_component *self_comp = session->self_comp;
     bt_logging_level log_level = session->log_level;
index c1b5ff220a09e30e0df84e6a9cc2cba8609d109d..927ba7a8e391bd9c36f340938fa279b9c3dd5508 100644 (file)
@@ -1510,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)
 {
        /*
@@ -1758,8 +1759,8 @@ end:
 
 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 =
@@ -1955,7 +1956,7 @@ end:
 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_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
index 32ddd824b462ed984f311601b451acd1f65440e7..550ae9d925fb69c67e943bc3b7ed5caf8fa8c36c 100644 (file)
@@ -198,7 +198,8 @@ void details_finalize(bt_self_component_sink *comp)
 }
 
 static
-void configure_bool_opt(struct details_comp *details_comp,
+void configure_bool_opt(
+               struct details_comp *details_comp __attribute__((unused)),
                const bt_value *params, const char *param_name,
                bool default_value, bool *opt_value)
 {
@@ -333,9 +334,9 @@ void log_configuration(bt_self_component_sink *comp,
 
 bt_component_class_initialize_method_status details_init(
                bt_self_component_sink *comp,
-               bt_self_component_sink_configuration *config,
+               bt_self_component_sink_configuration *config __attribute__((unused)),
                const bt_value *params,
-               __attribute__((unused)) void *init_method_data)
+               void *init_method_data __attribute__((unused)))
 {
        bt_component_class_initialize_method_status status;
        bt_self_component_add_port_status add_port_status;
index a99599e3b99831daf6e1eeb7481520ec173627b8..1962f5dfe3506a775c754370e2a7b1cfd96c9326 100644 (file)
@@ -361,7 +361,9 @@ gint compare_strings(const char **a, const char **b)
 
 static
 bt_value_map_foreach_entry_const_func_status map_value_foreach_add_key_to_array(
-               const char *key, const bt_value *object, void *data)
+               const char *key,
+               const bt_value *object __attribute__((unused)),
+               void *data)
 {
        GPtrArray *keys = data;
 
index d52ddb2181d867affa702ea4158f43bdf0d43382..d23e31bec5cd0b69b5b1079aae0b81a25417214b 100644 (file)
@@ -361,8 +361,9 @@ void destroy_dmesg_component(struct dmesg_component *dmesg_comp)
 
 bt_component_class_initialize_method_status dmesg_init(
                bt_self_component_source *self_comp_src,
-               bt_self_component_source_configuration *config,
-               const bt_value *params, void *init_method_data)
+               bt_self_component_source_configuration *config __attribute__((unused)),
+               const bt_value *params,
+               void *init_method_data __attribute__((unused)))
 {
        struct dmesg_component *dmesg_comp = g_new0(struct dmesg_component, 1);
        bt_component_class_initialize_method_status status;
@@ -650,8 +651,8 @@ void destroy_dmesg_msg_iter(struct dmesg_msg_iter *dmesg_msg_iter)
 
 bt_message_iterator_class_initialize_method_status dmesg_msg_iter_init(
                bt_self_message_iterator *self_msg_iter,
-               bt_self_message_iterator_configuration *config,
-               bt_self_component_port_output *self_port)
+               bt_self_message_iterator_configuration *config __attribute__((unused)),
+               bt_self_component_port_output *self_port __attribute__((unused)))
 {
        bt_self_component *self_comp =
                bt_self_message_iterator_borrow_component(self_msg_iter);
index 510ed24e8c2df93e24d51469cd21b87362b99b57..5b66576475e62f9040a6fe5da94672a44a5d3835 100644 (file)
@@ -542,9 +542,9 @@ void set_use_colors(struct pretty_component *pretty)
 
 bt_component_class_initialize_method_status pretty_init(
                bt_self_component_sink *self_comp_sink,
-               bt_self_component_sink_configuration *config,
+               bt_self_component_sink_configuration *config __attribute__((unused)),
                const bt_value *params,
-               __attribute__((unused)) void *init_method_data)
+               void *init_method_data __attribute__((unused)))
 {
        bt_component_class_initialize_method_status status;
        bt_self_component_add_port_status add_port_status;
index be20f89538bede60a5bf4457a44eda80f82d237e..817d09945884b46954d7bd7faf6c3a1d4f6b9f1c 100644 (file)
@@ -130,9 +130,9 @@ struct bt_param_validation_map_value_entry_descr counter_params[] = {
 
 bt_component_class_initialize_method_status counter_init(
                bt_self_component_sink *component,
-               bt_self_component_sink_configuration *config,
+               bt_self_component_sink_configuration *config __attribute__((unused)),
                const bt_value *params,
-               __attribute__((unused)) void *init_method_data)
+               void *init_method_data __attribute__((unused)))
 {
        bt_component_class_initialize_method_status status;
        bt_self_component_add_port_status add_port_status;
index 93394029fd868a02d458a9895c43b69c5d7c0500..a1294c3d64a788ee71e3682447d2547b9f0d48c6 100644 (file)
@@ -44,9 +44,9 @@ struct bt_param_validation_map_value_entry_descr dummy_params[] = {
 
 bt_component_class_initialize_method_status dummy_init(
                bt_self_component_sink *self_comp_sink,
-               bt_self_component_sink_configuration *config,
+               bt_self_component_sink_configuration *config __attribute__((unused)),
                const bt_value *params,
-               __attribute__((unused)) void *init_method_data)
+               void *init_method_data __attribute__((unused)))
 {
        bt_self_component *self_comp =
                bt_self_component_sink_as_self_component(self_comp_sink);
index 49c6940f3e05759120e13db64c5540d6413e8ca3..6fe2f0039ce208a136b65f3d029650b61fcfaf29 100644 (file)
@@ -250,8 +250,9 @@ struct bt_param_validation_map_value_entry_descr muxer_params[] = {
 
 bt_component_class_initialize_method_status muxer_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;
@@ -1291,7 +1292,7 @@ end:
 bt_message_iterator_class_initialize_method_status muxer_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)))
 {
        struct muxer_comp *muxer_comp = NULL;
        struct muxer_msg_iter *muxer_msg_iter = NULL;
@@ -1440,8 +1441,8 @@ bt_message_iterator_class_next_method_status muxer_msg_iter_next(
 
 bt_component_class_port_connected_method_status muxer_input_port_connected(
                bt_self_component_filter *self_comp,
-               bt_self_component_port_input *self_port,
-               const bt_port_output *other_port)
+               bt_self_component_port_input *self_port __attribute__((unused)),
+               const bt_port_output *other_port __attribute__((unused)))
 {
        bt_component_class_port_connected_method_status status =
                BT_COMPONENT_CLASS_PORT_CONNECTED_METHOD_STATUS_OK;
index 31cad1c4823613adbaee93ee3f0ac6199680991f..afb1cf48ba9f52aca10ae3c16ab2151c6cd95dff 100644 (file)
@@ -425,7 +425,8 @@ end:
  */
 static
 int set_bound_from_param(struct trimmer_comp *trimmer_comp,
-               const char *param_name, const bt_value *param,
+               const char *param_name __attribute__((unused)),
+               const bt_value *param,
                struct trimmer_bound *bound, bool is_gmt)
 {
        int ret;
@@ -594,8 +595,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;
@@ -681,7 +683,7 @@ void destroy_trimmer_iterator_stream_state(
 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
index abad4ed4b400ce6bcd4d65377bfc8e7e615d4219..c348c5566c37e545e75583c2a50a8e8028d2b4e6 100644 (file)
@@ -35,7 +35,7 @@ static void trigger_fc_int_set_field_value_range_n_gt_64(bt_self_component *self
     bt_field_class_integer_set_field_value_range(get_uint_fc(self_comp), 65);
 }
 
-static void trigger_fc_int_set_field_value_range_null(bt_self_component *self_comp)
+static void trigger_fc_int_set_field_value_range_null(bt_self_component *)
 {
     bt_field_class_integer_set_field_value_range(NULL, 23);
 }
index 8a0b610f6a0b74d47984465a12ac88c0083837f2..56136ac585813e3084893dbd9a2001bc67f9f071 100644 (file)
@@ -173,7 +173,7 @@ void run_test(void)
        run_test_bt_uuid_generate();
 }
 
-int main(int argc, char **argv)
+int main(void)
 {
        /* Run tap-formated tests */
        run_test();
index cc3cbd9f00cfba26e1c297b0e0b5dda64eae207e..e9ec4b215779ee24d7b07de598590bedcd7636d7 100644 (file)
@@ -356,7 +356,8 @@ void test_array(void)
 
 static
 bt_value_map_foreach_entry_func_status test_map_foreach_cb_count(
-               const char *key, bt_value *object,
+       const char *key __attribute__((unused)),
+       bt_value *object __attribute__((unused)),
        void *data)
 {
        int *count = data;
index 0a0f2bc43451f455df794f251c6656bf2a32937a..3bd3f361a0fc5be48b5d0a44b1aab422739f1558 100644 (file)
@@ -179,9 +179,10 @@ size_t event_pos(struct event *event)
 
 static
 bt_message_iterator_class_next_method_status src_iter_next(
-               bt_self_message_iterator *self_iterator,
-               bt_message_array_const msgs, uint64_t capacity,
-               uint64_t *count)
+               bt_self_message_iterator *self_iterator __attribute__((unused)),
+               bt_message_array_const msgs __attribute__((unused)),
+               uint64_t capacity __attribute__((unused)),
+               uint64_t *count __attribute__((unused)))
 {
        return BT_MESSAGE_ITERATOR_CLASS_NEXT_METHOD_STATUS_ERROR;
 }
@@ -254,8 +255,9 @@ bt_component_class_port_connected_method_status sink_input_port_connected(
 static
 bt_component_class_initialize_method_status src_init(
        bt_self_component_source *self_comp,
-       bt_self_component_source_configuration *config,
-       const bt_value *params, void *init_method_data)
+       bt_self_component_source_configuration *config __attribute__((unused)),
+       const bt_value *params __attribute__((unused)),
+       void *init_method_data __attribute__((unused)))
 {
        int ret;
 
@@ -268,8 +270,9 @@ bt_component_class_initialize_method_status src_init(
 static
 bt_component_class_initialize_method_status sink_init(
        bt_self_component_sink *self_comp,
-       bt_self_component_sink_configuration *config,
-       const bt_value *params, void *init_method_data)
+       bt_self_component_sink_configuration *config __attribute__((unused)),
+       const bt_value *params __attribute__((unused)),
+       void *init_method_data __attribute__((unused)))
 {
        int ret;
 
@@ -281,7 +284,7 @@ bt_component_class_initialize_method_status sink_init(
 
 static
 bt_component_class_sink_consume_method_status sink_consume(
-               bt_self_component_sink *self_comp)
+               bt_self_component_sink *self_comp __attribute__((unused)))
 {
        return BT_COMPONENT_CLASS_SINK_CONSUME_METHOD_STATUS_OK;
 }
@@ -289,7 +292,7 @@ bt_component_class_sink_consume_method_status sink_consume(
 static
 bt_graph_listener_func_status graph_src_output_port_added(
                const bt_component_source *comp, const bt_port_output *port,
-               void *data)
+               void *data __attribute__((unused)))
 {
        struct event event = {
                .type = GRAPH_SRC_OUTPUT_PORT_ADDED,
@@ -307,7 +310,7 @@ bt_graph_listener_func_status graph_src_output_port_added(
 static
 bt_graph_listener_func_status graph_sink_input_port_added(
                const bt_component_sink *comp, const bt_port_input *port,
-               void *data)
+               void *data __attribute__((unused)))
 {
        struct event event = {
                .type = GRAPH_SINK_INPUT_PORT_ADDED,
@@ -706,7 +709,7 @@ void test_empty_graph(void)
        bt_graph_put_ref(graph);
 }
 
-int main(int argc, char **argv)
+int main(void)
 {
        plan_tests(NR_TESTS);
        init_test();
index 693f9db5a639153e57f0a5e903369b74f118c0b2..7f9e016adf7345af4f700b7b0edcca03a758cccb 100644 (file)
@@ -8,7 +8,8 @@
 #include <stdlib.h>
 #include <glib.h>
 
-static bt_plugin_initialize_func_status plugin_init(bt_self_plugin *plugin)
+static bt_plugin_initialize_func_status plugin_init(
+               bt_self_plugin *plugin __attribute__((unused)))
 {
        g_setenv("BT_TEST_PLUGIN_INITIALIZE_CALLED", "1", 1);
        return BT_PLUGIN_INITIALIZE_FUNC_STATUS_OK;
index 6fbd76dc3ec589b2199383ca736df1945996c441..d06087992c308ed6cef78e180529facb4edb701c 100644 (file)
@@ -8,16 +8,17 @@
 #include "common/assert.h"
 
 static bt_component_class_sink_consume_method_status sink_consume(
-               bt_self_component_sink *self_comp)
+               bt_self_component_sink *self_comp __attribute__((unused)))
 {
        return BT_COMPONENT_CLASS_SINK_CONSUME_METHOD_STATUS_OK;
 }
 
 static bt_component_class_get_supported_mip_versions_method_status
 sink_get_supported_mip_versions(
-               bt_self_component_class_sink *source_component_class,
-               const bt_value *params, void *initialize_method_data,
-               bt_logging_level logging_level,
+               bt_self_component_class_sink *source_component_class __attribute__((unused)),
+               const bt_value *params __attribute__((unused)),
+               void *initialize_method_data __attribute__((unused)),
+               bt_logging_level logging_level __attribute__((unused)),
                bt_integer_range_set_unsigned *supported_versions)
 {
        return (int) bt_integer_range_set_unsigned_add_range(
@@ -26,39 +27,40 @@ sink_get_supported_mip_versions(
 
 static bt_message_iterator_class_initialize_method_status
 src_dummy_iterator_init_method(
-               bt_self_message_iterator *self_msg_iter,
-               bt_self_message_iterator_configuration *config,
-               bt_self_component_port_output *self_port)
+               bt_self_message_iterator *self_msg_iter __attribute__((unused)),
+               bt_self_message_iterator_configuration *config __attribute__((unused)),
+               bt_self_component_port_output *self_port __attribute__((unused)))
 {
        return BT_MESSAGE_ITERATOR_CLASS_INITIALIZE_METHOD_STATUS_OK;
 }
 
 static bt_message_iterator_class_initialize_method_status
 flt_dummy_iterator_init_method(
-               bt_self_message_iterator *self_msg_iter,
-               bt_self_message_iterator_configuration *config,
-               bt_self_component_port_output *self_port)
+               bt_self_message_iterator *self_msg_iter __attribute__((unused)),
+               bt_self_message_iterator_configuration *config __attribute__((unused)),
+               bt_self_component_port_output *self_port __attribute__((unused)))
 {
        return BT_MESSAGE_ITERATOR_CLASS_INITIALIZE_METHOD_STATUS_OK;
 }
 
 static void dummy_iterator_finalize_method(
-               bt_self_message_iterator *self_msg_iter)
+               bt_self_message_iterator *self_msg_iter __attribute__((unused)))
 {
 }
 
 static bt_message_iterator_class_next_method_status
 dummy_iterator_next_method(
-               bt_self_message_iterator *self_msg_iter,
-               bt_message_array_const msgs, uint64_t capacity,
-               uint64_t *count)
+               bt_self_message_iterator *self_msg_iter __attribute__((unused)),
+               bt_message_array_const msgs __attribute__((unused)),
+               uint64_t capacity __attribute__((unused)),
+               uint64_t *count __attribute__((unused)))
 {
        return BT_MESSAGE_ITERATOR_CLASS_NEXT_METHOD_STATUS_OK;
 }
 
 static bt_component_class_query_method_status flt_query_method(
-               bt_self_component_class_filter *component_class,
-               bt_private_query_executor *priv_query_exec,
+               bt_self_component_class_filter *component_class __attribute__((unused)),
+               bt_private_query_executor *priv_query_exec __attribute__((unused)),
                const char *object, const bt_value *params,
                __attribute__((unused)) void *method_data,
                const bt_value **result)
index a3827ddf03cf914430aff1c1fc9d8b11b9a2d4a1..7aae2f98b1db6f2707d2cc8403c9cab1c96b98b2 100644 (file)
@@ -41,13 +41,15 @@ static bool trace_destroyed_4_called = false;
 static bool trace_destroyed_5_called = false;
 
 static
-void trace_class_destroyed_1(const bt_trace_class *tc, void *data)
+void trace_class_destroyed_1(const bt_trace_class *tc __attribute__((unused)),
+               void *data __attribute__((unused)))
 {
        trace_class_destroyed_1_called = true;
 }
 
 static
-void trace_class_destroyed_2(const bt_trace_class *tc, void *data)
+void trace_class_destroyed_2(const bt_trace_class *tc,
+               void *data __attribute__((unused)))
 {
        bt_trace_class_remove_listener_status remove_listener_status;
 
@@ -61,7 +63,8 @@ void trace_class_destroyed_2(const bt_trace_class *tc, void *data)
 }
 
 static
-void trace_class_destroyed_3(const bt_trace_class *tc, void *data)
+void trace_class_destroyed_3(const bt_trace_class *tc,
+               void *data __attribute__((unused)))
 {
        bt_trace_class_remove_listener_status remove_listener_status;
 
@@ -75,7 +78,8 @@ void trace_class_destroyed_3(const bt_trace_class *tc, void *data)
 }
 
 static
-void trace_class_destroyed_4(const bt_trace_class *tc, void *data)
+void trace_class_destroyed_4(const bt_trace_class *tc,
+               void *data __attribute__((unused)))
 {
        bt_trace_class_remove_listener_status remove_listener_status;
 
@@ -89,19 +93,22 @@ void trace_class_destroyed_4(const bt_trace_class *tc, void *data)
 }
 
 static
-void trace_class_destroyed_5(const bt_trace_class *tc, void *data)
+void trace_class_destroyed_5(const bt_trace_class *tc __attribute__((unused)),
+               void *data __attribute__((unused)))
 {
        trace_class_destroyed_5_called = true;
 }
 
 static
-void trace_destroyed_1(const bt_trace *t, void *data)
+void trace_destroyed_1(const bt_trace *t __attribute__((unused)),
+               void *data __attribute__((unused)))
 {
        trace_destroyed_1_called = true;
 }
 
 static
-void trace_destroyed_2(const bt_trace *t, void *data)
+void trace_destroyed_2(const bt_trace *t,
+               void *data __attribute__((unused)))
 {
        bt_trace_remove_listener_status remove_listener_status;
 
@@ -115,7 +122,8 @@ void trace_destroyed_2(const bt_trace *t, void *data)
 }
 
 static
-void trace_destroyed_3(const bt_trace *t, void *data)
+void trace_destroyed_3(const bt_trace *t,
+               void *data __attribute__((unused)))
 {
        bt_trace_remove_listener_status remove_listener_status;
 
@@ -129,7 +137,8 @@ void trace_destroyed_3(const bt_trace *t, void *data)
 }
 
 static
-void trace_destroyed_4(const bt_trace *t, void *data)
+void trace_destroyed_4(const bt_trace *t,
+               void *data __attribute__((unused)))
 {
        bt_trace_remove_listener_status remove_listener_status;
 
@@ -143,7 +152,8 @@ void trace_destroyed_4(const bt_trace *t, void *data)
 }
 
 static
-void trace_destroyed_5(const bt_trace *t, void *data)
+void trace_destroyed_5(const bt_trace *t __attribute__((unused)),
+               void *data __attribute__((unused)))
 {
        trace_destroyed_5_called = true;
 }
@@ -151,8 +161,9 @@ void trace_destroyed_5(const bt_trace *t, void *data)
 static
 bt_component_class_initialize_method_status hello_init(
                bt_self_component_source *self_component,
-               bt_self_component_source_configuration *config,
-               const bt_value *params, void *init_method_data)
+               bt_self_component_source_configuration *config __attribute__((unused)),
+               const bt_value *params __attribute__((unused)),
+               void *init_method_data __attribute__((unused)))
 {
        bt_self_component *self_comp;
        bt_trace_class *tc;
@@ -230,15 +241,16 @@ bt_component_class_initialize_method_status hello_init(
 
 static
 bt_message_iterator_class_next_method_status hello_iter_next(
-               bt_self_message_iterator *message_iterator,
-               bt_message_array_const msgs, uint64_t capacity,
-               uint64_t *count)
+               bt_self_message_iterator *message_iterator __attribute__((unused)),
+               bt_message_array_const msgs __attribute__((unused)),
+               uint64_t capacity __attribute__((unused)),
+               uint64_t *count __attribute__((unused)))
 {
        BT_ASSERT(false);
        return BT_MESSAGE_ITERATOR_CLASS_NEXT_METHOD_STATUS_OK;
 }
 
-int main(int argc, char **argv)
+int main(void)
 {
        bt_graph *graph;
        bt_message_iterator_class *msg_iter_cls;
index 952b6bf52a1d0300b09583fb8b78e7c4bddc269c..4bf97d4fabc807f387a3f7fa7207139f8ce001b2 100644 (file)
@@ -49,8 +49,9 @@ void simple_fini_func(void *data)
 static
 bt_component_class_initialize_method_status src_init(
                bt_self_component_source *self_comp,
-               bt_self_component_source_configuration *config,
-               const bt_value *params, void *init_method_data)
+               bt_self_component_source_configuration *config __attribute__((unused)),
+               const bt_value *params __attribute__((unused)),
+               void *init_method_data __attribute__((unused)))
 {
        bt_self_component_add_port_status status;
 
@@ -62,9 +63,10 @@ bt_component_class_initialize_method_status src_init(
 
 static
 bt_message_iterator_class_next_method_status src_iter_next(
-               bt_self_message_iterator *message_iterator,
-               bt_message_array_const msgs, uint64_t capacity,
-               uint64_t *count)
+               bt_self_message_iterator *message_iterator __attribute__((unused)),
+               bt_message_array_const msgs __attribute__((unused)),
+               uint64_t capacity __attribute__((unused)),
+               uint64_t *count __attribute__((unused)))
 {
        return BT_MESSAGE_ITERATOR_CLASS_NEXT_METHOD_STATUS_END;
 }
index 70caf29cf3053be4d0956b604ab5471f958291b3..5d0bdfd96f7f1d8411a6a11fff41faa25ebb7ce9 100644 (file)
@@ -398,8 +398,9 @@ static void test_example_scenario(bt_self_component_source *self_comp)
 static
 bt_component_class_initialize_method_status src_init(
        bt_self_component_source *self_comp,
-       bt_self_component_source_configuration *config,
-       const bt_value *params, void *init_method_data)
+       bt_self_component_source_configuration *config __attribute__((unused)),
+       const bt_value *params __attribute__((unused)),
+       void *init_method_data __attribute__((unused)))
 {
        test_example_scenario(self_comp);
        return BT_COMPONENT_CLASS_INITIALIZE_METHOD_STATUS_OK;
@@ -407,9 +408,10 @@ bt_component_class_initialize_method_status src_init(
 
 static
 bt_message_iterator_class_next_method_status src_iter_next(
-               bt_self_message_iterator *self_iterator,
-               bt_message_array_const msgs, uint64_t capacity,
-               uint64_t *count)
+               bt_self_message_iterator *self_iterator __attribute__((unused)),
+               bt_message_array_const msgs __attribute__((unused)),
+               uint64_t capacity __attribute__((unused)),
+               uint64_t *count __attribute__((unused)))
 {
        return BT_MESSAGE_ITERATOR_CLASS_NEXT_METHOD_STATUS_ERROR;
 }
@@ -571,7 +573,7 @@ static void test_put_order(void)
  * External tools (e.g. valgrind) should be used to confirm that this
  * known-good test does not leak memory.
  */
-int main(int argc, char **argv)
+int main(void)
 {
        /* Initialize tap harness before any tests */
        plan_tests(NR_TESTS);
index fa1401046e23b2d9acf32734edcdd0010e0d652c..5607d3201c9b8e679b8174bfa4b47d29fc48aaa6 100644 (file)
@@ -282,7 +282,7 @@ void test_string_invalid_choice(void)
 static
 enum bt_param_validation_status custom_validation_func_valid(
                const bt_value *value,
-               struct bt_param_validation_context *context)
+               struct bt_param_validation_context *context __attribute__((unused)))
 {
        ok(bt_value_get_type(value) == BT_VALUE_TYPE_UNSIGNED_INTEGER,
                "type of value passed to custom function is as expected");
@@ -306,7 +306,7 @@ void test_custom_validation_func_valid(void)
 
 static
 enum bt_param_validation_status custom_validation_func_invalid(
-               const bt_value *value,
+               const bt_value *value __attribute__((unused)),
                struct bt_param_validation_context *context)
 {
        return bt_param_validation_error(context, "wrooooong");
index ee7780f4046e1cd9d33871a444837964182558c0..8c5e850722d545017fb4deccb9226f5d0dedd465 100644 (file)
 #define RMDIR_NFDOPEN 8
 
 static
-int nftw_recursive_rmdir(const char *file, const struct stat *sb, int flag,
-               struct FTW *s)
+int nftw_recursive_rmdir(const char *file,
+               const struct stat *sb __attribute__((unused)),
+               int flag,
+               struct FTW *s __attribute__((unused)))
 {
        switch (flag) {
        case FTW_F:
index 9f41408bd4c4dd25a729b607b4c276bb115ab27b..5fa9482b25f369ece77d338444a5da46bdec0391 100644 (file)
@@ -44,12 +44,12 @@ static void _cleanup(void);
 
 #ifdef __MINGW32__
 static inline
-void flockfile (FILE * filehandle) {
+void flockfile (FILE * filehandle __attribute__((unused))) {
        return;
 }
 
 static inline
-void funlockfile(FILE * filehandle) {
+void funlockfile(FILE * filehandle __attribute__((unused))) {
        return;
 }
 #endif
This page took 0.06053 seconds and 4 git commands to generate.