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:
-Wduplicated-branches dnl
-Wlogical-op dnl
-Wsuggest-override 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
-Wno-sign-compare dnl
dnl
dnl Some versions of SWIG (like 3.0.12) generate code that produces
# For SWIG generated code
WARN_CFLAGS += -Wno-missing-field-initializers
# 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)" \
BUILD_FLAGS=CC="$(CC)" \
CFLAGS="$(GLIB_CFLAGS) $(AM_CFLAGS) $(CFLAGS) $(WARN_CFLAGS)" \
#include <windows.h>
static
#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);
}
if (the_interrupter) {
bt_interrupter_set(the_interrupter);
}
static
bt_value_map_foreach_entry_const_func_status collect_map_keys(
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;
{
GPtrArray *map_keys = data;
static
bt_graph_listener_func_status graph_source_output_port_added_listener(
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);
const bt_port_output *port, void *data)
{
return graph_output_port_added_listener(data, port);
static
bt_graph_listener_func_status graph_filter_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);
const bt_port_output *port, void *data)
{
return graph_output_port_added_listener(data, port);
#ifdef __MINGW32__
static
#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();
}
{
return g_get_home_dir();
}
-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;
{
char *tmp;
GString *norm_path = NULL;
-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;
{
/* Not supported on Windows yet */
return -1;
void bt_common_abort(void) __attribute__((noreturn));
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
/*
* 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;
{
size_t i = 0;
ssize_t ret;
-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)
* into the buffer (which we allocate).
*/
static inline
* 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;
{
char *tmpname;
FILE *fp;
* into the buffer (which we allocate).
*/
static inline
* 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;
{
char *tmpname;
int ret;
-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;
{
struct mmap_mapping *mapping = NULL;
void *mapping_addr;
-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;
{
int ret = 0;
struct mmap_mapping *mapping = addr;
static inline
void *bt_mmap(void *addr, size_t length, int prot, int flags, int fd,
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);
}
{
return (void *) mmap(addr, length, prot, flags, fd, offset);
}
#define BT_SOCKET_ERROR SOCKET_ERROR
#define BT_SOCKET SOCKET
#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
+
-int bt_socket_init(int log_level)
+int bt_socket_init(int log_level BT_SOCKET_LOG_LEVEL_UNUSED_ATTR)
{
WORD verreq;
WSADATA wsa;
{
WORD verreq;
WSADATA wsa;
#define BT_SOCKET int
static inline
#define BT_SOCKET int
static inline
-int bt_socket_init(int log_level)
+int bt_socket_init(int log_level __attribute__((unused)))
static
void destroy_event_header_field(struct bt_ctf_field_wrapper *field_wrapper,
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);
{
BT_ASSERT_DBG(field_wrapper);
bt_ctf_object_put_ref(field_wrapper->field);
static
void release_event_header_field(struct bt_ctf_field_wrapper *field_wrapper,
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);
{
BT_ASSERT_DBG(field_wrapper);
BT_CTF_OBJECT_PUT_REF_AND_RESET(field_wrapper->field);
#include "field-wrapper.h"
#include "object.h"
#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);
{
struct bt_ctf_field_wrapper *field_wrapper =
g_new0(struct bt_ctf_field_wrapper, 1);
struct bt_ctf_field *bt_ctf_field_enumeration_borrow_container(
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
+
-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);
}
{
return bt_ctf_field_common_is_set_recursive((void *) field);
}
* Destroys a path token.
*/
static
* 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);
}
{
g_string_free(ptoken, TRUE);
}
-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)
{
struct bt_ctf_field_type_common *packet_context_type,
bool check_ts_begin_end_mapped)
{
-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)
{
struct bt_ctf_stream_class_common *stream_class,
struct bt_ctf_field_type_common *event_header_type)
{
-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;
}
{
return (void *) bt_ctf_value_null;
}
-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
{
/*
* Always BT_CTF_TRUE since bt_ctf_value_compare() already checks if both
-void bt_ctf_value_null_freeze(struct bt_ctf_value *object)
+void bt_ctf_value_null_freeze(struct bt_ctf_value *object __attribute__((unused)))
static
enum bt_component_class_initialize_method_status simple_sink_init(
bt_self_component_sink *self_comp,
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;
{
int status = BT_FUNC_STATUS_OK;
struct simple_sink_data *data = NULL;
#include "component-class.h"
#include "lib/func-status.h"
#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(
{
}
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;
{
struct bt_component_filter *filter = NULL;
#include "graph.h"
#include "lib/func-status.h"
#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(
{
}
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;
{
struct bt_component_sink *sink = NULL;
#include "message/iterator.h"
#include "lib/func-status.h"
#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(
{
}
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;
{
struct bt_component_source *source = NULL;
static
void destroy_message_event(struct bt_message *msg,
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,
{
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,
{
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);
}
{
bt_message_packet_destroy(msg);
}
static
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_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)
static
enum bt_message_iterator_can_seek_beginning_status can_seek_beginning_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;
bt_bool *can_seek)
{
*can_seek = BT_TRUE;
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_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);
const char *prefix, const struct bt_object *obj)
{
BUF_APPEND(", %sref-count=%llu", prefix, obj->ref_count);
BUF_APPEND("\"" BT_UUID_FMT "\"", BT_UUID_FMT_VALUES(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));
const char *prefix, const struct bt_object_pool *pool)
{
BUF_APPEND(", %ssize=%zu", PRFIELD(pool->size));
}
static inline void format_integer_field_class(char **buf_ch,
}
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 =
const struct bt_field_class *field_class)
{
const struct bt_field_class_integer *int_fc =
}
static inline void format_array_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 =
const struct bt_field_class *field_class)
{
const struct bt_field_class_array *array_fc =
-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));
const char *prefix, const struct bt_interrupter *intr)
{
BUF_APPEND(", %sis-set=%d", PRFIELD(intr->is_set));
&graph->packet_end_msg_pool);
}
&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. */
}
{
/* Empty, the address is automatically printed. */
}
-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;
const char **out_fmt_ch, va_list *args)
{
const char *fmt_ch = *out_fmt_ch;
static
void plugin_comp_class_destroy_listener(struct bt_component_class *comp_class,
static
void plugin_comp_class_destroy_listener(struct bt_component_class *comp_class,
+ void *data __attribute__((unused)))
{
bt_list_del(&comp_class->node);
BT_OBJECT_PUT_REF_AND_RESET(comp_class->so_handle);
{
bt_list_del(&comp_class->node);
BT_OBJECT_PUT_REF_AND_RESET(comp_class->so_handle);
static
int nftw_append_all_from_dir(const char *file,
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;
{
int ret = 0;
const char *name = file + s->base;
void check_heap(const struct ptr_heap *heap);
#else
static inline
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)))
static
void free_clock_snapshot(struct bt_clock_snapshot *clock_snapshot,
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);
}
{
bt_clock_snapshot_destroy(clock_snapshot);
}
static
void free_event(struct bt_event *event,
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);
}
{
bt_event_destroy(event);
}
-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)))
#include "field-wrapper.h"
#include "field.h"
#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);
{
struct bt_field_wrapper *field_wrapper =
g_new0(struct bt_field_wrapper, 1);
static
void free_field_wrapper(struct bt_field_wrapper *field_wrapper,
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);
}
{
bt_field_wrapper_destroy((void *) field_wrapper);
}
-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);
}
{
bt_packet_destroy(packet);
}
static inline
int bt_util_ns_from_origin_inline(int64_t base_offset_ns,
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;
uint64_t frequency, uint64_t value, int64_t *ns_from_origin)
{
int ret = 0;
-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
{
/*
* Always BT_TRUE since bt_value_is_equal() already checks if both
-void bt_value_null_freeze(struct bt_value *object)
+void bt_value_null_freeze(struct bt_value *object __attribute__((unused)))
static inline
void set_integer_value(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);
const char *api_func)
{
BT_ASSERT_PRE_DEV_VALUE_HOT_FROM_FUNC(api_func, integer_obj);
libctf_parser_la_CXXFLAGS = $(AM_CXXFLAGS) \
-Wno-unused-function \
-Wno-null-dereference \
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 \
libctf_ast_la_SOURCES = \
visitor-generate-ir.cpp \
return g_string_free(str, TRUE);
}
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;
{
int i = 0;
int ret = 0;
/*
* Destroys a path token.
*/
/*
* 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);
}
{
g_string_free((GString *) ptoken, TRUE);
}
}
static inline bt_field_class *ctf_field_class_string_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);
{
bt_field_class *ir_fc = bt_field_class_string_create(ctx->ir_tc);
static inline void translate_struct_field_class_members(struct ctx *ctx,
struct ctf_field_class_struct *fc,
bt_field_class *ir_fc,
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 *)
}
static inline struct ctf_field_class_string *
}
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();
{
struct ctf_field_class_string *copy_fc = ctf_field_class_string_create();
static int _ctf_visitor_semantic_check(int depth, struct ctf_node *node,
struct meta_log_config *log_cfg);
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;
struct meta_log_config *log_cfg)
{
struct ctf_node *iter;
return -EPERM; /* Structure not allowed */
}
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) {
struct meta_log_config *log_cfg)
{
switch (node->parent->type) {
return -EINVAL; /* Incoherent structure */
}
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) {
struct meta_log_config *log_cfg)
{
switch (node->parent->type) {
}
static inline int write_string_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));
const bt_field *field)
{
return bt_ctfser_write_string(&stream->ctfser, bt_field_string_get_value(field));
bt_component_class_initialize_method_status
ctf_fs_sink_init(bt_self_component_sink *self_comp_sink,
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;
{
bt_component_class_initialize_method_status status;
bt_self_component_add_port_status add_port_status;
mant_dig, exp_dig, fc->base.base.alignment);
}
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; }");
}
{
g_string_append(ctx->tsdl, "string { encoding = UTF8; }");
}
-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;
{
struct ctf_fs_ds_file *ds_file = (struct ctf_fs_ds_file *) data;
bt_stream_class *ds_file_stream_class;
}
struct ctf_fs_component *ctf_fs_component_create(bt_logging_level log_level,
}
struct ctf_fs_component *ctf_fs_component_create(bt_logging_level log_level,
- bt_self_component *self_comp)
{
struct ctf_fs_component *ctf_fs;
{
struct ctf_fs_component *ctf_fs;
}
static int create_one_port_for_trace(struct ctf_fs_component *ctf_fs,
}
static int create_one_port_for_trace(struct ctf_fs_component *ctf_fs,
- struct ctf_fs_trace *ctf_fs_trace,
struct ctf_fs_ds_file_group *ds_file_group,
bt_self_component_source *self_comp_src)
{
struct ctf_fs_ds_file_group *ds_file_group,
bt_self_component_source *self_comp_src)
{
}
bt_component_class_initialize_method_status
}
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 =
{
struct ctf_fs_component *ctf_fs;
bt_component_class_initialize_method_status 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;
{
/* Nothing to initialize for the moment. */
return 0;
-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)
{
struct lttng_live_msg_iter *lttng_live_msg_iter,
const bt_message *msg, int64_t last_msg_ts_ns, int64_t *ts_ns)
{
bt_message_iterator_class_initialize_method_status
lttng_live_msg_iter_init(bt_self_message_iterator *self_msg_it,
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;
{
bt_message_iterator_class_initialize_method_status status;
struct lttng_live_component *lttng_live;
bt_component_class_initialize_method_status
lttng_live_component_init(bt_self_component_source *self_comp_src,
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;
{
struct lttng_live_component *lttng_live;
bt_component_class_initialize_method_status ret;
}
int lttng_live_metadata_create_stream(struct lttng_live_session *session, uint64_t ctf_trace_id,
}
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;
{
bt_self_component *self_comp = session->self_comp;
bt_logging_level log_level = session->log_level;
-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)
{
/*
const bt_message *in_message)
{
/*
bt_component_class_initialize_method_status debug_info_comp_init(
bt_self_component_filter *self_comp_flt,
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 =
{
struct debug_info_component *debug_info_comp;
bt_component_class_initialize_method_status status =
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_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
{
bt_message_iterator_class_initialize_method_status status;
bt_message_iterator_create_from_message_iterator_status
-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)
{
const bt_value *params, const char *param_name,
bool default_value, bool *opt_value)
{
bt_component_class_initialize_method_status details_init(
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)),
- __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;
{
bt_component_class_initialize_method_status status;
bt_self_component_add_port_status add_port_status;
static
bt_value_map_foreach_entry_const_func_status map_value_foreach_add_key_to_array(
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;
{
GPtrArray *keys = data;
bt_component_class_initialize_method_status dmesg_init(
bt_self_component_source *self_comp_src,
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;
{
struct dmesg_component *dmesg_comp = g_new0(struct dmesg_component, 1);
bt_component_class_initialize_method_status status;
bt_message_iterator_class_initialize_method_status dmesg_msg_iter_init(
bt_self_message_iterator *self_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);
{
bt_self_component *self_comp =
bt_self_message_iterator_borrow_component(self_msg_iter);
bt_component_class_initialize_method_status pretty_init(
bt_self_component_sink *self_comp_sink,
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)),
- __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;
{
bt_component_class_initialize_method_status status;
bt_self_component_add_port_status add_port_status;
bt_component_class_initialize_method_status counter_init(
bt_self_component_sink *component,
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)),
- __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;
{
bt_component_class_initialize_method_status status;
bt_self_component_add_port_status add_port_status;
bt_component_class_initialize_method_status dummy_init(
bt_self_component_sink *self_comp_sink,
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)),
- __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);
{
bt_self_component *self_comp =
bt_self_component_sink_as_self_component(self_comp_sink);
bt_component_class_initialize_method_status muxer_init(
bt_self_component_filter *self_comp_flt,
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;
{
bt_component_class_initialize_method_status status;
bt_self_component_add_port_status add_port_status;
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_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;
{
struct muxer_comp *muxer_comp = NULL;
struct muxer_msg_iter *muxer_msg_iter = NULL;
bt_component_class_port_connected_method_status muxer_input_port_connected(
bt_self_component_filter *self_comp,
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;
{
bt_component_class_port_connected_method_status status =
BT_COMPONENT_CLASS_PORT_CONNECTED_METHOD_STATUS_OK;
*/
static
int set_bound_from_param(struct trimmer_comp *trimmer_comp,
*/
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;
struct trimmer_bound *bound, bool is_gmt)
{
int ret;
bt_component_class_initialize_method_status trimmer_init(
bt_self_component_filter *self_comp_flt,
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;
{
bt_component_class_initialize_method_status status;
bt_self_component_add_port_status add_port_status;
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_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
{
bt_message_iterator_class_initialize_method_status status;
bt_message_iterator_create_from_message_iterator_status
bt_field_class_integer_set_field_value_range(get_uint_fc(self_comp), 65);
}
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);
}
{
bt_field_class_integer_set_field_value_range(NULL, 23);
}
run_test_bt_uuid_generate();
}
run_test_bt_uuid_generate();
}
-int main(int argc, char **argv)
{
/* Run tap-formated tests */
run_test();
{
/* Run tap-formated tests */
run_test();
static
bt_value_map_foreach_entry_func_status test_map_foreach_cb_count(
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;
void *data)
{
int *count = data;
static
bt_message_iterator_class_next_method_status src_iter_next(
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;
}
{
return BT_MESSAGE_ITERATOR_CLASS_NEXT_METHOD_STATUS_ERROR;
}
static
bt_component_class_initialize_method_status src_init(
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)))
static
bt_component_class_initialize_method_status sink_init(
bt_self_component_sink *self_comp,
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)))
static
bt_component_class_sink_consume_method_status sink_consume(
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;
}
{
return BT_COMPONENT_CLASS_SINK_CONSUME_METHOD_STATUS_OK;
}
static
bt_graph_listener_func_status graph_src_output_port_added(
const bt_component_source *comp, const bt_port_output *port,
static
bt_graph_listener_func_status graph_src_output_port_added(
const bt_component_source *comp, const bt_port_output *port,
+ void *data __attribute__((unused)))
{
struct event event = {
.type = GRAPH_SRC_OUTPUT_PORT_ADDED,
{
struct event event = {
.type = 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,
static
bt_graph_listener_func_status graph_sink_input_port_added(
const bt_component_sink *comp, const bt_port_input *port,
+ void *data __attribute__((unused)))
{
struct event event = {
.type = GRAPH_SINK_INPUT_PORT_ADDED,
{
struct event event = {
.type = GRAPH_SINK_INPUT_PORT_ADDED,
bt_graph_put_ref(graph);
}
bt_graph_put_ref(graph);
}
-int main(int argc, char **argv)
{
plan_tests(NR_TESTS);
init_test();
{
plan_tests(NR_TESTS);
init_test();
#include <stdlib.h>
#include <glib.h>
#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;
{
g_setenv("BT_TEST_PLUGIN_INITIALIZE_CALLED", "1", 1);
return BT_PLUGIN_INITIALIZE_FUNC_STATUS_OK;
#include "common/assert.h"
static bt_component_class_sink_consume_method_status sink_consume(
#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(
{
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(
bt_integer_range_set_unsigned *supported_versions)
{
return (int) bt_integer_range_set_unsigned_add_range(
static bt_message_iterator_class_initialize_method_status
src_dummy_iterator_init_method(
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(
{
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(
{
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(
{
}
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(
{
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)
const char *object, const bt_value *params,
__attribute__((unused)) void *method_data,
const bt_value **result)
static bool trace_destroyed_5_called = false;
static
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
{
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;
{
bt_trace_class_remove_listener_status remove_listener_status;
-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;
{
bt_trace_class_remove_listener_status remove_listener_status;
-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;
{
bt_trace_class_remove_listener_status remove_listener_status;
-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
{
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
{
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;
{
bt_trace_remove_listener_status remove_listener_status;
-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;
{
bt_trace_remove_listener_status remove_listener_status;
-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;
{
bt_trace_remove_listener_status remove_listener_status;
-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;
}
{
trace_destroyed_5_called = true;
}
static
bt_component_class_initialize_method_status hello_init(
bt_self_component_source *self_component,
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;
{
bt_self_component *self_comp;
bt_trace_class *tc;
static
bt_message_iterator_class_next_method_status hello_iter_next(
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;
}
{
BT_ASSERT(false);
return BT_MESSAGE_ITERATOR_CLASS_NEXT_METHOD_STATUS_OK;
}
-int main(int argc, char **argv)
{
bt_graph *graph;
bt_message_iterator_class *msg_iter_cls;
{
bt_graph *graph;
bt_message_iterator_class *msg_iter_cls;
static
bt_component_class_initialize_method_status src_init(
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)))
{
bt_self_component_add_port_status status;
{
bt_self_component_add_port_status status;
static
bt_message_iterator_class_next_method_status src_iter_next(
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;
}
{
return BT_MESSAGE_ITERATOR_CLASS_NEXT_METHOD_STATUS_END;
}
static
bt_component_class_initialize_method_status src_init(
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;
{
test_example_scenario(self_comp);
return BT_COMPONENT_CLASS_INITIALIZE_METHOD_STATUS_OK;
static
bt_message_iterator_class_next_method_status src_iter_next(
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;
}
{
return BT_MESSAGE_ITERATOR_CLASS_NEXT_METHOD_STATUS_ERROR;
}
* External tools (e.g. valgrind) should be used to confirm that this
* known-good test does not leak memory.
*/
* 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)
{
/* Initialize tap harness before any tests */
plan_tests(NR_TESTS);
{
/* Initialize tap harness before any tests */
plan_tests(NR_TESTS);
static
enum bt_param_validation_status custom_validation_func_valid(
const bt_value *value,
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");
{
ok(bt_value_get_type(value) == BT_VALUE_TYPE_UNSIGNED_INTEGER,
"type of value passed to custom function is as expected");
static
enum bt_param_validation_status custom_validation_func_invalid(
static
enum bt_param_validation_status custom_validation_func_invalid(
+ const bt_value *value __attribute__((unused)),
struct bt_param_validation_context *context)
{
return bt_param_validation_error(context, "wrooooong");
struct bt_param_validation_context *context)
{
return bt_param_validation_error(context, "wrooooong");
#define RMDIR_NFDOPEN 8
static
#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:
{
switch (flag) {
case FTW_F:
#ifdef __MINGW32__
static inline
#ifdef __MINGW32__
static inline
-void flockfile (FILE * filehandle) {
+void flockfile (FILE * filehandle __attribute__((unused))) {
-void funlockfile(FILE * filehandle) {
+void funlockfile(FILE * filehandle __attribute__((unused))) {