static volatile int quit = 0;
-static void sighandler(int signal)
+static void sighandler(int signal __attribute__((unused)))
{
printf("Signal caught, exiting\n");
quit = 1;
#include <time.h>
#include <unistd.h>
-int main(int argc, char **argv)
+int main(void)
{
uint64_t i;
#include <signal.h>
-int main(int argc, char *argv[])
+int main(void)
{
raise(SIGSEGV);
return 0;
/*
* Thread managing health check socket.
*/
-void *thread_manage_health_consumerd(void *data)
+void *thread_manage_health_consumerd(void *data __attribute__((unused)))
{
int sock = -1, new_sock = -1, ret, i, pollfd, err = -1;
uint32_t revents, nb_fd;
/*
* Signal handler for the daemon
*/
-static void sighandler(int sig, siginfo_t *siginfo, void *arg)
+static void sighandler(int sig, siginfo_t *siginfo,
+ void *arg __attribute__((unused)))
{
if (sig == SIGINT && sigintcount++ == 0) {
DBG("ignoring first SIGINT");
int cmd_create_session_2_11(const struct lttng_buffer_view *payload,
char *session_name, char *hostname, char *base_path,
uint32_t *live_timer, bool *snapshot,
- uint64_t *id_sessiond, lttng_uuid sessiond_uuid,
+ uint64_t *id_sessiond,
+ lttng_uuid sessiond_uuid,
bool *has_current_chunk, uint64_t *current_chunk_id,
time_t *creation_time,
bool *session_name_contains_creation_time)
/*
* Thread managing health check socket.
*/
-void *thread_manage_health_relayd(void *data)
+void *thread_manage_health_relayd(void *data __attribute__((unused)))
{
int sock = -1, new_sock = -1, ret, i, pollfd, err = -1;
uint32_t revents, nb_fd;
}
static
-int close_sock(void *data, int *in_fd)
+int close_sock(void *data, int *in_fd __attribute__((unused)))
{
struct lttcomm_sock *sock = (lttcomm_sock *) data;
* This thread manages the listening for new connections on the network
*/
static
-void *thread_listener(void *data)
+void *thread_listener(void *data __attribute__((unused)))
{
int i, ret, pollfd, err = -1;
uint32_t revents, nb_fd;
* This thread manages the dispatching of the requests to worker threads
*/
static
-void *thread_dispatcher(void *data)
+void *thread_dispatcher(void *data __attribute__((unused)))
{
int err = -1;
ssize_t ret;
* This thread does the actual work
*/
static
-void *thread_worker(void *data)
+void *thread_worker(void *data __attribute__((unused)))
{
int ret, err = -1;
uint32_t nb_fd;
* See config_entry_handler_cb comment in common/config/session-config.h for the
* return value conventions.
*/
-static int config_entry_handler(const struct config_entry *entry, void *unused)
+static int config_entry_handler(const struct config_entry *entry,
+ void *unused __attribute__((unused)))
{
int ret = 0, i;
print_sessions();
}
-static int noop_close(void *data, int *fds)
+static int noop_close(void *data __attribute__((unused)),
+ int *fds __attribute__((unused)))
{
return 0;
}
return ret;
}
-static int close_sock(void *data, int *in_fd)
+static int close_sock(void *data, int *in_fd __attribute__((unused)))
{
struct lttcomm_sock *sock = (lttcomm_sock *) data;
/*
* This thread manages the listening for new connections on the network
*/
-static void *relay_thread_listener(void *data)
+static void *relay_thread_listener(void *data __attribute__((unused)))
{
int i, ret, pollfd, err = -1;
uint32_t revents, nb_fd;
/*
* This thread manages the dispatching of the requests to worker threads
*/
-static void *relay_thread_dispatcher(void *data)
+static void *relay_thread_dispatcher(void *data __attribute__((unused)))
{
int err = -1;
ssize_t ret;
*
* On success, send back the session id or else return a negative value.
*/
-static int relay_create_session(const struct lttcomm_relayd_hdr *recv_hdr,
+static int relay_create_session(
+ const struct lttcomm_relayd_hdr *recv_hdr __attribute__((unused)),
struct relay_connection *conn,
const struct lttng_buffer_view *payload)
{
/*
* relay_add_stream: allocate a new stream for a session
*/
-static int relay_add_stream(const struct lttcomm_relayd_hdr *recv_hdr,
+static int relay_add_stream(
+ const struct lttcomm_relayd_hdr *recv_hdr __attribute__((unused)),
struct relay_connection *conn,
const struct lttng_buffer_view *payload)
{
/*
* relay_close_stream: close a specific stream
*/
-static int relay_close_stream(const struct lttcomm_relayd_hdr *recv_hdr,
+static int relay_close_stream(
+ const struct lttcomm_relayd_hdr *recv_hdr __attribute__((unused)),
struct relay_connection *conn,
const struct lttng_buffer_view *payload)
{
* relay_reset_metadata: reset a metadata stream
*/
static
-int relay_reset_metadata(const struct lttcomm_relayd_hdr *recv_hdr,
+int relay_reset_metadata(
+ const struct lttcomm_relayd_hdr *recv_hdr __attribute__((unused)),
struct relay_connection *conn,
const struct lttng_buffer_view *payload)
{
* relay_start: send an acknowledgment to the client to tell if we are
* ready to receive data. We are ready if a session is established.
*/
-static int relay_start(const struct lttcomm_relayd_hdr *recv_hdr,
+static int relay_start(
+ const struct lttcomm_relayd_hdr *recv_hdr __attribute__((unused)),
struct relay_connection *conn,
- const struct lttng_buffer_view *payload)
+ const struct lttng_buffer_view *payload __attribute__((unused)))
{
int ret = 0;
ssize_t send_ret;
/*
* relay_send_version: send relayd version number
*/
-static int relay_send_version(const struct lttcomm_relayd_hdr *recv_hdr,
+static int relay_send_version(
+ const struct lttcomm_relayd_hdr *recv_hdr __attribute__((unused)),
struct relay_connection *conn,
const struct lttng_buffer_view *payload)
{
/*
* Check for data pending for a given stream id from the session daemon.
*/
-static int relay_data_pending(const struct lttcomm_relayd_hdr *recv_hdr,
+static int relay_data_pending(
+ const struct lttcomm_relayd_hdr *recv_hdr __attribute__((unused)),
struct relay_connection *conn,
const struct lttng_buffer_view *payload)
{
* the control socket has been handled. So, this is why we simply return
* OK here.
*/
-static int relay_quiescent_control(const struct lttcomm_relayd_hdr *recv_hdr,
+static int relay_quiescent_control(
+ const struct lttcomm_relayd_hdr *recv_hdr __attribute__((unused)),
struct relay_connection *conn,
const struct lttng_buffer_view *payload)
{
*
* Return to the client if there is data in flight or not with a ret_code.
*/
-static int relay_end_data_pending(const struct lttcomm_relayd_hdr *recv_hdr,
+static int relay_end_data_pending(
+ const struct lttcomm_relayd_hdr *recv_hdr __attribute__((unused)),
struct relay_connection *conn,
const struct lttng_buffer_view *payload)
{
*
* Return 0 on success else a negative value.
*/
-static int relay_recv_index(const struct lttcomm_relayd_hdr *recv_hdr,
+static int relay_recv_index(
+ const struct lttcomm_relayd_hdr *recv_hdr __attribute__((unused)),
struct relay_connection *conn,
const struct lttng_buffer_view *payload)
{
*
* Return 0 on success else a negative value.
*/
-static int relay_streams_sent(const struct lttcomm_relayd_hdr *recv_hdr,
+static int relay_streams_sent(
+ const struct lttcomm_relayd_hdr *recv_hdr __attribute__((unused)),
struct relay_connection *conn,
- const struct lttng_buffer_view *payload)
+ const struct lttng_buffer_view *payload __attribute__((unused)))
{
int ret;
ssize_t send_ret;
* session rotation feature (not the tracefile rotation feature).
*/
static int relay_rotate_session_streams(
- const struct lttcomm_relayd_hdr *recv_hdr,
+ const struct lttcomm_relayd_hdr *recv_hdr __attribute__((unused)),
struct relay_connection *conn,
const struct lttng_buffer_view *payload)
{
/*
* relay_create_trace_chunk: create a new trace chunk
*/
-static int relay_create_trace_chunk(const struct lttcomm_relayd_hdr *recv_hdr,
+static int relay_create_trace_chunk(
+ const struct lttcomm_relayd_hdr *recv_hdr __attribute__((unused)),
struct relay_connection *conn,
const struct lttng_buffer_view *payload)
{
/*
* relay_close_trace_chunk: close a trace chunk
*/
-static int relay_close_trace_chunk(const struct lttcomm_relayd_hdr *recv_hdr,
+static int relay_close_trace_chunk(
+ const struct lttcomm_relayd_hdr *recv_hdr __attribute__((unused)),
struct relay_connection *conn,
const struct lttng_buffer_view *payload)
{
/*
* relay_trace_chunk_exists: check if a trace chunk exists
*/
-static int relay_trace_chunk_exists(const struct lttcomm_relayd_hdr *recv_hdr,
+static int relay_trace_chunk_exists(
+ const struct lttcomm_relayd_hdr *recv_hdr __attribute__((unused)),
struct relay_connection *conn,
const struct lttng_buffer_view *payload)
{
/*
* relay_get_configuration: query whether feature is available
*/
-static int relay_get_configuration(const struct lttcomm_relayd_hdr *recv_hdr,
+static int relay_get_configuration(
+ const struct lttcomm_relayd_hdr *recv_hdr __attribute__((unused)),
struct relay_connection *conn,
const struct lttng_buffer_view *payload)
{
/*
* This thread does the actual work
*/
-static void *relay_thread_worker(void *data)
+static void *relay_thread_worker(void *data __attribute__((unused)))
{
int ret, err = -1, last_seen_data_fd = -1;
uint32_t nb_fd;
"Relayd connection pipe", relay_conn_pipe);
}
-static int stdio_open(void *data, int *fds)
+static int stdio_open(void *data __attribute__((unused)), int *fds)
{
fds[0] = fileno(stdout);
fds[1] = fileno(stderr);
static int action_executor_notify_handler(struct action_executor *executor,
const struct action_work_item *work_item,
- struct action_work_subitem *item)
+ struct action_work_subitem *item __attribute__((unused)))
{
return notification_client_list_send_evaluation(work_item->client_list,
work_item->trigger,
}
static int action_executor_start_session_handler(
- struct action_executor *executor,
+ struct action_executor *executor __attribute__((unused)),
const struct action_work_item *work_item,
struct action_work_subitem *item)
{
}
static int action_executor_stop_session_handler(
- struct action_executor *executor,
+ struct action_executor *executor __attribute__((unused)),
const struct action_work_item *work_item,
struct action_work_subitem *item)
{
}
static int action_executor_rotate_session_handler(
- struct action_executor *executor,
+ struct action_executor *executor __attribute__((unused)),
const struct action_work_item *work_item,
struct action_work_subitem *item)
{
}
static int action_executor_snapshot_session_handler(
- struct action_executor *executor,
+ struct action_executor *executor __attribute__((unused)),
const struct action_work_item *work_item,
struct action_work_subitem *item)
{
return ret;
}
-static int action_executor_list_handler(struct action_executor *executor,
- const struct action_work_item *work_item,
- struct action_work_subitem *item)
+static int action_executor_list_handler(
+ struct action_executor *executor __attribute__((unused)),
+ const struct action_work_item *work_item __attribute__((unused)),
+ struct action_work_subitem *item __attribute__((unused)))
{
ERR("Execution of a list action by the action executor should never occur");
abort();
/*
* Count number of session permitted by uid/gid.
*/
-static unsigned int lttng_sessions_count(uid_t uid, gid_t gid)
+static unsigned int lttng_sessions_count(uid_t uid,
+ gid_t gid __attribute__((unused)))
{
unsigned int i = 0;
struct ltt_session *session;
{
lttng_snapshot_output output = cmd_ctx->lsm.u.snapshot_record.output;
ret = cmd_snapshot_record(cmd_ctx->session,
- &output,
- cmd_ctx->lsm.u.snapshot_record.wait);
+ &output, 0); // RFC: set to zero since it's ignored by cmd_snapshot_record
break;
}
case LTTNG_CREATE_SESSION_EXT:
lttng_pipe_destroy(quit_pipe);
}
-static void thread_init_cleanup(void *data)
+static void thread_init_cleanup(void *data __attribute__((unused)))
{
set_thread_status(false);
}
* Returns LTTNG_OK, or an LTTng error code on failure.
*/
static enum lttng_error_code send_consumer_relayd_sockets(
- enum lttng_domain_type domain,
unsigned int session_id, struct consumer_output *consumer,
struct consumer_socket *sock, const char *session_name,
const char *hostname, const char *base_path, int session_live_timer,
cds_lfht_for_each_entry(usess->consumer->socks->ht, &iter.iter,
socket, node.node) {
pthread_mutex_lock(socket->lock);
- ret = send_consumer_relayd_sockets(LTTNG_DOMAIN_UST, session->id,
+ ret = send_consumer_relayd_sockets(session->id,
usess->consumer, socket,
session->name, session->hostname,
session->base_path,
cds_lfht_for_each_entry(ksess->consumer->socks->ht, &iter.iter,
socket, node.node) {
pthread_mutex_lock(socket->lock);
- ret = send_consumer_relayd_sockets(LTTNG_DOMAIN_KERNEL, session->id,
+ ret = send_consumer_relayd_sockets(session->id,
ksess->consumer, socket,
session->name, session->hostname,
session->base_path,
cds_lfht_for_each_entry(output->socks->ht, &iter.iter,
socket, node.node) {
pthread_mutex_lock(socket->lock);
- status = send_consumer_relayd_sockets(LTTNG_DOMAIN_NONE, session->id,
+ status = send_consumer_relayd_sockets(session->id,
output, socket,
session->name, session->hostname,
base_path,
struct ltt_kernel_session *ksess,
const struct consumer_output *output,
const struct ltt_session *session,
- int wait, uint64_t nb_packets_per_stream)
+ uint64_t nb_packets_per_stream)
{
enum lttng_error_code status;
LTTNG_ASSERT(session);
status = kernel_snapshot_record(
- ksess, output, wait, nb_packets_per_stream);
+ ksess, output, nb_packets_per_stream);
return status;
}
static enum lttng_error_code record_ust_snapshot(struct ltt_ust_session *usess,
const struct consumer_output *output,
const struct ltt_session *session,
- int wait, uint64_t nb_packets_per_stream)
+ uint64_t nb_packets_per_stream)
{
enum lttng_error_code status;
LTTNG_ASSERT(session);
status = ust_app_snapshot_record(
- usess, output, wait, nb_packets_per_stream);
+ usess, output, nb_packets_per_stream);
return status;
}
static
enum lttng_error_code snapshot_record(struct ltt_session *session,
- const struct snapshot_output *snapshot_output, int wait)
+ const struct snapshot_output *snapshot_output)
{
int64_t nb_packets_per_stream;
char snapshot_chunk_name[LTTNG_NAME_MAX];
if (session->kernel_session) {
ret_code = record_kernel_snapshot(session->kernel_session,
snapshot_kernel_consumer_output, session,
- wait, nb_packets_per_stream);
+ nb_packets_per_stream);
if (ret_code != LTTNG_OK) {
goto error_close_trace_chunk;
}
if (session->ust_session) {
ret_code = record_ust_snapshot(session->ust_session,
snapshot_ust_consumer_output, session,
- wait, nb_packets_per_stream);
+ nb_packets_per_stream);
if (ret_code != LTTNG_OK) {
goto error_close_trace_chunk;
}
* Return LTTNG_OK on success or else a LTTNG_ERR code.
*/
int cmd_snapshot_record(struct ltt_session *session,
- const struct lttng_snapshot_output *output, int wait)
+ const struct lttng_snapshot_output *output,
+ int wait __attribute__((unused)))
{
enum lttng_error_code cmd_ret = LTTNG_OK;
int ret;
/* Use the global datetime */
memcpy(tmp_output->datetime, datetime, sizeof(datetime));
- cmd_ret = snapshot_record(session, tmp_output, wait);
+ cmd_ret = snapshot_record(session, tmp_output);
if (cmd_ret != LTTNG_OK) {
goto error;
}
}
}
- cmd_ret = snapshot_record(session, &output_copy, wait);
+ cmd_ret = snapshot_record(session, &output_copy);
if (cmd_ret != LTTNG_OK) {
rcu_read_unlock();
goto error;
uint64_t channel_key,
uint64_t session_id,
const char *pathname,
- uid_t uid,
- gid_t gid,
uint64_t relayd_id,
const char *name,
unsigned int nb_init_streams,
*/
enum lttng_error_code consumer_snapshot_channel(struct consumer_socket *socket,
uint64_t key, const struct consumer_output *output, int metadata,
- uid_t uid, gid_t gid, const char *channel_path, int wait,
+ const char *channel_path,
uint64_t nb_packets_per_stream)
{
int ret;
* chunk each stream is currently writing to (for the rotate_pending operation).
*/
int consumer_rotate_channel(struct consumer_socket *socket, uint64_t key,
- uid_t uid, gid_t gid, struct consumer_output *output,
+ struct consumer_output *output,
bool is_metadata_channel)
{
int ret;
uint64_t channel_key,
uint64_t session_id,
const char *pathname,
- uid_t uid,
- gid_t gid,
uint64_t relayd_id,
const char *name,
unsigned int nb_init_streams,
/* Snapshot command. */
enum lttng_error_code consumer_snapshot_channel(struct consumer_socket *socket,
uint64_t key, const struct consumer_output *output, int metadata,
- uid_t uid, gid_t gid, const char *channel_path, int wait,
- uint64_t nb_packets_per_stream);
+ const char *channel_path, uint64_t nb_packets_per_stream);
/* Rotation commands. */
int consumer_rotate_channel(struct consumer_socket *socket, uint64_t key,
- uid_t uid, gid_t gid, struct consumer_output *output,
- bool is_metadata_channel);
+ struct consumer_output *output, bool is_metadata_channel);
int consumer_init(struct consumer_socket *socket,
const lttng_uuid sessiond_uuid);
*/
static
struct ust_error_accounting_entry *ust_error_accounting_entry_create(
- struct lttng_ht *uid_ht, const struct ust_app *app)
+ const struct ust_app *app)
{
int i, ret, *cpu_counter_fds = NULL;
struct lttng_ust_ctl_daemon_counter *daemon_counter;
*/
pthread_mutex_lock(&the_event_notifier_counter.lock);
- entry = ust_error_accounting_entry_create(error_counter_uid_ht,
- app);
+ entry = ust_error_accounting_entry_create(app);
if (!entry) {
status = EVENT_NOTIFIER_ERROR_ACCOUNTING_STATUS_ERR;
pthread_mutex_unlock(&the_event_notifier_counter.lock);
*/
enum event_notifier_error_accounting_status
event_notifier_error_accounting_unregister_app(struct ust_app *app);
+
#else /* HAVE_LIBLTTNG_UST_CTL */
+
static inline
enum event_notifier_error_accounting_status
-event_notifier_error_accounting_register_app(struct ust_app *app)
+event_notifier_error_accounting_register_app(
+ struct ust_app *app __attribute__((unused)))
{
return EVENT_NOTIFIER_ERROR_ACCOUNTING_STATUS_OK;
}
static inline
enum event_notifier_error_accounting_status
-event_notifier_error_accounting_unregister_app(struct ust_app *app)
+event_notifier_error_accounting_unregister_app(
+ struct ust_app *app __attribute__((unused)))
{
return EVENT_NOTIFIER_ERROR_ACCOUNTING_STATUS_OK;
}
return 0;
}
-void lttng_fd_put(enum lttng_fd_type type, unsigned int nr)
+void lttng_fd_put(enum lttng_fd_type type __attribute__((unused)),
+ unsigned int nr)
{
uatomic_sub(&fd_count, (long) nr);
}
channel->key,
ksession->id,
&pathname[consumer_path_offset],
- ksession->uid,
- ksession->gid,
consumer->net_seq_index,
channel->channel->name,
channel->stream_count,
ksession->metadata->key,
ksession->id,
"",
- ksession->uid,
- ksession->gid,
consumer->net_seq_index,
ksession->metadata->conf->name,
1,
int kernel_consumer_add_stream(struct consumer_socket *sock,
struct ltt_kernel_channel *channel,
struct ltt_kernel_stream *stream,
- struct ltt_kernel_session *session, unsigned int monitor)
+ struct ltt_kernel_session *session)
{
int ret;
struct lttcomm_consumer_msg lkm;
/* Add stream on the kernel consumer side. */
ret = kernel_consumer_add_stream(sock, channel, stream,
- ksession, monitor);
+ ksession);
if (ret < 0) {
goto error;
}
*/
enum lttng_error_code kernel_snapshot_record(
struct ltt_kernel_session *ksess,
- const struct consumer_output *output, int wait,
+ const struct consumer_output *output,
uint64_t nb_packets_per_stream)
{
int err, ret, saved_metadata_fd;
/* For each channel, ask the consumer to snapshot it. */
cds_list_for_each_entry(chan, &ksess->channel_list.head, list) {
status = consumer_snapshot_channel(socket, chan->key, output, 0,
- ksess->uid, ksess->gid,
- &trace_path[consumer_path_offset], wait,
+ &trace_path[consumer_path_offset],
nb_packets_per_stream);
if (status != LTTNG_OK) {
(void) kernel_consumer_destroy_metadata(socket,
/* Snapshot metadata, */
status = consumer_snapshot_channel(socket, ksess->metadata->key, output,
- 1, ksess->uid, ksess->gid, &trace_path[consumer_path_offset],
- wait, 0);
+ 1, &trace_path[consumer_path_offset], 0);
if (status != LTTNG_OK) {
goto error_consumer;
}
DBG("Rotate kernel channel %" PRIu64 ", session %s",
chan->key, session->name);
ret = consumer_rotate_channel(socket, chan->key,
- ksess->uid, ksess->gid, ksess->consumer,
+ ksess->consumer,
/* is_metadata_channel */ false);
if (ret < 0) {
status = LTTNG_ERR_ROTATION_FAIL_CONSUMER;
* Rotate the metadata channel.
*/
ret = consumer_rotate_channel(socket, ksess->metadata->key,
- ksess->uid, ksess->gid, ksess->consumer,
+ ksess->consumer,
/* is_metadata_channel */ true);
if (ret < 0) {
status = LTTNG_ERR_ROTATION_FAIL_CONSUMER;
void kernel_destroy_channel(struct ltt_kernel_channel *kchan);
enum lttng_error_code kernel_snapshot_record(
struct ltt_kernel_session *ksess,
- const struct consumer_output *output, int wait,
+ const struct consumer_output *output,
uint64_t nb_packets_per_stream);
int kernel_syscall_mask(int chan_fd, char **syscall_mask, uint32_t *nr_bits);
enum lttng_error_code kernel_rotate_session(struct ltt_session *session);
* See config_entry_handler_cb comment in common/config/session-config.h for the
* return value conventions.
*/
-static int config_entry_handler(const struct config_entry *entry, void *unused)
+static int config_entry_handler(const struct config_entry *entry,
+ void *unused __attribute__((unused)))
{
int ret = 0, i;
* Simply stop all worker threads, leaving main() return gracefully after
* joining all threads and calling cleanup().
*/
-static void sighandler(int sig, siginfo_t *siginfo, void *arg)
+static void sighandler(int sig, siginfo_t *siginfo,
+ void *arg __attribute__((unused)))
{
switch (sig) {
case SIGINT:
* @brief Logging function for libkmod integration.
*/
static ATTR_FORMAT_PRINTF(6, 0)
-void log_kmod(void *data, int priority, const char *file, int line,
- const char *fn, const char *format, va_list args)
+void log_kmod(void *data __attribute__((unused)),
+ int priority __attribute__((unused)),
+ const char *file __attribute__((unused)),
+ int line __attribute__((unused)),
+ const char *fn __attribute__((unused)),
+ const char *format, va_list args)
{
char *str;
}
static
-void notification_client_destroy(struct notification_client *client,
- struct notification_thread_state *state)
+void notification_client_destroy(struct notification_client *client)
{
if (!client) {
return;
}
static int handle_notification_thread_command_list_triggers(
- struct notification_thread_handle *handle,
+ struct notification_thread_handle *handle __attribute__((unused)),
struct notification_thread_state *state,
uid_t client_uid,
struct lttng_triggers **triggers,
return ret;
error:
- notification_client_destroy(client, state);
+ notification_client_destroy(client);
return ret;
}
* Client no longer accessible to other threads (through the
* client lists).
*/
- notification_client_destroy(client, state);
+ notification_client_destroy(client);
return ret;
}
static
int client_handle_message_unknown(struct notification_client *client,
- struct notification_thread_state *state)
+ struct notification_thread_state *state __attribute__((unused)))
{
int ret;
/*
static
int evaluate_buffer_condition(const struct lttng_condition *condition,
struct lttng_evaluation **evaluation,
- const struct notification_thread_state *state,
+ const struct notification_thread_state *state __attribute__((unused)),
const struct channel_state_sample *previous_sample,
const struct channel_state_sample *latest_sample,
uint64_t previous_session_consumed_total,
#else /* HAVE_LIBLTTNG_UST_CTL */
static
-bool launch_application_notification_thread(int apps_cmd_notify_pipe_read_fd)
+bool launch_application_notification_thread(
+ int apps_cmd_notify_pipe_read_fd __attribute__((unused)))
{
return true;
}
static
int handle_job_queue(struct rotation_thread_handle *handle,
- struct rotation_thread *state,
+ struct rotation_thread *state __attribute__((unused)),
struct rotation_thread_timer_queue *queue)
{
int ret = 0;
}
static
-int handle_notification_channel(int fd,
+int handle_notification_channel(int fd __attribute__((unused)),
struct rotation_thread_handle *handle,
- struct rotation_thread *state)
+ struct rotation_thread *state __attribute__((unused)))
{
int ret;
bool notification_pending;
}
static
-bool shutdown_timer_thread(void *data)
+bool shutdown_timer_thread(void *data __attribute__((unused)))
{
return kill(getpid(), LTTNG_SESSIOND_SIG_EXIT) == 0;
}
#else /* HAVE_LIBLTTNG_UST_CTL */
-static inline int trace_ust_ht_match_event(struct cds_lfht_node *node,
- const void *_key)
+static inline int trace_ust_ht_match_event(
+ struct cds_lfht_node *node __attribute__((unused)),
+ const void *_key __attribute__((unused)))
{
return 0;
}
-static inline int trace_ust_ht_match_event_by_name(struct cds_lfht_node *node,
- const void *_key)
+
+static inline int trace_ust_ht_match_event_by_name(
+ struct cds_lfht_node *node __attribute__((unused)),
+ const void *_key __attribute__((unused)))
{
return 0;
}
+
static inline
-struct ltt_ust_channel *trace_ust_find_channel_by_name(struct lttng_ht *ht,
- const char *name)
+struct ltt_ust_channel *trace_ust_find_channel_by_name(
+ struct lttng_ht *ht __attribute__((unused)),
+ const char *name __attribute__((unused)))
{
return NULL;
}
static inline
-struct ltt_ust_session *trace_ust_create_session(unsigned int session_id)
+struct ltt_ust_session *trace_ust_create_session(
+ unsigned int session_id __attribute__((unused)))
{
return NULL;
}
+
static inline
-struct ltt_ust_channel *trace_ust_create_channel(struct lttng_channel *attr,
- enum lttng_domain_type domain)
+struct ltt_ust_channel *trace_ust_create_channel(
+ struct lttng_channel *attr __attribute__((unused)),
+ enum lttng_domain_type domain __attribute__((unused)))
{
return NULL;
}
+
static inline
-enum lttng_error_code trace_ust_create_event(struct lttng_event *ev,
- const char *filter_expression,
- struct lttng_bytecode *filter,
- struct lttng_event_exclusion *exclusion,
- bool internal_event, struct ltt_ust_event **ust_event)
+enum lttng_error_code trace_ust_create_event(
+ struct lttng_event *ev __attribute__((unused)),
+ const char *filter_expression __attribute__((unused)),
+ struct lttng_bytecode *filter __attribute__((unused)),
+ struct lttng_event_exclusion *exclusion __attribute__((unused)),
+ bool internal_event __attribute__((unused)),
+ struct ltt_ust_event **ust_event __attribute__((unused)))
{
return LTTNG_ERR_NO_UST;
}
+
static inline
-void trace_ust_destroy_session(struct ltt_ust_session *session)
+void trace_ust_destroy_session(
+ struct ltt_ust_session *session __attribute__((unused)))
{
}
static inline
-void trace_ust_destroy_channel(struct ltt_ust_channel *channel)
+void trace_ust_destroy_channel(
+ struct ltt_ust_channel *channel __attribute__((unused)))
{
}
static inline
-void trace_ust_destroy_event(struct ltt_ust_event *event)
+void trace_ust_destroy_event(
+ struct ltt_ust_event *event __attribute__((unused)))
{
}
static inline
-void trace_ust_free_session(struct ltt_ust_session *session)
+void trace_ust_free_session(
+ struct ltt_ust_session *session __attribute__((unused)))
{
}
static inline
struct ltt_ust_context *trace_ust_create_context(
- const struct lttng_event_context *ctx)
+ const struct lttng_event_context *ctx __attribute__((unused)))
{
return NULL;
}
+
static inline
-int trace_ust_match_context(const struct ltt_ust_context *uctx,
- const struct lttng_event_context *ctx)
+int trace_ust_match_context(
+ const struct ltt_ust_context *uctx __attribute__((unused)),
+ const struct lttng_event_context *ctx __attribute__((unused)))
{
return 0;
}
+
static inline
-struct ltt_ust_event *trace_ust_find_event(struct lttng_ht *ht,
- char *name, struct lttng_bytecode *filter,
- enum lttng_ust_abi_loglevel_type loglevel_type, int loglevel_value,
- struct lttng_event_exclusion *exclusion)
+struct ltt_ust_event *trace_ust_find_event(
+ struct lttng_ht *ht __attribute__((unused)),
+ char *name __attribute__((unused)),
+ struct lttng_bytecode *filter __attribute__((unused)),
+ enum lttng_ust_abi_loglevel_type loglevel_type __attribute__((unused)),
+ int loglevel_value __attribute__((unused)),
+ struct lttng_event_exclusion *exclusion __attribute__((unused)))
{
return NULL;
}
+
static inline
-void trace_ust_delete_channel(struct lttng_ht *ht,
- struct ltt_ust_channel *channel)
+void trace_ust_delete_channel(
+ struct lttng_ht *ht __attribute__((unused)),
+ struct ltt_ust_channel *channel __attribute__((unused)))
{
return;
}
+
static inline
-struct agent *trace_ust_find_agent(struct ltt_ust_session *session,
- enum lttng_domain_type domain_type)
+struct agent *trace_ust_find_agent(
+ struct ltt_ust_session *session __attribute__((unused)),
+ enum lttng_domain_type domain_type __attribute__((unused)))
{
return NULL;
}
+
static inline int trace_ust_id_tracker_lookup(
- enum lttng_process_attr process_attr,
- struct ltt_ust_session *session,
- int id)
+ enum lttng_process_attr process_attr __attribute__((unused)),
+ struct ltt_ust_session *session __attribute__((unused)),
+ int id __attribute__((unused)))
{
return 0;
}
+
static inline enum lttng_error_code
trace_ust_process_attr_tracker_set_tracking_policy(
- struct ltt_ust_session *session,
- enum lttng_process_attr process_attr,
- enum lttng_tracking_policy policy)
+ struct ltt_ust_session *session __attribute__((unused)),
+ enum lttng_process_attr process_attr __attribute__((unused)),
+ enum lttng_tracking_policy policy __attribute__((unused)))
{
return LTTNG_OK;
}
+
static inline enum lttng_error_code
trace_ust_process_attr_tracker_inclusion_set_add_value(
- struct ltt_ust_session *session,
- enum lttng_process_attr process_attr,
- const struct process_attr_value *value)
+ struct ltt_ust_session *session __attribute__((unused)),
+ enum lttng_process_attr process_attr __attribute__((unused)),
+ const struct process_attr_value *value __attribute__((unused)))
{
return LTTNG_OK;
}
+
static inline enum lttng_error_code
trace_ust_process_attr_tracker_inclusion_set_remove_value(
- struct ltt_ust_session *session,
- enum lttng_process_attr process_attr,
- const struct process_attr_value *value)
+ struct ltt_ust_session *session __attribute__((unused)),
+ enum lttng_process_attr process_attr __attribute__((unused)),
+ const struct process_attr_value *value __attribute__((unused)))
{
return LTTNG_OK;
}
+
static inline const struct process_attr_tracker *
-trace_ust_get_process_attr_tracker(struct ltt_ust_session *session,
- enum lttng_process_attr process_attr)
+trace_ust_get_process_attr_tracker(
+ struct ltt_ust_session *session __attribute__((unused)),
+ enum lttng_process_attr process_attr __attribute__((unused)))
{
return NULL;
}
#include <lttng/action/action-internal.h>
enum lttng_trigger_status lttng_trigger_add_error_results(
- const struct lttng_trigger *trigger,
- struct lttng_error_query_results *results)
+ const struct lttng_trigger *trigger __attribute__((unused)),
+ struct lttng_error_query_results *results __attribute__((unused)))
{
return LTTNG_TRIGGER_STATUS_OK;
}
* Should be called with session mutex held.
*/
static
-int create_ust_event(struct ust_app *app, struct ust_app_session *ua_sess,
+int create_ust_event(struct ust_app *app,
struct ust_app_channel *ua_chan, struct ust_app_event *ua_event)
{
int ret = 0;
* Called with UST app session lock held.
*/
static
-int enable_ust_app_event(struct ust_app_session *ua_sess,
- struct ust_app_event *ua_event, struct ust_app *app)
+int enable_ust_app_event(struct ust_app_event *ua_event,
+ struct ust_app *app)
{
int ret;
/*
* Disable on the tracer side a ust app event for the session and channel.
*/
-static int disable_ust_app_event(struct ust_app_session *ua_sess,
- struct ust_app_event *ua_event, struct ust_app *app)
+static int disable_ust_app_event(struct ust_app_event *ua_event,
+ struct ust_app *app)
{
int ret;
*/
static int do_consumer_create_channel(struct ltt_ust_session *usess,
struct ust_app_session *ua_sess, struct ust_app_channel *ua_chan,
- int bitness, struct ust_registry_session *registry,
- uint64_t trace_archive_id)
+ int bitness, struct ust_registry_session *registry)
{
int ret;
unsigned int nb_fd = 0;
* ust app channel object with all streams and data object.
*/
ret = do_consumer_create_channel(usess, ua_sess, ua_chan,
- app->bits_per_long, reg_uid->registry->reg.ust,
- session->most_recent_chunk_id.value);
+ app->bits_per_long, reg_uid->registry->reg.ust);
if (ret < 0) {
ERR("Error creating UST channel \"%s\" on the consumer daemon",
ua_chan->name);
/* Create and get channel on the consumer side. */
ret = do_consumer_create_channel(usess, ua_sess, ua_chan,
- app->bits_per_long, registry,
- session->most_recent_chunk_id.value);
+ app->bits_per_long, registry);
if (ret < 0) {
ERR("Error creating UST channel \"%s\" on the consumer daemon",
ua_chan->name);
*/
static int ust_app_channel_allocate(struct ust_app_session *ua_sess,
struct ltt_ust_channel *uchan,
- enum lttng_ust_abi_chan_type type, struct ltt_ust_session *usess,
+ enum lttng_ust_abi_chan_type type,
+ struct ltt_ust_session *usess __attribute__((unused)),
struct ust_app_channel **ua_chanp)
{
int ret = 0;
* Called with ust app session mutex held.
*/
static
-int create_ust_app_event(struct ust_app_session *ua_sess,
- struct ust_app_channel *ua_chan, struct ltt_ust_event *uevent,
+int create_ust_app_event(struct ust_app_channel *ua_chan,
+ struct ltt_ust_event *uevent,
struct ust_app *app)
{
int ret = 0;
shadow_copy_event(ua_event, uevent);
/* Create it on the tracer side */
- ret = create_ust_event(app, ua_sess, ua_chan, ua_event);
+ ret = create_ust_event(app, ua_chan, ua_event);
if (ret < 0) {
/*
* Not found previously means that it does not exist on the
continue;
}
- ret = disable_ust_app_event(ua_sess, ua_event, app);
+ ret = disable_ust_app_event(ua_event, app);
if (ret < 0) {
/* XXX: Report error someday... */
continue;
goto next_app;
}
- ret = enable_ust_app_event(ua_sess, ua_event, app);
+ ret = enable_ust_app_event(ua_event, app);
if (ret < 0) {
pthread_mutex_unlock(&ua_sess->lock);
goto error;
ua_chan = caa_container_of(ua_chan_node, struct ust_app_channel, node);
- ret = create_ust_app_event(ua_sess, ua_chan, uevent, app);
+ ret = create_ust_app_event(ua_chan, uevent, app);
pthread_mutex_unlock(&ua_sess->lock);
if (ret < 0) {
if (ret != -LTTNG_UST_ERR_EXIST) {
static
int ust_app_channel_synchronize_event(struct ust_app_channel *ua_chan,
- struct ltt_ust_event *uevent, struct ust_app_session *ua_sess,
+ struct ltt_ust_event *uevent,
struct ust_app *app)
{
int ret = 0;
ua_event = find_ust_app_event(ua_chan->events, uevent->attr.name,
uevent->filter, uevent->attr.loglevel, uevent->exclusion);
if (!ua_event) {
- ret = create_ust_app_event(ua_sess, ua_chan, uevent, app);
+ ret = create_ust_app_event(ua_chan, uevent, app);
if (ret < 0) {
goto end;
}
} else {
if (ua_event->enabled != uevent->enabled) {
ret = uevent->enabled ?
- enable_ust_app_event(ua_sess, ua_event, app) :
- disable_ust_app_event(ua_sess, ua_event, app);
+ enable_ust_app_event(ua_event, app) :
+ disable_ust_app_event(ua_event, app);
}
}
cds_lfht_for_each_entry(uchan->events->ht, &uevent_iter, uevent,
node.node) {
ret = ust_app_channel_synchronize_event(ua_chan,
- uevent, ua_sess, app);
+ uevent, app);
if (ret) {
goto end;
}
*/
enum lttng_error_code ust_app_snapshot_record(
const struct ltt_ust_session *usess,
- const struct consumer_output *output, int wait,
+ const struct consumer_output *output,
uint64_t nb_packets_per_stream)
{
int ret = 0;
buf_reg_chan, node.node) {
status = consumer_snapshot_channel(socket,
buf_reg_chan->consumer_key,
- output, 0, usess->uid,
- usess->gid, &trace_path[consumer_path_offset], wait,
+ output, 0, &trace_path[consumer_path_offset],
nb_packets_per_stream);
if (status != LTTNG_OK) {
goto error;
}
status = consumer_snapshot_channel(socket,
reg->registry->reg.ust->metadata_key, output, 1,
- usess->uid, usess->gid, &trace_path[consumer_path_offset],
- wait, 0);
+ &trace_path[consumer_path_offset], 0);
if (status != LTTNG_OK) {
goto error;
}
ua_chan, node.node) {
status = consumer_snapshot_channel(socket,
ua_chan->key, output, 0,
- lttng_credentials_get_uid(&ua_sess->effective_credentials),
- lttng_credentials_get_gid(&ua_sess->effective_credentials),
- &trace_path[consumer_path_offset], wait,
+ &trace_path[consumer_path_offset],
nb_packets_per_stream);
switch (status) {
case LTTNG_OK:
}
status = consumer_snapshot_channel(socket,
registry->metadata_key, output, 1,
- lttng_credentials_get_uid(&ua_sess->effective_credentials),
- lttng_credentials_get_gid(&ua_sess->effective_credentials),
- &trace_path[consumer_path_offset], wait, 0);
+ &trace_path[consumer_path_offset], 0);
switch (status) {
case LTTNG_OK:
break;
buf_reg_chan, node.node) {
ret = consumer_rotate_channel(socket,
buf_reg_chan->consumer_key,
- usess->uid, usess->gid,
usess->consumer,
/* is_metadata_channel */ false);
if (ret < 0) {
ret = consumer_rotate_channel(socket,
reg->registry->reg.ust->metadata_key,
- usess->uid, usess->gid,
usess->consumer,
/* is_metadata_channel */ true);
if (ret < 0) {
ua_chan, node.node) {
ret = consumer_rotate_channel(socket,
ua_chan->key,
- lttng_credentials_get_uid(&ua_sess->effective_credentials),
- lttng_credentials_get_gid(&ua_sess->effective_credentials),
ua_sess->consumer,
/* is_metadata_channel */ false);
if (ret < 0) {
(void) push_metadata(registry, usess->consumer);
ret = consumer_rotate_channel(socket,
registry->metadata_key,
- lttng_credentials_get_uid(&ua_sess->effective_credentials),
- lttng_credentials_get_gid(&ua_sess->effective_credentials),
ua_sess->consumer,
/* is_metadata_channel */ true);
if (ret < 0) {
void ust_app_destroy(struct ust_app *app);
enum lttng_error_code ust_app_snapshot_record(
const struct ltt_ust_session *usess,
- const struct consumer_output *output, int wait,
+ const struct consumer_output *output,
uint64_t nb_packets_per_stream);
uint64_t ust_app_get_size_one_more_packet_per_stream(
const struct ltt_ust_session *usess, uint64_t cur_nr_packets);
#else /* HAVE_LIBLTTNG_UST_CTL */
static inline
-int ust_app_destroy_trace_all(struct ltt_ust_session *usess)
+int ust_app_destroy_trace_all(
+ struct ltt_ust_session *usess __attribute__((unused)))
{
return 0;
}
+
static inline
-int ust_app_start_trace(struct ltt_ust_session *usess, struct ust_app *app)
+int ust_app_start_trace(
+ struct ltt_ust_session *usess __attribute__((unused)),
+ struct ust_app *app __attribute__((unused)))
{
return 0;
}
+
static inline
-int ust_app_start_trace_all(struct ltt_ust_session *usess)
+int ust_app_start_trace_all(
+ struct ltt_ust_session *usess __attribute__((unused)))
{
return 0;
}
+
static inline
-int ust_app_stop_trace_all(struct ltt_ust_session *usess)
+int ust_app_stop_trace_all(
+ struct ltt_ust_session *usess __attribute__((unused)))
{
return 0;
}
+
static inline
-int ust_app_list_events(struct lttng_event **events)
+int ust_app_list_events(
+ struct lttng_event **events __attribute__((unused)))
{
return -ENOSYS;
}
+
static inline
-int ust_app_list_event_fields(struct lttng_event_field **fields)
+int ust_app_list_event_fields(
+ struct lttng_event_field **fields __attribute__((unused)))
{
return -ENOSYS;
}
+
static inline
-int ust_app_register(struct ust_register_msg *msg, int sock)
+int ust_app_register(
+ struct ust_register_msg *msg __attribute__((unused)),
+ int sock __attribute__((unused)))
{
return -ENOSYS;
}
+
static inline
-int ust_app_register_done(struct ust_app *app)
+int ust_app_register_done(struct ust_app *app __attribute__((unused)))
{
return -ENOSYS;
}
+
static inline
-int ust_app_version(struct ust_app *app)
+int ust_app_version(struct ust_app *app __attribute__((unused)))
{
return -ENOSYS;
}
+
static inline
-void ust_app_unregister(int sock)
+void ust_app_unregister(int sock __attribute__((unused)))
{
}
+
static inline
void ust_app_clean_list(void)
{
}
+
static inline
struct ust_app_list *ust_app_get_list(void)
{
return NULL;
}
+
static inline
-struct ust_app *ust_app_get_by_pid(pid_t pid)
+struct ust_app *ust_app_get_by_pid(pid_t pid __attribute__((unused)))
{
return NULL;
}
+
static inline
int ust_app_ht_alloc(void)
{
return 0;
}
+
static inline
-void ust_app_global_update(struct ltt_ust_session *usess, struct ust_app *app)
+void ust_app_global_update(
+ struct ltt_ust_session *usess __attribute__((unused)),
+ struct ust_app *app __attribute__((unused)))
{}
+
static inline
-void ust_app_global_update_event_notifier_rules(struct ust_app *app)
+void ust_app_global_update_event_notifier_rules(
+ struct ust_app *app __attribute__((unused)))
{}
+
static inline
void ust_app_global_update_all_event_notifier_rules(void)
{}
+
static inline
-int ust_app_setup_event_notifier_group(struct ust_app *app)
+int ust_app_setup_event_notifier_group(
+ struct ust_app *app __attribute__((unused)))
{
return 0;
}
+
static inline
-int ust_app_disable_channel_glb(struct ltt_ust_session *usess,
- struct ltt_ust_channel *uchan)
+int ust_app_disable_channel_glb(
+ struct ltt_ust_session *usess __attribute__((unused)),
+ struct ltt_ust_channel *uchan __attribute__((unused)))
{
return 0;
}
+
static inline
-int ust_app_enable_channel_glb(struct ltt_ust_session *usess,
- struct ltt_ust_channel *uchan)
+int ust_app_enable_channel_glb(
+ struct ltt_ust_session *usess __attribute__((unused)),
+ struct ltt_ust_channel *uchan __attribute__((unused)))
{
return 0;
}
+
static inline
-int ust_app_create_event_glb(struct ltt_ust_session *usess,
- struct ltt_ust_channel *uchan, struct ltt_ust_event *uevent)
+int ust_app_create_event_glb(
+ struct ltt_ust_session *usess __attribute__((unused)),
+ struct ltt_ust_channel *uchan __attribute__((unused)),
+ struct ltt_ust_event *uevent __attribute__((unused)))
{
return 0;
}
+
static inline
-int ust_app_disable_event_glb(struct ltt_ust_session *usess,
- struct ltt_ust_channel *uchan, struct ltt_ust_event *uevent)
+int ust_app_disable_event_glb(
+ struct ltt_ust_session *usess __attribute__((unused)),
+ struct ltt_ust_channel *uchan __attribute__((unused)),
+ struct ltt_ust_event *uevent __attribute__((unused)))
{
return 0;
}
+
static inline
-int ust_app_enable_event_glb(struct ltt_ust_session *usess,
- struct ltt_ust_channel *uchan, struct ltt_ust_event *uevent)
+int ust_app_enable_event_glb(
+ struct ltt_ust_session *usess __attribute__((unused)),
+ struct ltt_ust_channel *uchan __attribute__((unused)),
+ struct ltt_ust_event *uevent __attribute__((unused)))
{
return 0;
}
+
static inline
-int ust_app_add_ctx_channel_glb(struct ltt_ust_session *usess,
- struct ltt_ust_channel *uchan, struct ltt_ust_context *uctx)
+int ust_app_add_ctx_channel_glb(
+ struct ltt_ust_session *usess __attribute__((unused)),
+ struct ltt_ust_channel *uchan __attribute__((unused)),
+ struct ltt_ust_context *uctx __attribute__((unused)))
{
return 0;
}
+
static inline
-int ust_app_enable_event_pid(struct ltt_ust_session *usess,
- struct ltt_ust_channel *uchan, struct ltt_ust_event *uevent,
- pid_t pid)
+int ust_app_enable_event_pid(
+ struct ltt_ust_session *usess __attribute__((unused)),
+ struct ltt_ust_channel *uchan __attribute__((unused)),
+ struct ltt_ust_event *uevent __attribute__((unused)),
+ pid_t pid __attribute__((unused)))
{
return 0;
}
+
static inline
-int ust_app_recv_registration(int sock, struct ust_register_msg *msg)
+int ust_app_recv_registration(
+ int sock __attribute__((unused)),
+ struct ust_register_msg *msg __attribute__((unused)))
{
return 0;
}
+
static inline
-int ust_app_recv_notify(int sock)
+int ust_app_recv_notify(int sock __attribute__((unused)))
{
return 0;
}
+
static inline
-struct ust_app *ust_app_create(struct ust_register_msg *msg, int sock)
+struct ust_app *ust_app_create(
+ struct ust_register_msg *msg __attribute__((unused)),
+ int sock __attribute__((unused)))
{
return NULL;
}
+
static inline
-void ust_app_add(struct ust_app *app)
+void ust_app_add(struct ust_app *app __attribute__((unused)))
{
}
+
static inline
-void ust_app_notify_sock_unregister(int sock)
+void ust_app_notify_sock_unregister(int sock __attribute__((unused)))
{
}
+
static inline
-ssize_t ust_app_push_metadata(struct ust_registry_session *registry,
- struct consumer_socket *socket, int send_zero_data)
+ssize_t ust_app_push_metadata(
+ struct ust_registry_session *registry __attribute__((unused)),
+ struct consumer_socket *socket __attribute__((unused)),
+ int send_zero_data __attribute__((unused)))
{
return 0;
}
+
static inline
-void ust_app_destroy(struct ust_app *app)
+void ust_app_destroy(struct ust_app *app __attribute__((unused)))
{
return;
}
+
static inline
-enum lttng_error_code ust_app_snapshot_record(struct ltt_ust_session *usess,
- const struct consumer_output *output, int wait, uint64_t max_stream_size)
+enum lttng_error_code ust_app_snapshot_record(
+ struct ltt_ust_session *usess __attribute__((unused)),
+ const struct consumer_output *output __attribute__((unused)),
+ uint64_t max_stream_size __attribute__((unused)))
{
return LTTNG_ERR_UNK;
}
+
static inline
-unsigned int ust_app_get_nb_stream(struct ltt_ust_session *usess)
+unsigned int ust_app_get_nb_stream(
+ struct ltt_ust_session *usess __attribute__((unused)))
{
return 0;
}
+
static inline
void ust_app_update_event_notifier_error_count(
- struct lttng_trigger *lttng_trigger)
+ struct lttng_trigger *lttng_trigger __attribute__((unused)))
{
return;
}
+
static inline
int ust_app_supported(void)
{
return 0;
}
+
static inline
-bool ust_app_supports_notifiers(const struct ust_app *app)
+bool ust_app_supports_notifiers(
+ const struct ust_app *app __attribute__((unused)))
{
return false;
}
+
static inline
-bool ust_app_supports_counters(const struct ust_app *app)
+bool ust_app_supports_counters(
+ const struct ust_app *app __attribute__((unused)))
{
return false;
}
+
static inline
-struct ust_app *ust_app_find_by_sock(int sock)
+struct ust_app *ust_app_find_by_sock(int sock __attribute__((unused)))
{
return NULL;
}
+
static inline
-struct ust_app *ust_app_find_by_pid(pid_t pid)
+struct ust_app *ust_app_find_by_pid(pid_t pid __attribute__((unused)))
{
return NULL;
}
+
static inline
uint64_t ust_app_get_size_one_more_packet_per_stream(
- const struct ltt_ust_session *usess, uint64_t cur_nr_packets) {
+ const struct ltt_ust_session *usess __attribute__((unused)),
+ uint64_t cur_nr_packets __attribute__((unused))) {
return 0;
}
+
static inline
-int ust_app_uid_get_channel_runtime_stats(uint64_t ust_session_id,
- struct cds_list_head *buffer_reg_uid_list,
- struct consumer_output *consumer, int overwrite,
- uint64_t uchan_id, uint64_t *discarded, uint64_t *lost)
+int ust_app_uid_get_channel_runtime_stats(
+ uint64_t ust_session_id __attribute__((unused)),
+ struct cds_list_head *buffer_reg_uid_list __attribute__((unused)),
+ struct consumer_output *consumer __attribute__((unused)),
+ int overwrite __attribute__((unused)),
+ uint64_t uchan_id __attribute__((unused)),
+ uint64_t *discarded __attribute__((unused)),
+ uint64_t *lost __attribute__((unused)))
{
return 0;
}
static inline
-int ust_app_pid_get_channel_runtime_stats(struct ltt_ust_session *usess,
- struct ltt_ust_channel *uchan,
- struct consumer_output *consumer,
- int overwrite, uint64_t *discarded, uint64_t *lost)
+int ust_app_pid_get_channel_runtime_stats(
+ struct ltt_ust_session *usess __attribute__((unused)),
+ struct ltt_ust_channel *uchan __attribute__((unused)),
+ struct consumer_output *consumer __attribute__((unused)),
+ int overwrite __attribute__((unused)),
+ uint64_t *discarded __attribute__((unused)),
+ uint64_t *lost __attribute__((unused)))
{
return 0;
}
static inline
-int ust_app_regenerate_statedump_all(struct ltt_ust_session *usess)
+int ust_app_regenerate_statedump_all(
+ struct ltt_ust_session *usess __attribute__((unused)))
{
return 0;
}
static inline
-enum lttng_error_code ust_app_rotate_session(struct ltt_session *session)
+enum lttng_error_code ust_app_rotate_session(
+ struct ltt_session *session __attribute__((unused)))
{
return LTTNG_ERR_UNK;
}
static inline
enum lttng_error_code ust_app_create_channel_subdirectories(
- const struct ltt_ust_session *session)
+ const struct ltt_ust_session *session __attribute__((unused)))
{
return LTTNG_ERR_UNK;
}
static inline
-int ust_app_release_object(struct ust_app *app, struct lttng_ust_abi_object_data *data)
+int ust_app_release_object(struct ust_app *app __attribute__((unused)),
+ struct lttng_ust_abi_object_data *data __attribute__((unused)))
{
return 0;
}
static inline
-enum lttng_error_code ust_app_clear_session(struct ltt_session *session)
+enum lttng_error_code ust_app_clear_session(
+ struct ltt_session *session __attribute__((unused)))
{
return LTTNG_ERR_UNK;
}
static inline
-enum lttng_error_code ust_app_open_packets(struct ltt_session *session)
+enum lttng_error_code ust_app_open_packets(
+ struct ltt_session *session __attribute__((unused)))
{
return LTTNG_ERR_UNK;
}
int ust_consumer_metadata_request(struct consumer_socket *sock);
#else
static inline
-int ust_consumer_metadata_request(struct consumer_socket *sock)
+int ust_consumer_metadata_request(
+ struct consumer_socket *sock __attribute__((unused)))
{
return -ENOSYS;
}
#else /* HAVE_LIBLTTNG_UST_CTL */
static inline
-void ust_registry_channel_destroy(struct ust_registry_session *session,
- struct ust_registry_channel *chan)
+void ust_registry_channel_destroy(
+ struct ust_registry_session *session __attribute__((unused)),
+ struct ust_registry_channel *chan __attribute__((unused)))
{}
+
static inline
struct ust_registry_channel *ust_registry_channel_find(
- struct ust_registry_session *session, uint64_t key)
+ struct ust_registry_session *session __attribute__((unused)),
+ uint64_t key __attribute__((unused)))
{
return NULL;
}
+
static inline
-int ust_registry_channel_add(struct ust_registry_session *session,
- uint64_t key)
+int ust_registry_channel_add(
+ struct ust_registry_session *session __attribute__((unused)),
+ uint64_t key __attribute__((unused)))
{
return 0;
}
+
static inline
-void ust_registry_channel_del_free(struct ust_registry_session *session,
- uint64_t key, bool notif)
+void ust_registry_channel_del_free(
+ struct ust_registry_session *session __attribute__((unused)),
+ uint64_t key __attribute__((unused)),
+ bool notif __attribute__((unused)))
{}
+
static inline
-int ust_registry_session_init(struct ust_registry_session **sessionp,
- struct ust_app *app,
- uint32_t bits_per_long,
- uint32_t uint8_t_alignment,
- uint32_t uint16_t_alignment,
- uint32_t uint32_t_alignment,
- uint32_t uint64_t_alignment,
- uint32_t long_alignment,
- int byte_order,
- uint32_t major,
- uint32_t minor,
- const char *root_shm_path,
- const char *shm_path,
- uid_t euid,
- gid_t egid,
- uint64_t tracing_id,
- uid_t tracing_uid)
+int ust_registry_session_init(
+ struct ust_registry_session **sessionp __attribute__((unused)),
+ struct ust_app *app __attribute__((unused)),
+ uint32_t bits_per_long __attribute__((unused)),
+ uint32_t uint8_t_alignment __attribute__((unused)),
+ uint32_t uint16_t_alignment __attribute__((unused)),
+ uint32_t uint32_t_alignment __attribute__((unused)),
+ uint32_t uint64_t_alignment __attribute__((unused)),
+ uint32_t long_alignment __attribute__((unused)),
+ int byte_order __attribute__((unused)),
+ uint32_t major __attribute__((unused)),
+ uint32_t minor __attribute__((unused)),
+ const char *root_shm_path __attribute__((unused)),
+ const char *shm_path __attribute__((unused)),
+ uid_t euid __attribute__((unused)),
+ gid_t egid __attribute__((unused)),
+ uint64_t tracing_id __attribute__((unused)),
+ uid_t tracing_uid __attribute__((unused)))
{
return 0;
}
+
static inline
-void ust_registry_session_destroy(struct ust_registry_session *session)
+void ust_registry_session_destroy(
+ struct ust_registry_session *session __attribute__((unused)))
{}
+
static inline
-int ust_registry_create_event(struct ust_registry_session *session,
- uint64_t chan_key, int session_objd, int channel_objd, char *name,
- char *sig, size_t nr_fields, struct lttng_ust_ctl_field *fields,
- int loglevel_value, char *model_emf_uri, int buffer_type,
- uint32_t *event_id_p)
+int ust_registry_create_event(
+ struct ust_registry_session *session __attribute__((unused)),
+ uint64_t chan_key __attribute__((unused)),
+ int session_objd __attribute__((unused)),
+ int channel_objd __attribute__((unused)),
+ char *name __attribute__((unused)),
+ char *sig __attribute__((unused)),
+ size_t nr_fields __attribute__((unused)),
+ struct lttng_ust_ctl_field *fields __attribute__((unused)),
+ int loglevel_value __attribute__((unused)),
+ char *model_emf_uri __attribute__((unused)),
+ int buffer_type __attribute__((unused)),
+ uint32_t *event_id_p __attribute__((unused)))
{
return 0;
}
static inline
struct ust_registry_event *ust_registry_find_event(
- struct ust_registry_channel *chan, char *name, char *sig)
+ struct ust_registry_channel *chan __attribute__((unused)),
+ char *name __attribute__((unused)),
+ char *sig __attribute__((unused)))
{
return NULL;
}
+
static inline
-void ust_registry_destroy_event(struct ust_registry_channel *chan,
- struct ust_registry_event *event)
+void ust_registry_destroy_event(
+ struct ust_registry_channel *chan __attribute__((unused)),
+ struct ust_registry_event *event __attribute__((unused)))
{}
/* The app object can be NULL for registry shared across applications. */
static inline
-int ust_metadata_session_statedump(struct ust_registry_session *session,
- struct ust_app *app, uint32_t major, uint32_t minor)
+int ust_metadata_session_statedump(
+ struct ust_registry_session *session __attribute__((unused)),
+ struct ust_app *app __attribute__((unused)),
+ uint32_t major __attribute__((unused)),
+ uint32_t minor __attribute__((unused)))
{
return 0;
}
+
static inline
-int ust_metadata_channel_statedump(struct ust_registry_session *session,
- struct ust_registry_channel *chan)
+int ust_metadata_channel_statedump(
+ struct ust_registry_session *session __attribute__((unused)),
+ struct ust_registry_channel *chan __attribute__((unused)))
{
return 0;
}
+
static inline
-int ust_metadata_event_statedump(struct ust_registry_session *session,
- struct ust_registry_channel *chan,
- struct ust_registry_event *event)
+int ust_metadata_event_statedump(
+ struct ust_registry_session *session __attribute__((unused)),
+ struct ust_registry_channel *chan __attribute__((unused)),
+ struct ust_registry_event *event __attribute__((unused)))
{
return 0;
}
+
static inline
-int ust_registry_create_or_find_enum(struct ust_registry_session *session,
- int session_objd, char *name,
- struct lttng_ust_ctl_enum_entry *entries, size_t nr_entries,
- uint64_t *enum_id)
+int ust_registry_create_or_find_enum(
+ struct ust_registry_session *session __attribute__((unused)),
+ int session_objd __attribute__((unused)),
+ char *name __attribute__((unused)),
+ struct lttng_ust_ctl_enum_entry *entries __attribute__((unused)),
+ size_t nr_entries __attribute__((unused)),
+ uint64_t *enum_id __attribute__((unused)))
{
return 0;
}
+
static inline
struct ust_registry_enum *
- ust_registry_lookup_enum_by_id(struct ust_registry_session *session,
- const char *name, uint64_t id)
+ ust_registry_lookup_enum_by_id(
+ struct ust_registry_session *session __attribute__((unused)),
+ const char *name __attribute__((unused)),
+ uint64_t id __attribute__((unused)))
{
return NULL;
}
#else /* HAVE_LIBLTTNG_UST_CTL */
static inline
-void lttng_ust_handle_sigbus(void *address)
+void lttng_ust_handle_sigbus(void *address __attribute__((unused)))
{
}
}
static void print_action_errors(const struct lttng_trigger *trigger,
- const struct lttng_action *action,
const uint64_t *action_path_indexes,
size_t action_path_length)
{
}
MSG("");
- print_action_errors(trigger, action, action_path_indexes,
+ print_action_errors(trigger, action_path_indexes,
action_path_length);
end:
return i;
}
-static int metadata_regenerate(int argc, const char **argv)
+static int metadata_regenerate(int argc,
+ const char **argv __attribute__((unused)))
{
int ret;
return i;
}
-static int regenerate_metadata(int argc, const char **argv)
+static int regenerate_metadata(int argc,
+ const char **argv __attribute__((unused)))
{
int ret;
return ret;
}
-static int regenerate_statedump(int argc, const char **argv)
+static int regenerate_statedump(int argc,
+ const char **argv __attribute__((unused)))
{
int ret;
return ret;
}
-static int cmd_list_output(int argc, const char **argv)
+static int cmd_list_output(int argc __attribute__((unused)),
+ const char **argv __attribute__((unused)))
{
int ret;
}
if (lttng_opt_mi) {
- ret = mi_lttng_snapshot_record(writer, current_session_name, url,
- opt_ctrl_url, opt_data_url);
+ ret = mi_lttng_snapshot_record(writer, url, opt_ctrl_url,
+ opt_data_url);
if (ret) {
ret = CMD_ERROR;
}
static int cmd_track_untrack(enum cmd_type cmd_type,
int argc,
const char **argv,
- const char *help_msg)
+ const char *help_msg __attribute__((unused)))
{
int opt, ret = 0;
bool sub_command_failed = false;
# Disable some warning flags for generated sources.
FILTER_WARN_FLAGS = \
-Wno-null-dereference \
- -Wno-redundant-decls
+ -Wno-redundant-decls \
+ -Wno-unused-parameter
libfilter_la_CFLAGS = $(AM_CFLAGS) $(FILTER_WARN_FLAGS)
libfilter_la_CXXFLAGS = -include filter-symbols.h $(AM_CXXFLAGS) $(FILTER_WARN_FLAGS)
}
static ATTR_FORMAT_PRINTF(2, 3)
-void xml_error_handler(void *ctx, const char *format, ...)
+void xml_error_handler(void *ctx __attribute__((unused)), const char *format, ...)
{
char *errMsg;
va_list args;
}
static ssize_t consumer_stream_consume_mmap(
- struct lttng_consumer_local_data *ctx,
+ struct lttng_consumer_local_data *ctx __attribute__((unused)),
struct lttng_consumer_stream *stream,
const struct stream_subbuffer *subbuffer)
{
static int consumer_stream_send_index(
struct lttng_consumer_stream *stream,
const struct stream_subbuffer *subbuffer,
- struct lttng_consumer_local_data *ctx)
+ struct lttng_consumer_local_data *ctx __attribute__((unused)))
{
off_t packet_offset = 0;
struct ctf_packet_index index = {};
*/
static
int post_consume_open_new_packet(struct lttng_consumer_stream *stream,
- const struct stream_subbuffer *subbuffer,
- struct lttng_consumer_local_data *ctx)
+ const struct stream_subbuffer *subbuffer __attribute__((unused)),
+ struct lttng_consumer_local_data *ctx __attribute__((unused)))
{
int ret = 0;
}
static ssize_t metadata_bucket_consume(
- struct lttng_consumer_local_data *unused,
+ struct lttng_consumer_local_data *unused __attribute__((unused)),
struct lttng_consumer_stream *stream,
const struct stream_subbuffer *subbuffer)
{
*/
if (stream->rotate_ready) {
DBG("Rotate stream before consuming data");
- ret = lttng_consumer_rotate_stream(ctx, stream);
+ ret = lttng_consumer_rotate_stream(stream);
if (ret < 0) {
ERR("Stream rotation error before consuming data");
goto end;
*/
rotation_ret = lttng_consumer_stream_is_rotate_ready(stream);
if (rotation_ret == 1) {
- rotation_ret = lttng_consumer_rotate_stream(ctx, stream);
+ rotation_ret = lttng_consumer_rotate_stream(stream);
if (rotation_ret < 0) {
ret = rotation_ret;
ERR("Stream rotation error after consuming data");
* Returns 0 on success, < 0 on error
*/
int lttng_consumer_rotate_channel(struct lttng_consumer_channel *channel,
- uint64_t key, uint64_t relayd_id, uint32_t metadata,
- struct lttng_consumer_local_data *ctx)
+ uint64_t key, uint64_t relayd_id)
{
int ret;
struct lttng_consumer_stream *stream;
* Perform the rotation a local stream file.
*/
static
-int rotate_local_stream(struct lttng_consumer_local_data *ctx,
- struct lttng_consumer_stream *stream)
+int rotate_local_stream(struct lttng_consumer_stream *stream)
{
int ret = 0;
*
* Return 0 on success, a negative number of error.
*/
-int lttng_consumer_rotate_stream(struct lttng_consumer_local_data *ctx,
- struct lttng_consumer_stream *stream)
+int lttng_consumer_rotate_stream(struct lttng_consumer_stream *stream)
{
int ret;
}
if (stream->net_seq_idx == (uint64_t) -1ULL) {
- ret = rotate_local_stream(ctx, stream);
+ ret = rotate_local_stream(stream);
if (ret < 0) {
ERR("Failed to rotate stream, ret = %i", ret);
goto error;
* Returns 0 on success, < 0 on error
*/
int lttng_consumer_rotate_ready_streams(struct lttng_consumer_channel *channel,
- uint64_t key, struct lttng_consumer_local_data *ctx)
+ uint64_t key)
{
int ret;
struct lttng_consumer_stream *stream;
}
DBG("Consumer rotate ready stream %" PRIu64, stream->key);
- ret = lttng_consumer_rotate_stream(ctx, stream);
+ ret = lttng_consumer_rotate_stream(stream);
pthread_mutex_unlock(&stream->lock);
pthread_mutex_unlock(&stream->chan->lock);
if (ret) {
void consumer_del_stream_for_metadata(struct lttng_consumer_stream *stream);
int consumer_create_index_file(struct lttng_consumer_stream *stream);
int lttng_consumer_rotate_channel(struct lttng_consumer_channel *channel,
- uint64_t key, uint64_t relayd_id, uint32_t metadata,
- struct lttng_consumer_local_data *ctx);
+ uint64_t key, uint64_t relayd_id);
int lttng_consumer_stream_is_rotate_ready(struct lttng_consumer_stream *stream);
-int lttng_consumer_rotate_stream(struct lttng_consumer_local_data *ctx,
- struct lttng_consumer_stream *stream);
+int lttng_consumer_rotate_stream(struct lttng_consumer_stream *stream);
int lttng_consumer_rotate_ready_streams(struct lttng_consumer_channel *channel,
- uint64_t key, struct lttng_consumer_local_data *ctx);
+ uint64_t key);
void lttng_consumer_reset_stream_rotate_state(struct lttng_consumer_stream *stream);
enum lttcomm_return_code lttng_consumer_create_trace_chunk(
const uint64_t *relayd_id, uint64_t session_id,
static enum lttng_event_rule_generate_exclusions_status
lttng_event_rule_jul_logging_generate_exclusions(
- const struct lttng_event_rule *rule,
+ const struct lttng_event_rule *rule __attribute__((unused)),
struct lttng_event_exclusion **_exclusions)
{
/* Unsupported. */
return status;
}
-static bool log_level_rule_valid(const struct lttng_log_level_rule *rule)
+static bool log_level_rule_valid(
+ const struct lttng_log_level_rule *rule __attribute__((unused)))
{
/*
* For both JUL and LOG4J custom log level are possible and can
}
static enum lttng_error_code lttng_event_rule_kernel_kprobe_generate_filter_bytecode(
- struct lttng_event_rule *rule,
- const struct lttng_credentials *creds)
+ struct lttng_event_rule *rule __attribute__((unused)),
+ const struct lttng_credentials *creds __attribute__((unused)))
{
/* Nothing to do. */
return LTTNG_OK;
}
static const char *lttng_event_rule_kernel_kprobe_get_filter(
- const struct lttng_event_rule *rule)
+ const struct lttng_event_rule *rule __attribute__((unused)))
{
/* Not supported. */
return NULL;
}
static const struct lttng_bytecode *
-lttng_event_rule_kernel_kprobe_get_filter_bytecode(const struct lttng_event_rule *rule)
+lttng_event_rule_kernel_kprobe_get_filter_bytecode(
+ const struct lttng_event_rule *rule __attribute__((unused)))
{
/* Not supported. */
return NULL;
}
static enum lttng_event_rule_generate_exclusions_status
-lttng_event_rule_kernel_kprobe_generate_exclusions(const struct lttng_event_rule *rule,
+lttng_event_rule_kernel_kprobe_generate_exclusions(
+ const struct lttng_event_rule *rule __attribute__((unused)),
struct lttng_event_exclusion **exclusions)
{
/* Not supported. */
}
static enum lttng_event_rule_generate_exclusions_status
-lttng_event_rule_kernel_syscall_generate_exclusions(const struct lttng_event_rule *rule,
+lttng_event_rule_kernel_syscall_generate_exclusions(
+ const struct lttng_event_rule *rule __attribute__((unused)),
struct lttng_event_exclusion **exclusions)
{
/* Unsupported. */
static enum lttng_event_rule_generate_exclusions_status
lttng_event_rule_kernel_tracepoint_generate_exclusions(
- const struct lttng_event_rule *rule,
+ const struct lttng_event_rule *rule __attribute__((unused)),
struct lttng_event_exclusion **_exclusions)
{
/* Unsupported. */
}
static enum lttng_error_code lttng_event_rule_kernel_uprobe_generate_filter_bytecode(
- struct lttng_event_rule *rule,
- const struct lttng_credentials *creds)
+ struct lttng_event_rule *rule __attribute__((unused)),
+ const struct lttng_credentials *creds __attribute__((unused)))
{
/* Nothing to do. */
return LTTNG_OK;
}
static const char *lttng_event_rule_kernel_uprobe_get_filter(
- const struct lttng_event_rule *rule)
+ const struct lttng_event_rule *rule __attribute__((unused)))
{
/* Unsupported. */
return NULL;
}
static const struct lttng_bytecode *
-lttng_event_rule_kernel_uprobe_get_filter_bytecode(const struct lttng_event_rule *rule)
+lttng_event_rule_kernel_uprobe_get_filter_bytecode(
+ const struct lttng_event_rule *rule __attribute__((unused)))
{
/* Unsupported. */
return NULL;
}
static enum lttng_event_rule_generate_exclusions_status
-lttng_event_rule_kernel_uprobe_generate_exclusions(const struct lttng_event_rule *rule,
+lttng_event_rule_kernel_uprobe_generate_exclusions(
+ const struct lttng_event_rule *rule __attribute__((unused)),
struct lttng_event_exclusion **exclusions)
{
/* Unsupported. */
static enum lttng_event_rule_generate_exclusions_status
lttng_event_rule_log4j_logging_generate_exclusions(
- const struct lttng_event_rule *rule,
+ const struct lttng_event_rule *rule __attribute__((unused)),
struct lttng_event_exclusion **_exclusions)
{
/* Unsupported. */
return status;
}
-static bool log_level_rule_valid(const struct lttng_log_level_rule *rule)
+static bool log_level_rule_valid(
+ const struct lttng_log_level_rule *rule __attribute__((unused)))
{
/*
* For both LOG4J custom log level are possible and can
static enum lttng_event_rule_generate_exclusions_status
lttng_event_rule_python_logging_generate_exclusions(
- const struct lttng_event_rule *rule,
+ const struct lttng_event_rule *rule __attribute__((unused)),
struct lttng_event_exclusion **_exclusions)
{
/* Unsupported. */
return status;
}
-static bool log_level_rule_valid(const struct lttng_log_level_rule *rule)
+static bool log_level_rule_valid(
+ const struct lttng_log_level_rule *rule __attribute__((unused)))
{
/*
* For python, custom log level are possible, it is not clear if
return ret;
}
-static int close_epoll(void *data, int *in_fd)
+static int close_epoll(void *data, int *in_fd __attribute__((unused)))
{
/* Will close the epfd. */
lttng_poll_clean((struct lttng_poll_event *) data);
#include <unistd.h>
static
-int open_pipe_cloexec(void *data, int *fds)
+int open_pipe_cloexec(void *data __attribute__((unused)), int *fds)
{
return utils_create_pipe_cloexec(fds);
}
static
-int close_pipe(void *data, int *pipe)
+int close_pipe(void *data __attribute__((unused)), int *pipe)
{
utils_close_pipe(pipe);
pipe[0] = pipe[1] = -1;
return 0;
}
-int fd_tracker_util_close_fd(void *unused, int *fd)
+int fd_tracker_util_close_fd(void *unused __attribute__((unused)), int *fd)
{
return close(*fd);
}
#ifdef HAVE_DIRFD
static
-int fd_close(void *unused, int *in_fds)
+int fd_close(void *unused __attribute__((unused)), int *in_fds)
{
const int ret = close(in_fds[0]);
static int lttng_kconsumer_snapshot_channel(
struct lttng_consumer_channel *channel,
uint64_t key, char *path, uint64_t relayd_id,
- uint64_t nb_packets_per_stream,
- struct lttng_consumer_local_data *ctx)
+ uint64_t nb_packets_per_stream)
{
int ret;
struct lttng_consumer_stream *stream;
msg.u.snapshot_channel.pathname,
msg.u.snapshot_channel.relayd_id,
msg.u.snapshot_channel
- .nb_packets_per_stream,
- ctx);
+ .nb_packets_per_stream);
if (ret_snapshot < 0) {
ERR("Snapshot channel failed");
ret_code = LTTCOMM_CONSUMERD_SNAPSHOT_FAILED;
ret_rotate_channel = lttng_consumer_rotate_channel(
channel, key,
- msg.u.rotate_channel.relayd_id,
- msg.u.rotate_channel.metadata, ctx);
+ msg.u.rotate_channel.relayd_id);
if (ret_rotate_channel < 0) {
ERR("Rotate channel failed");
ret_code = LTTCOMM_CONSUMERD_ROTATION_FAIL;
int ret_rotate;
ret_rotate = lttng_consumer_rotate_ready_streams(
- channel, key, ctx);
+ channel, key);
if (ret_rotate < 0) {
ERR("Rotate ready streams failed");
}
static
int put_next_subbuffer(struct lttng_consumer_stream *stream,
- struct stream_subbuffer *subbuffer)
+ struct stream_subbuffer *subbuffer __attribute__((unused)))
{
const int ret = kernctl_put_next_subbuf(stream->wait_fd);
static
int signal_metadata(struct lttng_consumer_stream *stream,
- struct lttng_consumer_local_data *ctx)
+ struct lttng_consumer_local_data *ctx __attribute__((unused)))
{
ASSERT_LOCKED(stream->metadata_rdv_lock);
return pthread_cond_broadcast(&stream->metadata_rdv) ? -errno : 0;
return ret;
}
-int mi_lttng_snapshot_record(struct mi_writer *writer,
- const char *current_session_name, const char *url,
+int mi_lttng_snapshot_record(struct mi_writer *writer, const char *url,
const char *cmdline_ctrl_url, const char *cmdline_data_url)
{
int ret;
*
* writer An instance of a machine interface writer.
*
- * current_session_name: Snapshot record for session "current_session_name".
- *
* ctrl_url, data_url: Destination of the output receive from the command-line.
*
* Returns zero if the element's value could be written.
* Negative values indicate an error.
*/
-int mi_lttng_snapshot_record(struct mi_writer *writer,
- const char *current_session_name, const char *url,
+int mi_lttng_snapshot_record(struct mi_writer *writer, const char *url,
const char *cmdline_ctrl_url, const char *cmdline_data_url);
/*
static
int run_as_noworker(enum run_as_cmd cmd,
struct run_as_data *data, struct run_as_ret *ret_value,
- uid_t uid, gid_t gid)
+ uid_t uid __attribute__((unused)), gid_t gid __attribute__((unused)))
{
int ret, saved_errno;
mode_t old_mask;
}
static
-void fs_handle_untracked_put_fd(struct fs_handle *_handle)
+void fs_handle_untracked_put_fd(struct fs_handle *_handle __attribute__((unused)))
{
/* no-op. */
}
}
static
-int lttng_trace_chunk_no_operation(struct lttng_trace_chunk *trace_chunk)
+int lttng_trace_chunk_no_operation(struct lttng_trace_chunk *trace_chunk __attribute__((unused)))
{
return 0;
}
*/
rotate_channel = lttng_consumer_rotate_channel(
found_channel, key,
- msg.u.rotate_channel.relayd_id,
- msg.u.rotate_channel.metadata, ctx);
+ msg.u.rotate_channel.relayd_id);
if (rotate_channel < 0) {
ERR("Rotate channel failed");
ret_code = LTTCOMM_CONSUMERD_ROTATION_FAIL;
ret_rotate_read_streams =
lttng_consumer_rotate_ready_streams(
- found_channel, key,
- ctx);
+ found_channel, key);
if (ret_rotate_read_streams < 0) {
ERR("Rotate channel failed");
}
}
static int put_next_subbuffer(struct lttng_consumer_stream *stream,
- struct stream_subbuffer *subbuffer)
+ struct stream_subbuffer *subbuffer __attribute__((unused)))
{
const int ret = lttng_ust_ctl_put_next_subbuf(stream->ustream);
}
static int signal_metadata(struct lttng_consumer_stream *stream,
- struct lttng_consumer_local_data *ctx)
+ struct lttng_consumer_local_data *ctx __attribute__((unused)))
{
ASSERT_LOCKED(stream->metadata_rdv_lock);
return pthread_cond_broadcast(&stream->metadata_rdv) ? -errno : 0;
static inline
ssize_t lttng_ustconsumer_on_read_subbuffer_mmap(
- struct lttng_consumer_local_data *ctx,
- struct lttng_consumer_stream *stream, unsigned long len,
- unsigned long padding)
+ struct lttng_consumer_local_data *ctx __attribute__((unused)),
+ struct lttng_consumer_stream *stream __attribute__((unused)),
+ unsigned long len __attribute__((unused)),
+ unsigned long padding __attribute__((unused)))
{
return -ENOSYS;
}
static inline
ssize_t lttng_ustconsumer_on_read_subbuffer_splice(
- struct lttng_consumer_local_data *ctx,
- struct lttng_consumer_stream *uststream, unsigned long len,
- unsigned long padding)
+ struct lttng_consumer_local_data *ctx __attribute__((unused)),
+ struct lttng_consumer_stream *uststream __attribute__((unused)),
+ unsigned long len __attribute__((unused)),
+ unsigned long padding __attribute__((unused)))
{
return -ENOSYS;
}
static inline
-int lttng_ustconsumer_take_snapshot(struct lttng_consumer_stream *stream)
+int lttng_ustconsumer_take_snapshot(
+ struct lttng_consumer_stream *stream __attribute__((unused)))
{
return -ENOSYS;
}
static inline
int lttng_ustconsumer_sample_snapshot_positions(
- struct lttng_consumer_stream *stream)
+ struct lttng_consumer_stream *stream __attribute__((unused)))
{
return -ENOSYS;
}
static inline
int lttng_ustconsumer_get_produced_snapshot(
- struct lttng_consumer_stream *stream, unsigned long *pos)
+ struct lttng_consumer_stream *stream __attribute__((unused)),
+ unsigned long *pos __attribute__((unused)))
{
return -ENOSYS;
}
static inline
int lttng_ustconsumer_get_consumed_snapshot(
- struct lttng_consumer_stream *stream, unsigned long *pos)
+ struct lttng_consumer_stream *stream __attribute__((unused)),
+ unsigned long *pos __attribute__((unused)))
{
return -ENOSYS;
}
static inline
-int lttng_ustconsumer_recv_cmd(struct lttng_consumer_local_data *ctx,
- int sock, struct pollfd *consumer_sockpoll)
+int lttng_ustconsumer_recv_cmd(
+ struct lttng_consumer_local_data *ctx __attribute__((unused)),
+ int sock __attribute__((unused)),
+ struct pollfd *consumer_sockpoll __attribute__((unused)))
{
return -ENOSYS;
}
static inline
-int lttng_ustconsumer_allocate_channel(struct lttng_consumer_channel *chan)
+int lttng_ustconsumer_allocate_channel(
+ struct lttng_consumer_channel *chan __attribute__((unused)))
{
return -ENOSYS;
}
static inline
-void lttng_ustconsumer_del_channel(struct lttng_consumer_channel *chan)
+void lttng_ustconsumer_del_channel(
+ struct lttng_consumer_channel *chan __attribute__((unused)))
{
}
static inline
-void lttng_ustconsumer_free_channel(struct lttng_consumer_channel *chan)
+void lttng_ustconsumer_free_channel(
+ struct lttng_consumer_channel *chan __attribute__((unused)))
{
}
static inline
-int lttng_ustconsumer_add_stream(struct lttng_consumer_stream *stream)
+int lttng_ustconsumer_add_stream(
+ struct lttng_consumer_stream *stream __attribute__((unused)))
{
return -ENOSYS;
}
static inline
-void lttng_ustconsumer_del_stream(struct lttng_consumer_stream *stream)
+void lttng_ustconsumer_del_stream(
+ struct lttng_consumer_stream *stream __attribute__((unused)))
{
}
static inline
-int lttng_ustconsumer_read_subbuffer(struct lttng_consumer_stream *stream,
- struct lttng_consumer_local_data *ctx)
+int lttng_ustconsumer_read_subbuffer(
+ struct lttng_consumer_stream *stream __attribute__((unused)),
+ struct lttng_consumer_local_data *ctx __attribute__((unused)))
{
return -ENOSYS;
}
static inline
-int lttng_ustconsumer_on_recv_stream(struct lttng_consumer_stream *stream)
+int lttng_ustconsumer_on_recv_stream(
+ struct lttng_consumer_stream *stream __attribute__((unused)))
{
return -ENOSYS;
}
static inline
-void lttng_ustconsumer_on_stream_hangup(struct lttng_consumer_stream *stream)
+void lttng_ustconsumer_on_stream_hangup(
+ struct lttng_consumer_stream *stream __attribute__((unused)))
{
}
static inline
-int lttng_ustconsumer_data_pending(struct lttng_consumer_stream *stream)
+int lttng_ustconsumer_data_pending(
+ struct lttng_consumer_stream *stream __attribute__((unused)))
{
return -ENOSYS;
}
+
static inline
-int lttng_ust_flush_buffer(struct lttng_consumer_stream *stream,
- int producer_active)
+int lttng_ust_flush_buffer(struct lttng_consumer_stream *stream __attribute__((unused)),
+ int producer_active __attribute__((unused)))
{
return -ENOSYS;
}
+
static inline
-void lttng_ustconsumer_close_all_metadata(struct lttng_ht *ht)
+void lttng_ustconsumer_close_all_metadata(
+ struct lttng_ht *ht __attribute__((unused)))
{
}
+
static inline
-void lttng_ustconsumer_close_metadata(struct lttng_consumer_channel *metadata)
+void lttng_ustconsumer_close_metadata(
+ struct lttng_consumer_channel *metadata __attribute__((unused)))
{
}
static inline
-void lttng_ustconsumer_close_stream_wakeup(struct lttng_consumer_stream *stream)
+void lttng_ustconsumer_close_stream_wakeup(
+ struct lttng_consumer_stream *stream __attribute__((unused)))
{
}
+
static inline
-int lttng_ustconsumer_recv_metadata(int sock, uint64_t key, uint64_t offset,
- uint64_t len, uint64_t version,
- struct lttng_consumer_channel *channel, int timer)
+int lttng_ustconsumer_recv_metadata(int sock __attribute__((unused)),
+ uint64_t key __attribute__((unused)),
+ uint64_t offset __attribute__((unused)),
+ uint64_t len __attribute__((unused)),
+ uint64_t version __attribute__((unused)),
+ struct lttng_consumer_channel *channel __attribute__((unused)),
+ int timer __attribute__((unused)))
{
return -ENOSYS;
}
+
static inline
-int lttng_ustconsumer_request_metadata(struct lttng_consumer_local_data *ctx,
- struct lttng_consumer_channel *channel, int timer, int wait)
+int lttng_ustconsumer_request_metadata(
+ struct lttng_consumer_local_data *ctx __attribute__((unused)),
+ struct lttng_consumer_channel *channel __attribute__((unused)),
+ int timer __attribute__((unused)),
+ int wait __attribute__((unused)))
{
return -ENOSYS;
}
+
static inline
-enum sync_metadata_status lttng_ustconsumer_sync_metadata(struct lttng_consumer_local_data *ctx,
- struct lttng_consumer_stream *metadata)
+enum sync_metadata_status lttng_ustconsumer_sync_metadata(
+ struct lttng_consumer_local_data *ctx __attribute__((unused)),
+ struct lttng_consumer_stream *metadata __attribute__((unused)))
{
return SYNC_METADATA_STATUS_ERROR;
}
+
static inline
-int lttng_ustconsumer_flush_buffer(struct lttng_consumer_stream *stream,
- int producer)
+int lttng_ustconsumer_flush_buffer(
+ struct lttng_consumer_stream *stream __attribute__((unused)),
+ int producer __attribute__((unused)))
{
return -ENOSYS;
}
+
static inline
-int lttng_ustconsumer_clear_buffer(struct lttng_consumer_stream *stream)
+int lttng_ustconsumer_clear_buffer(
+ struct lttng_consumer_stream *stream __attribute__((unused)))
{
return -ENOSYS;
}
+
static inline
int lttng_ustconsumer_get_current_timestamp(
- struct lttng_consumer_stream *stream, uint64_t *ts)
+ struct lttng_consumer_stream *stream __attribute__((unused)),
+ uint64_t *ts __attribute__((unused)))
{
return -ENOSYS;
}
+
static inline
int lttng_ustconsumer_get_sequence_number(
- struct lttng_consumer_stream *stream, uint64_t *seq)
+ struct lttng_consumer_stream *stream __attribute__((unused)),
+ uint64_t *seq __attribute__((unused)))
{
return -ENOSYS;
}
+
static inline
-int lttng_ustconsumer_get_stream_id(struct lttng_consumer_stream *stream,
- uint64_t *stream_id)
+int lttng_ustconsumer_get_stream_id(
+ struct lttng_consumer_stream *stream __attribute__((unused)),
+ uint64_t *stream_id __attribute__((unused)))
{
return -ENOSYS;
}
+
static inline
-void lttng_ustconsumer_sigbus_handle(void *addr)
+void lttng_ustconsumer_sigbus_handle(
+ void *addr __attribute__((unused)))
{
}
#endif /* HAVE_LIBLTTNG_UST_CTL */
*/
static inline
int lttng_ctl_ask_sessiond_fds_no_cmd_header(struct lttcomm_session_msg *lsm,
- const int *fds, size_t nb_fd, void **buf)
+ const int *fds, size_t nb_fd, void **buf __attribute__((unused)))
{
return lttng_ctl_ask_sessiond_fds_varlen(lsm, fds, nb_fd, NULL,
0, NULL, NULL, NULL);
* Returns the size of the returned payload data or a negative error code.
*/
int lttng_add_context(struct lttng_handle *handle,
- struct lttng_event_context *ctx, const char *event_name,
+ struct lttng_event_context *ctx,
+ const char *event_name __attribute__((unused)),
const char *channel_name)
{
int ret;
return ret;
}
-int lttng_calibrate(struct lttng_handle *handle,
- struct lttng_calibrate *calibrate)
+int lttng_calibrate(struct lttng_handle *handle __attribute__((unused)),
+ struct lttng_calibrate *calibrate __attribute__((unused)))
{
/*
* This command was removed in LTTng 2.9.
*/
extern "C"
LTTNG_EXPORT int lttng_enable_consumer(struct lttng_handle *handle);
-int lttng_enable_consumer(struct lttng_handle *handle)
+int lttng_enable_consumer(struct lttng_handle *handle __attribute__((unused)))
{
return -ENOSYS;
}
*/
extern "C"
LTTNG_EXPORT int lttng_disable_consumer(struct lttng_handle *handle);
-int lttng_disable_consumer(struct lttng_handle *handle)
+int lttng_disable_consumer(struct lttng_handle *handle __attribute__((unused)))
{
return -ENOSYS;
}
extern "C"
LTTNG_EXPORT int _lttng_create_session_ext(const char *name, const char *url,
const char *datetime);
-int _lttng_create_session_ext(const char *name, const char *url,
- const char *datetime)
+int _lttng_create_session_ext(const char *name __attribute__((unused)),
+ const char *url __attribute__((unused)),
+ const char *datetime __attribute__((unused)))
{
return -ENOSYS;
}
* Return 0 on success else a negative LTTng error code.
*/
int lttng_rotate_session(const char *session_name,
- struct lttng_rotation_immediate_descriptor *descriptor,
+ struct lttng_rotation_immediate_descriptor *descriptor __attribute__((unused)),
struct lttng_rotation_handle **rotation_handle)
{
struct lttcomm_session_msg lsm;
* Return 0 on success or else a negative LTTNG_ERR value.
*/
int lttng_snapshot_record(const char *session_name,
- struct lttng_snapshot_output *output, int wait)
+ struct lttng_snapshot_output *output,
+ int wait __attribute__((unused)))
{
int ret;
struct lttcomm_session_msg lsm;
}
static
-void test_ppoll_big(FILE *validation_output_file)
+void test_ppoll_big(FILE *validation_output_file __attribute__((unused)))
{
struct pollfd ufds[MAX_FDS];
char buf[BUF_SIZE];
* The event should contain an array of 100 FDs filled with garbage.
*/
static
-void ppoll_fds_buffer_overflow(FILE *validation_output_file)
+void ppoll_fds_buffer_overflow(
+ FILE *validation_output_file __attribute__((unused)))
{
struct pollfd ufds[NB_FD];
char buf[BUF_SIZE];
* The event should contain an empty array of FDs and overflow = 1.
*/
static
-void ppoll_fds_ulong_max(FILE *validation_output_file)
+void ppoll_fds_ulong_max(FILE *validation_output_file __attribute__((unused)))
{
struct pollfd ufds[NB_FD];
char buf[BUF_SIZE];
* -EBADF. The recorded event should contain a "ret = -EBADF (-9)".
*/
static
-void pselect_invalid_fd(FILE *validation_output_file)
+void pselect_invalid_fd(FILE *validation_output_file __attribute__((unused)))
{
fd_set rfds;
int ret;
* with 0 FDs.
*/
static
-void pselect_invalid_pointer(FILE *validation_output_file)
+void pselect_invalid_pointer(
+ FILE *validation_output_file __attribute__((unused)))
{
fd_set rfds;
int ret;
* ppoll should work as expected and the trace should be readable at the end.
*/
static
-void ppoll_concurrent_write(FILE *validation_output_file)
+void ppoll_concurrent_write(
+ FILE *validation_output_file __attribute__((unused)))
{
int i, ret, fds[MAX_FDS];
return ret;
}
-int main(int argc, char **argv)
+int main(void)
{
int ret;
uint64_t session_id;
int lttng_opt_mi;
int lttng_opt_quiet;
-int main(int argc, const char **argv)
+int main(void)
{
int ret;
/*
static
void test_triggers_buffer_usage_condition(const char *session_name,
const char *channel_name,
- enum lttng_domain_type domain_type,
enum lttng_condition_type condition_type)
{
unsigned int test_vector_size = 5, i;
return;
}
-static void test_kprobe_event_rule_notification(
- enum lttng_domain_type domain_type)
+static void test_kprobe_event_rule_notification(void)
{
int i, ret;
enum lttng_error_code ret_code;
}
static void test_uprobe_event_rule_notification(
- enum lttng_domain_type domain_type,
const char *testapp_path,
const char *test_symbol_name)
{
return;
}
-static void test_syscall_event_rule_notification(
- enum lttng_domain_type domain_type)
+static void test_syscall_event_rule_notification(void)
{
int i, ret;
enum lttng_error_code ret_code;
return;
}
-static void test_syscall_event_rule_notification_filter(
- enum lttng_domain_type domain_type)
+static void test_syscall_event_rule_notification_filter(void)
{
int i, ret;
enum lttng_error_code ret_code;
diag("Test trigger for domain %s with buffer_usage_low condition",
domain_type_string);
test_triggers_buffer_usage_condition(session_name, channel_name,
- domain_type,
LTTNG_CONDITION_TYPE_BUFFER_USAGE_LOW);
diag("Test trigger for domain %s with buffer_usage_high condition",
domain_type_string);
test_triggers_buffer_usage_condition(session_name, channel_name,
- domain_type,
LTTNG_CONDITION_TYPE_BUFFER_USAGE_HIGH);
diag("Test buffer usage notification channel api for domain %s",
diag("Test kprobe event rule notifications for domain %s",
domain_type_string);
- test_kprobe_event_rule_notification(domain_type);
+ test_kprobe_event_rule_notification();
break;
}
diag("Test syscall event rule notifications for domain %s",
domain_type_string);
- test_syscall_event_rule_notification(domain_type);
+ test_syscall_event_rule_notification();
diag("Test syscall filtering event rule notifications for domain %s",
domain_type_string);
- test_syscall_event_rule_notification_filter(domain_type);
+ test_syscall_event_rule_notification_filter();
break;
}
domain_type_string);
test_uprobe_event_rule_notification(
- domain_type, testapp_path, test_symbol_name);
+ testapp_path, test_symbol_name);
break;
}
double_register_automatic_name_trigger,
};
-int main(int argc, const char **argv)
+int main(void)
{
size_t i;
#define TRACEPOINT_DEFINE
#include "tp.h"
-int main(int argc, char **argv)
+int main(void)
{
sleep(1);
return 0;
#define TRACEPOINT_CREATE_PROBES
#include "ust_tests_daemon.h"
-int main(int argc, char **argv, char *env[])
+int main(void)
{
int result;
- if (argc < 1) {
- fprintf(stderr, "usage: daemon\n");
- exit(1);
- }
-
pid_t parent_pid = getpid();
printf("parent_pid %d\n", parent_pid);
tracepoint(ust_tests_daemon, before_daemon, parent_pid);
#define TRACEPOINT_CREATE_PROBES
#include "ust_tests_fork.h"
-int main(int argc, char **argv)
+int main(void)
{
printf("IN FORK2\n");
#include "tp.h"
static
-void inthandler(int sig)
+void inthandler(int sig __attribute__((unused)))
{
}
#define N_ITER 1000
-int main(int argc, char **argv)
+int main(void)
{
int i;
const char teststr[] = "Hello World! 1234567890abc";
/*
* Thread recording a tracepoint every minute for 20 minutes.
*/
-static void *th_event_minute(void *data)
+static void *th_event_minute(void *data __attribute__((unused)))
{
int i;
/*
* main
*/
-int main(int argc, char **argv)
+int main(void)
{
int ret;
void *status;
TRACEPOINT_EVENT(multi, tp,
TP_ARGS(uint64_t, arg),
TP_FIELDS(
+ ctf_unused(arg)
ctf_enum(multi, enum_a, int16_t, enum_short_C, 0)
ctf_enum(multi, enum_a, int32_t, enum_int_C, 1)
ctf_enum(multi, enum_a, uint64_t, enum_long_C, 2)
TRACEPOINT_EVENT(multi, tp,
TP_ARGS(uint64_t, arg),
TP_FIELDS(
- ctf_enum(multi, enum_a, int32_t, enum_int_D, 1)
+ ctf_unused(arg)
+ ctf_enum(multi, enum_a, int32_t, enum_int_D, 1)
ctf_enum(multi, enum_a, int16_t, enum_short_D, 0)
ctf_enum(multi, enum_a, uint64_t, enum_long_D, 2)
)
TRACEPOINT_EVENT(multi, tp,
TP_ARGS(uint64_t, arg),
TP_FIELDS(
+ ctf_unused(arg)
ctf_enum(multi, enum_a, int32_t, enum_int, 1)
)
)
TRACEPOINT_EVENT(multi, tp,
TP_ARGS(uint64_t, arg),
TP_FIELDS(
- ctf_enum(multi, enum_a, int64_t, enum_int, 1)
+ ctf_unused(arg)
+ ctf_enum(multi, enum_a, int64_t, enum_int, 1)
)
)
#elif defined(ACTIVATE_PROBES_N)
TRACEPOINT_EVENT(multi, tp,
TP_ARGS(uint64_t, arg),
TP_FIELDS(
+ ctf_unused(arg)
ctf_enum(multi, enum_a, int16_t, enum_int, 1)
)
)
TRACEPOINT_EVENT(multi, tp,
TP_ARGS(uint64_t, arg),
TP_FIELDS(
+ ctf_unused(arg)
ctf_string(arg_string, "string")
)
)
TRACEPOINT_EVENT(multi, tp,
TP_ARGS(uint64_t, arg),
TP_FIELDS(
+ ctf_unused(arg)
ctf_string(my_arg_string, "string")
)
)
TRACEPOINT_EVENT(multi, tp,
TP_ARGS(uint64_t, arg),
TP_FIELDS(
+ ctf_unused(arg)
)
)
#endif
#define TRACEPOINT_CREATE_PROBES
#include "ust_tests_td.h"
-int main(int argc, char *argv[])
+int main(void)
{
int i;
* This test is therefore a mix of dlopen/dlclose and dlmopen/dlclose of
* libfoo, and of its direct dependencies.
*/
-int main(int argc, char **argv)
+int main(void)
{
void *h0, *h2, *h3, *h4;
lttng_payload_reset(&payload);
}
-int main(int argc, const char *argv[])
+int main(void)
{
plan_tests(NUM_TESTS);
test_action_notify();
lttng_log_level_rule_destroy(log_level_rule_at_least_as_severe);
}
-int main(int argc, const char *argv[])
+int main(void)
{
plan_tests(NUM_TESTS);
test_condition_event_rule();
return ret == 0 ? tests_ran : ret;
}
-int main(int argc, char **argv)
+int main(void)
{
int ret;
char test_dir[] = "/tmp/lttng-XXXXXX";
NULL, 0);
}
-int main(int argc, const char *argv[])
+int main(void)
{
plan_tests(NUM_TESTS);
test_event_rule_kernel_tracepoint();
}
static
-int noop_close(void *data, int *fds)
+int noop_close(void *data __attribute__((unused)),
+ int *fds __attribute__((unused)))
{
return 0;
}
}
static
-int error_open(void *data, int *fds)
+int error_open(void *data, int *fds __attribute__((unused)))
{
return *((int *) data);
}
static
-int error_close(void *data, int *fds)
+int error_close(void *data, int *fds __attribute__((unused)))
{
return *((int *) data);
}
}
static
-int open_pipes(void *data, int *out_fds)
+int open_pipes(void *data __attribute__((unused)), int *out_fds)
{
unsigned int i;
const unsigned int pipe_count = TRACKER_FD_LIMIT / 2;
}
static
-int close_pipes(void *data, int *fds)
+int close_pipes(void *data __attribute__((unused)), int *fds)
{
int i;
int *pipes = fds;
}
static
-int cleanup_files(struct fd_tracker *tracker, const char *dir,
+int cleanup_files(struct fd_tracker *tracker __attribute__((unused)),
+ const char *dir __attribute__((unused)),
unsigned int count, struct fs_handle **handles,
char **file_paths)
{
lttng_directory_handle_put(dir_handle);
}
-int main(int argc, char **argv)
+int main(void)
{
plan_tests(NUM_TESTS);
diag("File descriptor tracker unit tests");
trace_kernel_destroy_stream(stream);
}
-int main(int argc, char **argv)
+int main(void)
{
plan_tests(NUM_TESTS);
lttng_kernel_probe_location_destroy(location_from_buffer);
}
-int main(int argc, const char *argv[])
+int main(void)
{
plan_tests(NUM_TESTS);
test_kernel_probe_location_address();
lttng_log_level_rule_destroy(at_least_as_severe_as);
}
-int main(int argc, const char *argv[])
+int main(void)
{
plan_tests(NUM_TESTS);
test_log_level_rule_exactly();
}
-int main(int argc, const char *argv[])
+int main(void)
{
plan_tests(NUM_TESTS);
test_condition_buffer_usage_low();
lttng_payload_reset(&payload);
}
-int main(int argc, const char *argv[])
+int main(void)
{
plan_tests(NUM_TESTS);
test_rate_policy_every_n();
return result;
}
-int main(int argc, char **argv)
+int main(void)
{
int i;
int num_test = sizeof(tests) / sizeof(struct test);
MAX_SESSIONS);
}
-int main(int argc, char **argv)
+int main(void)
{
plan_tests(NUM_TESTS);
test_one_normalize_star_glob_pattern("**\\***", "*\\**");
}
-int main(int argc, char **argv)
+int main(void)
{
plan_tests(NUM_TESTS);
diag("String utils unit tests");
uri_free(uri2);
}
-int main(int argc, char **argv)
+int main(void)
{
plan_tests(NUM_TESTS);
free(uctx);
}
-int main(int argc, char **argv)
+int main(void)
{
plan_tests(NUM_TESTS);
#define TEST_NAME_PROPER_LEN 16
-int main(int argc, char **argv)
+int main(void)
{
int ret;
char name1[TEST_NAME_PROPER_LEN];
}
}
-int main(int argc, char **argv)
+int main(void)
{
if (prepare_symlink_tree() != 0) {
goto error_mkdir;
}
}
-int main(int argc, char **argv)
+int main(void)
{
plan_tests(num_valid_tests + num_invalid_tests);
}
}
-int main(int argc, char **argv)
+int main(void)
{
plan_tests(num_valid_tests + num_invalid_tests);
run_test_lttng_uuid_generate();
}
-int main(int argc, char **argv)
+int main(void)
{
/* Run tap-formated tests */
run_test();
not_a_function += 1;
}
-int main(int argc, char *argv[])
+int main(void)
{
test_function();
dynamic_symbol(42);
not_a_function += 1;
}
-int main(int argc, char *argv[])
+int main(void)
{
test_class my_test_class;
/* Call test function. */
#include <libxml/parser.h>
-int main(int argc, char **argv)
+int main(void)
{
xmlDocPtr doc = NULL;
};
static ATTR_FORMAT_PRINTF(2, 3)
-void xml_error_handler(void *ctx, const char *format, ...)
+void xml_error_handler(void *ctx __attribute__((unused)),
+ const char *format, ...)
{
char *err_msg;
va_list args;
}
-int main(int argc, char **argv, char *env[])
+int main(int argc, char **argv)
{
int ret;
struct validation_ctx ctx = { 0 };