Prepare for '-Wunused-parameter'
authorMichael Jeanson <mjeanson@efficios.com>
Tue, 8 Mar 2022 15:52:55 +0000 (10:52 -0500)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Tue, 15 Mar 2022 21:00:27 +0000 (17:00 -0400)
In preparation for '-Wextra'

Change-Id: I30e6abb9502fc97daa565fde450d1e4235cf1ec7
Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
101 files changed:
doc/examples/rotation/rotate-client-example.c
doc/examples/trigger-condition-event-matches/instrumented-app.c
extras/core-handler/crash.c
src/bin/lttng-consumerd/health-consumerd.cpp
src/bin/lttng-consumerd/lttng-consumerd.cpp
src/bin/lttng-relayd/cmd-2-11.cpp
src/bin/lttng-relayd/health-relayd.cpp
src/bin/lttng-relayd/live.cpp
src/bin/lttng-relayd/main.cpp
src/bin/lttng-sessiond/action-executor.cpp
src/bin/lttng-sessiond/client.cpp
src/bin/lttng-sessiond/cmd.cpp
src/bin/lttng-sessiond/consumer.cpp
src/bin/lttng-sessiond/consumer.h
src/bin/lttng-sessiond/event-notifier-error-accounting.cpp
src/bin/lttng-sessiond/event-notifier-error-accounting.h
src/bin/lttng-sessiond/fd-limit.cpp
src/bin/lttng-sessiond/kernel-consumer.cpp
src/bin/lttng-sessiond/kernel.cpp
src/bin/lttng-sessiond/kernel.h
src/bin/lttng-sessiond/main.cpp
src/bin/lttng-sessiond/modprobe.cpp
src/bin/lttng-sessiond/notification-thread-events.cpp
src/bin/lttng-sessiond/notify-apps.h
src/bin/lttng-sessiond/rotation-thread.cpp
src/bin/lttng-sessiond/timer.cpp
src/bin/lttng-sessiond/trace-ust.h
src/bin/lttng-sessiond/trigger-error-query.cpp
src/bin/lttng-sessiond/ust-app.cpp
src/bin/lttng-sessiond/ust-app.h
src/bin/lttng-sessiond/ust-consumer.h
src/bin/lttng-sessiond/ust-registry.h
src/bin/lttng-sessiond/ust-sigbus.h
src/bin/lttng/commands/list_triggers.cpp
src/bin/lttng/commands/metadata.cpp
src/bin/lttng/commands/regenerate.cpp
src/bin/lttng/commands/snapshot.cpp
src/bin/lttng/commands/track-untrack.cpp
src/common/Makefile.am
src/common/config/session-config.cpp
src/common/consumer/consumer-stream.cpp
src/common/consumer/consumer.cpp
src/common/consumer/consumer.h
src/common/event-rule/jul-logging.cpp
src/common/event-rule/kernel-kprobe.cpp
src/common/event-rule/kernel-syscall.cpp
src/common/event-rule/kernel-tracepoint.cpp
src/common/event-rule/kernel-uprobe.cpp
src/common/event-rule/log4j-logging.cpp
src/common/event-rule/python-logging.cpp
src/common/fd-tracker/utils-poll.cpp
src/common/fd-tracker/utils.cpp
src/common/kernel-consumer/kernel-consumer.cpp
src/common/mi-lttng.cpp
src/common/mi-lttng.h
src/common/runas.cpp
src/common/trace-chunk.cpp
src/common/ust-consumer/ust-consumer.cpp
src/common/ust-consumer/ust-consumer.h
src/lib/lttng-ctl/lttng-ctl-helper.h
src/lib/lttng-ctl/lttng-ctl.cpp
src/lib/lttng-ctl/rotate.cpp
src/lib/lttng-ctl/snapshot.cpp
tests/regression/kernel/select_poll_epoll.cpp
tests/regression/tools/live/live_test.cpp
tests/regression/tools/notification/default_pipe_size_getter.cpp
tests/regression/tools/notification/notification.cpp
tests/regression/tools/trigger/name/trigger_name.cpp
tests/regression/ust/baddr-statedump/prog.c
tests/regression/ust/daemon/daemon.c
tests/regression/ust/fork/fork2.c
tests/regression/ust/high-throughput/main.c
tests/regression/ust/libc-wrapper/prog.c
tests/regression/ust/low-throughput/main.c
tests/regression/ust/multi-lib/probes.h
tests/regression/ust/type-declarations/type-declarations.c
tests/regression/ust/ust-dl/prog.c
tests/unit/test_action.cpp
tests/unit/test_condition.cpp
tests/unit/test_directory_handle.cpp
tests/unit/test_event_rule.cpp
tests/unit/test_fd_tracker.cpp
tests/unit/test_kernel_data.cpp
tests/unit/test_kernel_probe.cpp
tests/unit/test_log_level_rule.cpp
tests/unit/test_notification.cpp
tests/unit/test_rate_policy.cpp
tests/unit/test_relayd_backward_compat_group_by_session.cpp
tests/unit/test_session.cpp
tests/unit/test_string_utils.cpp
tests/unit/test_uri.cpp
tests/unit/test_ust_data.cpp
tests/unit/test_utils_compat_pthread.cpp
tests/unit/test_utils_expand_path.cpp
tests/unit/test_utils_parse_size_suffix.cpp
tests/unit/test_utils_parse_time_suffix.cpp
tests/unit/test_uuid.cpp
tests/utils/testapp/userspace-probe-elf-binary/userspace-probe-elf-binary.c
tests/utils/testapp/userspace-probe-elf-cxx-binary/userspace-probe-elf-cxx-binary.cpp
tests/utils/xml-utils/pretty_xml.c
tests/utils/xml-utils/validate_xml.cpp

index 5cb0887bffa88503ca0000a62d6f9d1368fc435a..a5ee70da326c2181d8133af103e7d83eb57ecc6d 100644 (file)
@@ -42,7 +42,7 @@
 
 static volatile int quit = 0;
 
-static void sighandler(int signal)
+static void sighandler(int signal __attribute__((unused)))
 {
        printf("Signal caught, exiting\n");
        quit = 1;
index dce6e577fef9b208c17b29cddfcf482f42f41320..465b4a123c6646f497614fa16dfe4c17a06315d2 100644 (file)
@@ -13,7 +13,7 @@
 #include <time.h>
 #include <unistd.h>
 
-int main(int argc, char **argv)
+int main(void)
 {
        uint64_t i;
 
index 060cd651cc86cf8d1b3efa33a4076397b6c20a01..bc7296814f4011e37365a5125da1fe73f5bed3a1 100644 (file)
@@ -8,7 +8,7 @@
 
 #include <signal.h>
 
-int main(int argc, char *argv[])
+int main(void)
 {
        raise(SIGSEGV);
        return 0;
index fe2f6d22c5d43192440120f04368bac06ef079bb..e3adbe1422fc92aabe5d68e6d330b2e17bd90006 100644 (file)
@@ -144,7 +144,7 @@ end:
 /*
  * 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;
index 73238b4fb7171e36303a56cb36628a471c545a67..3ee13dcb52bd9396cf2b378104d270873290183f 100644 (file)
@@ -82,7 +82,8 @@ enum lttng_consumer_type lttng_consumer_get_type(void)
 /*
  * 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");
index cef90fdc46166bc5ea5a13bc1d49d7a980034a90..572b1836c9a2fd1c44a8887aaead21ca3cb7a179 100644 (file)
@@ -21,7 +21,8 @@
 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)
index b832ffe0e5e81c8c09e794f53f015dd8342228b3..d43c371856b9fdc45e3dd9ccb9287eef4b614f57 100644 (file)
@@ -259,7 +259,7 @@ end:
 /*
  * 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;
index e0d446b2a1a4ee25cdc25539c870a87f52a1ef91..3efa1beda7d27a0fac613debbbc789c95d80860c 100644 (file)
@@ -655,7 +655,7 @@ end:
 }
 
 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;
 
@@ -766,7 +766,7 @@ error:
  * 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;
@@ -931,7 +931,7 @@ error_sock_control:
  * 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;
@@ -2662,7 +2662,7 @@ void cleanup_connection_pollfd(struct lttng_poll_event *events, int pollfd)
  * 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;
index 2b10618767926f745edfba8593c7496265593ba3..99f7920103df184faf75075d7db9ce47979f6422 100644 (file)
@@ -405,7 +405,8 @@ end:
  * 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;
 
@@ -676,7 +677,8 @@ static void print_global_objects(void)
        print_sessions();
 }
 
-static int noop_close(void *data, int *fds)
+static int noop_close(void *data __attribute__((unused)),
+               int *fds __attribute__((unused)))
 {
        return 0;
 }
@@ -973,7 +975,7 @@ end:
        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;
 
@@ -1085,7 +1087,7 @@ end:
 /*
  * 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;
@@ -1289,7 +1291,7 @@ error_sock_control:
 /*
  * 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;
@@ -1376,7 +1378,8 @@ static bool session_streams_have_index(const struct relay_session *session)
  *
  * 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)
 {
@@ -1568,7 +1571,8 @@ end:
 /*
  * 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)
 {
@@ -1707,7 +1711,8 @@ end_no_session:
 /*
  * 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)
 {
@@ -1785,7 +1790,8 @@ end_no_session:
  * 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)
 {
@@ -1884,9 +1890,10 @@ static void relay_unknown_command(struct relay_connection *conn)
  * 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;
@@ -1977,7 +1984,8 @@ end:
 /*
  * 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)
 {
@@ -2047,7 +2055,8 @@ end:
 /*
  * 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)
 {
@@ -2136,7 +2145,8 @@ end_no_session:
  * 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)
 {
@@ -2276,7 +2286,8 @@ end_no_session:
  *
  * 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)
 {
@@ -2368,7 +2379,8 @@ end_no_session:
  *
  * 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)
 {
@@ -2456,9 +2468,10 @@ end_no_session:
  *
  * 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;
@@ -2620,7 +2633,7 @@ error:
  * 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)
 {
@@ -2758,7 +2771,8 @@ end_no_reply:
 /*
  * 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)
 {
@@ -2944,7 +2958,8 @@ end_no_reply:
 /*
  * 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)
 {
@@ -3200,7 +3215,8 @@ end_no_reply:
 /*
  * 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)
 {
@@ -3263,7 +3279,8 @@ end_no_reply:
 /*
  * 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)
 {
@@ -3897,7 +3914,7 @@ static void relay_thread_close_connection(struct lttng_poll_event *events,
 /*
  * 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;
@@ -4225,7 +4242,7 @@ static int create_relay_conn_pipe(void)
                        "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);
index 34d3b7130f0a713b089bff4461cab34c9ce36445..e2eeed45115cfb36583a9615fa9bd3ba767ce187 100644 (file)
@@ -264,7 +264,7 @@ end:
 
 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,
@@ -276,7 +276,7 @@ static int action_executor_notify_handler(struct action_executor *executor,
 }
 
 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)
 {
@@ -361,7 +361,7 @@ end:
 }
 
 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)
 {
@@ -446,7 +446,7 @@ end:
 }
 
 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)
 {
@@ -538,7 +538,7 @@ end:
 }
 
 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)
 {
@@ -633,9 +633,10 @@ end:
        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();
index 7fd9d0b0ed4d4db0ec10a7d7000472fb754a5246..4c1f6954b952ae1c4d553c5e52a71d48569ffc79 100644 (file)
@@ -583,7 +583,8 @@ error_create:
 /*
  * 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;
@@ -2041,8 +2042,7 @@ skip_domain:
        {
                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:
@@ -2435,7 +2435,7 @@ static void cleanup_client_thread(void *data)
        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);
 }
index 0e9821eb693f327fa7b69c74f104df1b0398bfea..9ade60798692c112451e13f9b24d045e9a98a6cf 100644 (file)
@@ -917,7 +917,6 @@ relayd_comm_error:
  * 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,
@@ -998,7 +997,7 @@ int cmd_setup_relayd(struct ltt_session *session)
                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,
@@ -1026,7 +1025,7 @@ int cmd_setup_relayd(struct ltt_session *session)
                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,
@@ -5038,7 +5037,7 @@ static enum lttng_error_code set_relayd_for_snapshot(
        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,
@@ -5067,7 +5066,7 @@ static enum lttng_error_code record_kernel_snapshot(
                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;
 
@@ -5076,7 +5075,7 @@ static enum lttng_error_code record_kernel_snapshot(
        LTTNG_ASSERT(session);
 
        status = kernel_snapshot_record(
-                       ksess, output, wait, nb_packets_per_stream);
+                       ksess, output, nb_packets_per_stream);
        return status;
 }
 
@@ -5088,7 +5087,7 @@ static enum lttng_error_code record_kernel_snapshot(
 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;
 
@@ -5097,7 +5096,7 @@ static enum lttng_error_code record_ust_snapshot(struct ltt_ust_session *usess,
        LTTNG_ASSERT(session);
 
        status = ust_app_snapshot_record(
-                       usess, output, wait, nb_packets_per_stream);
+                       usess, output, nb_packets_per_stream);
        return status;
 }
 
@@ -5191,7 +5190,7 @@ int64_t get_session_nb_packets_per_stream(const struct ltt_session *session,
 
 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];
@@ -5311,7 +5310,7 @@ enum lttng_error_code snapshot_record(struct ltt_session *session,
        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;
                }
@@ -5320,7 +5319,7 @@ enum lttng_error_code snapshot_record(struct ltt_session *session,
        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;
                }
@@ -5368,7 +5367,8 @@ error:
  * 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;
@@ -5430,7 +5430,7 @@ int cmd_snapshot_record(struct ltt_session *session,
 
                /* 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;
                }
@@ -5470,7 +5470,7 @@ int cmd_snapshot_record(struct ltt_session *session,
                                }
                        }
 
-                       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;
index 3637cb2e57348c7a8fafa17687a1d18a78d0f22d..9919c678148978460438bc9e99cb287531e0a351 100644 (file)
@@ -1009,8 +1009,6 @@ void consumer_init_add_channel_comm_msg(struct lttcomm_consumer_msg *msg,
                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,
@@ -1507,7 +1505,7 @@ end:
  */
 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;
@@ -1687,7 +1685,7 @@ end:
  * 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;
index ffba198a829117ab8ace50687c0822be31f40eb0..a179206fc5c7995a57bb7dab3a712a7b4fb61cf1 100644 (file)
@@ -284,8 +284,6 @@ void consumer_init_add_channel_comm_msg(struct lttcomm_consumer_msg *msg,
                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,
@@ -317,13 +315,11 @@ int consumer_get_lost_packets(uint64_t session_id, uint64_t channel_key,
 /* 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);
 
index c99c39338fbe1fbcf6c5237d75fd28fb1fde4b16..49a54ff50ad28990fd19f1bac29b1c0830ed6868 100644 (file)
@@ -369,7 +369,7 @@ struct ust_error_accounting_entry *ust_error_accounting_entry_find(
  */
 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;
@@ -611,8 +611,7 @@ event_notifier_error_accounting_register_app(struct ust_app *app)
                 */
                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);
index 319a488ae7e1412deb3d33b8ebc1c261dce8f033..440b9d0919271e288a448dfb533892947201055e 100644 (file)
@@ -56,17 +56,21 @@ event_notifier_error_accounting_register_app(struct ust_app *app);
  */
 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;
 }
index 833b64714b2aa1e9b1920c953962bf787076ee79..684332e9f6d88fd47e43a5676f97d6d058782f9c 100644 (file)
@@ -43,7 +43,8 @@ int lttng_fd_get(enum lttng_fd_type type, unsigned int nr)
        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);
 }
index 364705fcb31d7f91e5d095d0740b38488c0bd712..d224b4cb741545daabcb653cd9944893620dbf6e 100644 (file)
@@ -145,8 +145,6 @@ int kernel_consumer_add_channel(struct consumer_socket *sock,
                        channel->key,
                        ksession->id,
                        &pathname[consumer_path_offset],
-                       ksession->uid,
-                       ksession->gid,
                        consumer->net_seq_index,
                        channel->channel->name,
                        channel->stream_count,
@@ -226,8 +224,6 @@ int kernel_consumer_add_metadata(struct consumer_socket *sock,
                        ksession->metadata->key,
                        ksession->id,
                        "",
-                       ksession->uid,
-                       ksession->gid,
                        consumer->net_seq_index,
                        ksession->metadata->conf->name,
                        1,
@@ -279,7 +275,7 @@ static
 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;
@@ -396,7 +392,7 @@ int kernel_consumer_send_channel_streams(struct consumer_socket *sock,
 
                /* Add stream on the kernel consumer side. */
                ret = kernel_consumer_add_stream(sock, channel, stream,
-                               ksession, monitor);
+                               ksession);
                if (ret < 0) {
                        goto error;
                }
index cb2d649e74cd96173bc037d07aecb80c9f986064..c4662af0d011a8aa43e14221e372253d139fda52 100644 (file)
@@ -1663,7 +1663,7 @@ 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 err, ret, saved_metadata_fd;
@@ -1721,8 +1721,7 @@ enum lttng_error_code kernel_snapshot_record(
                /* 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,
@@ -1733,8 +1732,7 @@ enum lttng_error_code kernel_snapshot_record(
 
                /* 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;
                }
@@ -1873,7 +1871,7 @@ enum lttng_error_code kernel_rotate_session(struct ltt_session *session)
                        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;
@@ -1885,7 +1883,7 @@ enum lttng_error_code kernel_rotate_session(struct ltt_session *session)
                 * 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;
index 5ecdad41fdb9e8442e90928d9618101f89bee918..4eb788d5cecde7c74ddd183e063bc6ec04597deb 100644 (file)
@@ -65,7 +65,7 @@ void kernel_free_session(struct ltt_kernel_session *ksess);
 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);
index d8d2caf8b2c9c387d4762b03d0968790584e0199..5873f03047e0c61c674bfc091a0482478d63391f 100644 (file)
@@ -795,7 +795,8 @@ end:
  * 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;
 
@@ -1172,7 +1173,8 @@ error:
  * 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:
index 9f6c4a9c3edabb8e64b39de0c8087d54bee0d669..fb2bcc8aad8147077f4e3d9a13bc377fae633b8f 100644 (file)
@@ -249,8 +249,12 @@ static int probes_capacity;
  * @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;
 
index cf18f63f7f2d340a0a01703d046bf97a88d0b26a..f0140ce552356a258252f7b39b493fd8ec741f4e 100644 (file)
@@ -1279,8 +1279,7 @@ void free_notification_client_rcu(struct rcu_head *node)
 }
 
 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;
@@ -2233,7 +2232,7 @@ end:
 }
 
 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,
@@ -3396,7 +3395,7 @@ int handle_notification_thread_client_connect(
        return ret;
 
 error:
-       notification_client_destroy(client, state);
+       notification_client_destroy(client);
        return ret;
 }
 
@@ -3438,7 +3437,7 @@ int notification_thread_client_disconnect(
         * Client no longer accessible to other threads (through the
         * client lists).
         */
-       notification_client_destroy(client, state);
+       notification_client_destroy(client);
        return ret;
 }
 
@@ -3746,7 +3745,7 @@ error:
 
 static
 int client_handle_message_unknown(struct notification_client *client,
-               struct notification_thread_state *state)
+               struct notification_thread_state *state __attribute__((unused)))
 {
        int ret;
        /*
@@ -4186,7 +4185,7 @@ bool evaluate_session_consumed_size_condition(
 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,
index ab6289a33984d3ea1ec425e72f42be392c1f298c..152a52a2058b431936ed4f3b5842001fb7287ec7 100644 (file)
@@ -15,7 +15,8 @@ bool launch_application_notification_thread(int apps_cmd_notify_pipe_read_fd);
 #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;
 }
index 473138cf8861d16871cc6b2f250bf1fb6b911229..9c873aec5b6c1e028806e478f2e16e398a8d2249 100644 (file)
@@ -564,7 +564,7 @@ int run_job(struct rotation_thread_job *job, struct ltt_session *session,
 
 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;
@@ -710,9 +710,9 @@ end:
 }
 
 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;
index 5a1f35dfa936904f236e7dac108cdf044789f067..9635dea81a426c4774cf85640e12b2e0efa83c37 100644 (file)
@@ -406,7 +406,7 @@ end:
 }
 
 static
-bool shutdown_timer_thread(void *data)
+bool shutdown_timer_thread(void *data __attribute__((unused)))
 {
        return kill(getpid(), LTTNG_SESSIOND_SIG_EXIT) == 0;
 }
index c312dd970768db6135c9bfb0a98a068f12146e3d..d4df48d189f9d99b0eadb0edba49ecb32bc3fb9e 100644 (file)
@@ -240,129 +240,161 @@ const struct process_attr_tracker *trace_ust_get_process_attr_tracker(
 
 #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;
 }
index 8c39e1b0655326bf83b587877c47fa17bf7f4d82..5bf6128900b87a8a9b6ff063495f7c25a9f2a97e 100644 (file)
@@ -11,8 +11,8 @@
 #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;
 }
index 62d323ee95619263864553464bb5bb4fa643def3..44db0accdd50b240e89152e52e0e1f7d2dc2348d 100644 (file)
@@ -1998,7 +1998,7 @@ error:
  * 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;
@@ -2886,8 +2886,8 @@ error:
  * 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;
 
@@ -2905,8 +2905,8 @@ error:
 /*
  * 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;
 
@@ -2983,8 +2983,7 @@ error:
  */
 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;
@@ -3420,8 +3419,7 @@ static int create_channel_per_uid(struct ust_app *app,
         * 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);
@@ -3535,8 +3533,7 @@ static int create_channel_per_pid(struct ust_app *app,
 
        /* 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);
@@ -3656,7 +3653,8 @@ error:
  */
 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;
@@ -3706,8 +3704,8 @@ error:
  * 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;
@@ -3724,7 +3722,7 @@ int create_ust_app_event(struct ust_app_session *ua_sess,
        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
@@ -4860,7 +4858,7 @@ int ust_app_disable_event_glb(struct ltt_ust_session *usess,
                        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;
@@ -5019,7 +5017,7 @@ int ust_app_enable_event_glb(struct ltt_ust_session *usess,
                        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;
@@ -5083,7 +5081,7 @@ int ust_app_create_event_glb(struct ltt_ust_session *usess,
 
                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) {
@@ -5779,7 +5777,7 @@ end:
 
 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;
@@ -5788,15 +5786,15 @@ int ust_app_channel_synchronize_event(struct ust_app_channel *ua_chan,
        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);
                }
        }
 
@@ -5999,7 +5997,7 @@ void ust_app_synchronize_all_channels(struct ltt_ust_session *usess,
                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;
                        }
@@ -7023,7 +7021,7 @@ 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)
 {
        int ret = 0;
@@ -7083,8 +7081,7 @@ enum lttng_error_code ust_app_snapshot_record(
                                        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;
@@ -7092,8 +7089,7 @@ enum lttng_error_code ust_app_snapshot_record(
                        }
                        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;
                        }
@@ -7146,9 +7142,7 @@ enum lttng_error_code ust_app_snapshot_record(
                                        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:
@@ -7167,9 +7161,7 @@ enum lttng_error_code ust_app_snapshot_record(
                        }
                        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;
@@ -7462,7 +7454,6 @@ enum lttng_error_code ust_app_rotate_session(struct ltt_session *session)
                                        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) {
@@ -7488,7 +7479,6 @@ enum lttng_error_code ust_app_rotate_session(struct ltt_session *session)
 
                        ret = consumer_rotate_channel(socket,
                                        reg->registry->reg.ust->metadata_key,
-                                       usess->uid, usess->gid,
                                        usess->consumer,
                                        /* is_metadata_channel */ true);
                        if (ret < 0) {
@@ -7532,8 +7522,6 @@ enum lttng_error_code ust_app_rotate_session(struct ltt_session *session)
                                        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) {
@@ -7549,8 +7537,6 @@ enum lttng_error_code ust_app_rotate_session(struct ltt_session *session)
                        (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) {
index 0e2722e9efec985c380c3252b066f842a5aec8dd..8ad9085ff8e6d61d2fd1b02eeaf377177e8a352c 100644 (file)
@@ -374,7 +374,7 @@ ssize_t ust_app_push_metadata(struct ust_registry_session *registry,
 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);
@@ -410,262 +410,352 @@ bool ust_app_supports_counters(const struct ust_app *app);
 #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;
 }
index 4f9fca386825641ec4396c2b4aa84e87c98fa19d..63d8eb25ca8fb1e47bf32969527349e99530ba1b 100644 (file)
@@ -36,7 +36,8 @@ int ust_consumer_send_channel_to_ust(struct ust_app *app,
 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;
 }
index a25cdc70de01f7070069fccf876273d8a814cbfc..b77b1d8ae6f9dd0e4fb30865f4b2b6671ca1eba9 100644 (file)
@@ -319,101 +319,140 @@ struct ust_registry_enum *
 #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;
 }
index 110ef7f75755658427d6b39384e78659c9d4fbab..5c1ff2e7335be1202337c53468b167a50b0a0e25 100644 (file)
@@ -15,7 +15,7 @@ void lttng_ust_handle_sigbus(void *address);
 #else /* HAVE_LIBLTTNG_UST_CTL */
 
 static inline
-void lttng_ust_handle_sigbus(void *address)
+void lttng_ust_handle_sigbus(void *address __attribute__((unused)))
 {
 }
 
index 274bae47d0af90e1301af4e4ad4443e99e31c84e..e6860380f2a8db0bbbe0cd99c6c1e585fa2200b5 100644 (file)
@@ -748,7 +748,6 @@ static void print_condition_event_rule_matches(
 }
 
 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)
 {
@@ -963,7 +962,7 @@ void print_one_action(const struct lttng_trigger *trigger,
        }
 
        MSG("");
-       print_action_errors(trigger, action, action_path_indexes,
+       print_action_errors(trigger, action_path_indexes,
                        action_path_length);
 
 end:
index 35aea004e67aecb05b5c44c54630468b82c551ce..b68c22a07cad3e766a2744f327901eaa7d12eb1b 100644 (file)
@@ -66,7 +66,8 @@ static int count_arguments(const char **argv)
        return i;
 }
 
-static int metadata_regenerate(int argc, const char **argv)
+static int metadata_regenerate(int argc,
+               const char **argv __attribute__((unused)))
 {
        int ret;
 
index 0e904f8abcba1cdc6c92f6e4b5be3030ba84dac9..4ceb55424073cb10aa70f6714c76ab693627bfb0 100644 (file)
@@ -68,7 +68,8 @@ static int count_arguments(const char **argv)
        return i;
 }
 
-static int regenerate_metadata(int argc, const char **argv)
+static int regenerate_metadata(int argc,
+               const char **argv __attribute__((unused)))
 {
        int ret;
 
@@ -87,7 +88,8 @@ end:
        return ret;
 }
 
-static int regenerate_statedump(int argc, const char **argv)
+static int regenerate_statedump(int argc,
+               const char **argv __attribute__((unused)))
 {
        int ret;
 
index 8e19fa3d86f40f0bca00996793ed15cbab72081c..4ae9ba1e91afb14e7b429532fdbda14df1799cc5 100644 (file)
@@ -384,7 +384,8 @@ end:
        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;
 
@@ -425,8 +426,8 @@ static int record(const char *url)
        }
 
        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;
                }
index 7547f8b5ddfd6f84a6de4cea3d8bb094d72e737e..de377430ca51388968f040eb128e36a998ba458a 100644 (file)
@@ -566,7 +566,7 @@ end:
 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;
index 4b9e313dc4a96659634fb35eebe88bdb1c22d75b..9d3ca129432c25db185b8bea77671ff465ca049e 100644 (file)
@@ -252,7 +252,8 @@ BUILT_SOURCES += filter/filter-parser.hpp
 # 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)
index 2d2f303f5aef7d964d39eff93db69dbe4268b0c1..ef254d7ccea1d28bb8e64b348882a88a805b303d 100644 (file)
@@ -529,7 +529,7 @@ end:
 }
 
 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;
index c24ea6bca60762dcab04d8ddc147c7608276c60e..ebbd66a8ba06abc8b871001a272d2e888cd1a0c0 100644 (file)
@@ -160,7 +160,7 @@ void ctf_packet_index_populate(struct ctf_packet_index *index,
 }
 
 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)
 {
@@ -231,7 +231,7 @@ static ssize_t consumer_stream_consume_splice(
 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 = {};
@@ -591,8 +591,8 @@ end:
  */
 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;
 
@@ -1274,7 +1274,7 @@ end:
 }
 
 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)
 {
index 6166df4ede77b43ac0bddbce4e3ceb94cc602680..f26ccd71a9ff57bc3eda8c2b97cc58ae5ec0a414 100644 (file)
@@ -3404,7 +3404,7 @@ ssize_t lttng_consumer_read_subbuffer(struct lttng_consumer_stream *stream,
         */
        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;
@@ -3460,7 +3460,7 @@ ssize_t lttng_consumer_read_subbuffer(struct lttng_consumer_stream *stream,
         */
        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");
@@ -3986,8 +3986,7 @@ end:
  * 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;
@@ -4537,8 +4536,7 @@ void lttng_consumer_reset_stream_rotate_state(struct lttng_consumer_stream *stre
  * 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;
 
@@ -4577,8 +4575,7 @@ end:
  *
  * 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;
 
@@ -4613,7 +4610,7 @@ int lttng_consumer_rotate_stream(struct lttng_consumer_local_data *ctx,
        }
 
        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;
@@ -4657,7 +4654,7 @@ 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;
@@ -4686,7 +4683,7 @@ int lttng_consumer_rotate_ready_streams(struct lttng_consumer_channel *channel,
                }
                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) {
index 4bcd779f992f9520a3c2c57685e062af01792e40..1c6eeb39a83aa4f4e2c7db1107cfdc0955d86823 100644 (file)
@@ -1051,13 +1051,11 @@ void consumer_add_metadata_stream(struct lttng_consumer_stream *stream);
 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,
index 77ae3800c2fc30a98efdc68a8e66af85a3949332..319a904a2f27d1a4d2f351882cf9b4905983cb3f 100644 (file)
@@ -376,7 +376,7 @@ lttng_event_rule_jul_logging_get_internal_filter_bytecode(
 
 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. */
@@ -850,7 +850,8 @@ end:
        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
index d33d446055c2f1f152276aad719ee2ba3c02f539..da87fd2b95eac68d3a4e0a5072e595115f97d5cf 100644 (file)
@@ -150,29 +150,31 @@ end:
 }
 
 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. */
index 3f8e64ed804cd7ce98b1cd9579cfc10135586a60..64ebe47fd1c7d874de4c556ee3724ad2af229734 100644 (file)
@@ -220,7 +220,8 @@ lttng_event_rule_kernel_syscall_get_internal_filter_bytecode(
 }
 
 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. */
index cff3048f30995b7dff94f436c0a0312fa50f3f04..1b7fbe2a2350ca8d6e427ec4eb8137375bc083c7 100644 (file)
@@ -240,7 +240,7 @@ lttng_event_rule_kernel_tracepoint_get_internal_filter_bytecode(
 
 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. */
index d53958df6e20c40e49902c6bc3f38a62c1962390..fe84f7cdad2680654fd695d0ad2441dfbe284696 100644 (file)
@@ -141,29 +141,31 @@ end:
 }
 
 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. */
index 25f2c4c0e7ee5d5344bc228a018262365f0af3e6..0bef6efab9ed37cff8ff82fa6b4b2c380d99c25f 100644 (file)
@@ -376,7 +376,7 @@ lttng_event_rule_log4j_logging_get_internal_filter_bytecode(
 
 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. */
@@ -849,7 +849,8 @@ end:
        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
index 1ccd495cdf6f909b191e6d4c7e573717ecc8b18d..4389c8aafae0e23a8177e2c8be0e990b79298920 100644 (file)
@@ -376,7 +376,7 @@ lttng_event_rule_python_logging_get_internal_filter_bytecode(
 
 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. */
@@ -849,7 +849,8 @@ end:
        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
index 6a0f2d9bd28c7c6178af1af8d43889b9bbb689e7..b1370c55d50878c3615bc292194fd489601b19ac 100644 (file)
@@ -32,7 +32,7 @@ end:
        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);
index dfe2e188be8af19cdf5ba5bd4138782ba667c8b9..7690fe463de02473b5fbae9d76ae620be2d106cc 100644 (file)
 #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);
 }
@@ -111,7 +111,7 @@ end:
 
 #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]);
 
index 42242ad1231aed54a79ef30ab3b324e353809c6f..fa3e8a55377213dc5e5e91d6b0c660b6c890caab 100644 (file)
@@ -145,8 +145,7 @@ error:
 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;
@@ -989,8 +988,7 @@ error_streams_sent_nosignal:
                                                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;
@@ -1184,8 +1182,7 @@ end_destroy_channel:
 
                        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;
@@ -1204,7 +1201,7 @@ end_destroy_channel:
                        int ret_rotate;
 
                        ret_rotate = lttng_consumer_rotate_ready_streams(
-                                       channel, key, ctx);
+                                       channel, key);
                        if (ret_rotate < 0) {
                                ERR("Rotate ready streams failed");
                        }
@@ -1734,7 +1731,7 @@ end:
 
 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);
 
@@ -1766,7 +1763,7 @@ bool is_get_next_check_metadata_available(int tracer_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;
index 10201d8737e4c0738a18870c9acbe2137b97d2d3..94963b222dbeb3384e0d36f7d62121cebcd5893d 100644 (file)
@@ -2367,8 +2367,7 @@ end:
        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;
index fa82834dcdc0021a91b002724230928e67e867bd..78e04199a0afd98baae805f6cba8d10b6a6f6402 100644 (file)
@@ -1042,15 +1042,12 @@ int mi_lttng_snapshot_add_output(struct mi_writer *writer,
  *
  * 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);
 
 /*
index a87eb13cfbb182351ff14abf3bc14caf6bab71b1..ee3451321e7b8cbafb809fc4d3fe491cb6ee0a30 100644 (file)
@@ -1344,7 +1344,7 @@ end:
 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;
index 9e804ce0197b25c74a66a0b211cce3fa8f77768a..ecf8ea80312503437c5c57d2ad8f508f2066f473 100644 (file)
@@ -238,7 +238,7 @@ int fs_handle_untracked_get_fd(struct fs_handle *_handle)
 }
 
 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. */
 }
@@ -1639,7 +1639,7 @@ end:
 }
 
 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;
 }
index 1740bbe71e2bdf22a9f36c399a4764089ccf515d..aeafae642b554e1aafc825705b8be25bf1437ebf 100644 (file)
@@ -2065,8 +2065,7 @@ error_push_metadata_fatal:
                         */
                        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;
@@ -2093,8 +2092,7 @@ error_push_metadata_fatal:
 
                        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");
                        }
@@ -3069,7 +3067,7 @@ end:
 }
 
 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);
 
@@ -3078,7 +3076,7 @@ static int put_next_subbuffer(struct lttng_consumer_stream *stream,
 }
 
 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;
index e481f0850114a68165bc1baff41559ef09bbd93b..e6590c33c047028f079bb905febdaf9779ef6472 100644 (file)
@@ -68,174 +68,219 @@ void lttng_ustconsumer_sigbus_handle(void *addr);
 
 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 */
index 64e659dca4b14c4fb341a08116ea9fffc0e5a552..b10acd5fe0438b43e296b2c46873d7cfbf7b1775 100644 (file)
@@ -57,7 +57,7 @@ static inline int lttng_ctl_ask_sessiond_varlen_no_cmd_header(
  */
 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);
index f99ce672c96db6fea7088b01cc63af7dd305c473..0da8f6ad100eef2217254382c9c7e1651aa339eb 100644 (file)
@@ -911,7 +911,8 @@ int lttng_stop_tracing_no_wait(const char *session_name)
  * 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;
@@ -2520,8 +2521,8 @@ end:
        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.
@@ -2827,7 +2828,7 @@ error:
  */
 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;
 }
@@ -2837,7 +2838,7 @@ int lttng_enable_consumer(struct lttng_handle *handle)
  */
 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;
 }
@@ -2848,8 +2849,9 @@ int lttng_disable_consumer(struct lttng_handle *handle)
 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;
 }
index 6a003a18ec101f1b0a3aa13eaaf5027c8df2c987..ed198922ee6535daf2fccc86a5bf617cb8da3e4d 100644 (file)
@@ -196,7 +196,7 @@ end:
  * 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;
index 543861d676d4639bb52cf9ac494f263d7317592e..b50403512d2f9378ee56269212146ca1b7407fce 100644 (file)
@@ -196,7 +196,8 @@ void lttng_snapshot_output_list_destroy(struct lttng_snapshot_output_list *list)
  * 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;
index abedc0aa929557c7aa859e76788d71d53e0f0cb4..fb72f6e5a582c48899752acbeeb3bd20966ccc39 100644 (file)
@@ -242,7 +242,7 @@ void test_ppoll(void)
 }
 
 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];
@@ -443,7 +443,8 @@ end:
  * 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];
@@ -470,7 +471,7 @@ void ppoll_fds_buffer_overflow(FILE *validation_output_file)
  * 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];
@@ -495,7 +496,7 @@ void ppoll_fds_ulong_max(FILE *validation_output_file)
  * -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;
@@ -538,7 +539,8 @@ error:
  * 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;
@@ -753,7 +755,8 @@ end:
  * 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];
 
index afaf23b658442e2b407d509ab29cec878aba87e8..76d801e9b024ee3fcbcd78e6722dbe0e762fd361 100644 (file)
@@ -675,7 +675,7 @@ error:
        return ret;
 }
 
-int main(int argc, char **argv)
+int main(void)
 {
        int ret;
        uint64_t session_id;
index cc24cec1ea01ea45bd34ecba5b8697d3d5d5409c..40e2e126fbfa3e50a86ab1be143b91cd5eb8e0b5 100644 (file)
@@ -21,7 +21,7 @@ int lttng_opt_verbose;
 int lttng_opt_mi;
 int lttng_opt_quiet;
 
-int main(int argc, const char **argv)
+int main(void)
 {
        int ret;
        /*
index 6d3e46ea32bb319ea9f0cb153daf17f88bba403f..c6205ef63757c29e45169cb8a607602c2cccfa05 100644 (file)
@@ -794,7 +794,6 @@ error:
 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;
@@ -1860,8 +1859,7 @@ end:
        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;
@@ -1956,7 +1954,6 @@ end:
 }
 
 static void test_uprobe_event_rule_notification(
-               enum lttng_domain_type domain_type,
                const char *testapp_path,
                const char *test_symbol_name)
 {
@@ -2060,8 +2057,7 @@ end:
        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;
@@ -2145,8 +2141,7 @@ end:
        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;
@@ -2570,13 +2565,11 @@ int main(int argc, const char *argv[])
                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",
@@ -2613,7 +2606,7 @@ int main(int argc, const char *argv[])
                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;
        }
@@ -2626,12 +2619,12 @@ int main(int argc, const char *argv[])
                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;
        }
@@ -2655,7 +2648,7 @@ int main(int argc, const char *argv[])
                                domain_type_string);
 
                test_uprobe_event_rule_notification(
-                               domain_type, testapp_path, test_symbol_name);
+                               testapp_path, test_symbol_name);
 
                break;
        }
index 1c9aae32c23afbba93b3f5b674380f08dea30caa..11459d4bdf32bd0497b19ecab055c20f00ea149d 100644 (file)
@@ -613,7 +613,7 @@ const test_function test_functions[] = {
        double_register_automatic_name_trigger,
 };
 
-int main(int argc, const char **argv)
+int main(void)
 {
        size_t i;
 
index 071a6c5719c38d141e560e1628722c79c33a0c02..7b82c1bdb8fea0473c578af9369ae011350e2014 100644 (file)
@@ -10,7 +10,7 @@
 #define TRACEPOINT_DEFINE
 #include "tp.h"
 
-int main(int argc, char **argv)
+int main(void)
 {
        sleep(1);
        return 0;
index faf204f9bcb73284dd2ccf36c96ecea92c0388cd..44ec182fab47a2e5340d115783ebcea62f69e65e 100644 (file)
 #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);
index ffce5d0a1569650a9f96f4970cb9c16a3045ca73..48d7164012e9e0b1172a5e63de3c7871dfbc413e 100644 (file)
@@ -12,7 +12,7 @@
 #define TRACEPOINT_CREATE_PROBES
 #include "ust_tests_fork.h"
 
-int main(int argc, char **argv)
+int main(void)
 {
        printf("IN FORK2\n");
 
index 092d8015fc20a3384766bc43b0a2686510cd24ab..055d8823e146edd63a2a55b886ec5eb1c71e281c 100644 (file)
@@ -22,7 +22,7 @@
 #include "tp.h"
 
 static
-void inthandler(int sig)
+void inthandler(int sig __attribute__((unused)))
 {
 }
 
index 999d880a3dc744fe029ce30638d55b42de7518e6..c7aa0d307479b9bf7eed71693e0e9dff703ee3b1 100644 (file)
@@ -12,7 +12,7 @@
 
 #define N_ITER 1000
 
-int main(int argc, char **argv)
+int main(void)
 {
        int i;
        const char teststr[] = "Hello World! 1234567890abc";
index f199050af96e9f4589d052060f18752f4809f1e0..b419d1f5bcab181d2a797f0913780ff45153cf3b 100644 (file)
@@ -16,7 +16,7 @@
 /*
  * 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;
 
@@ -45,7 +45,7 @@ static void *th_event_minute(void *data)
 /*
  * main
  */
-int main(int argc, char **argv)
+int main(void)
 {
        int ret;
        void *status;
index 4ec4238b7c525c00226cf443d7444b43a30ca79b..05bab2dd7c5963199cd8f12098e8e53c5b4c0bb5 100644 (file)
@@ -43,6 +43,7 @@ TRACEPOINT_ENUM(multi, enum_a,
 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)
@@ -59,7 +60,8 @@ TRACEPOINT_ENUM(multi, enum_a,
 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)
        )
@@ -128,6 +130,7 @@ TRACEPOINT_ENUM(multi, enum_a,
 TRACEPOINT_EVENT(multi, tp,
        TP_ARGS(uint64_t, arg),
        TP_FIELDS(
+               ctf_unused(arg)
                ctf_enum(multi, enum_a, int32_t, enum_int,  1)
        )
 )
@@ -142,7 +145,8 @@ TRACEPOINT_ENUM(multi, enum_a,
 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)
@@ -156,6 +160,7 @@ TRACEPOINT_ENUM(multi, enum_a,
 TRACEPOINT_EVENT(multi, tp,
        TP_ARGS(uint64_t, arg),
        TP_FIELDS(
+               ctf_unused(arg)
                ctf_enum(multi, enum_a, int16_t, enum_int,  1)
        )
 )
@@ -163,6 +168,7 @@ TRACEPOINT_EVENT(multi, tp,
 TRACEPOINT_EVENT(multi, tp,
        TP_ARGS(uint64_t, arg),
        TP_FIELDS(
+               ctf_unused(arg)
                ctf_string(arg_string, "string")
        )
 )
@@ -170,6 +176,7 @@ TRACEPOINT_EVENT(multi, tp,
 TRACEPOINT_EVENT(multi, tp,
        TP_ARGS(uint64_t, arg),
        TP_FIELDS(
+               ctf_unused(arg)
                ctf_string(my_arg_string, "string")
        )
 )
@@ -177,6 +184,7 @@ TRACEPOINT_EVENT(multi, tp,
 TRACEPOINT_EVENT(multi, tp,
        TP_ARGS(uint64_t, arg),
        TP_FIELDS(
+               ctf_unused(arg)
        )
 )
 #endif
index d4a2ff2821bb3360886a917b5abca3b9be3c797a..d7d2aff73939f408218e3d2eac14d09784ba6a2c 100644 (file)
@@ -15,7 +15,7 @@
 #define TRACEPOINT_CREATE_PROBES
 #include "ust_tests_td.h"
 
-int main(int argc, char *argv[])
+int main(void)
 {
        int i;
 
index 473de57a90db560493ffd2a8d8651c4d406a2827..bab2644cc537ee21838761af01cface924ecf7f8 100644 (file)
@@ -19,7 +19,7 @@
  * 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;
 
index ad323e9acc169592c68de995f4344fe6d6e0e997..8657be1dcb4eb4c587c5e90bf36de24818ccca4e 100644 (file)
@@ -528,7 +528,7 @@ static void test_action_snapshot_session(void)
        lttng_payload_reset(&payload);
 }
 
-int main(int argc, const char *argv[])
+int main(void)
 {
        plan_tests(NUM_TESTS);
        test_action_notify();
index 1ed14fa6c3f502a02ba5e960cdbdbbc187ef0d8f..6271901096c7e242bcc47af8621dab8eb5fe3a7d 100644 (file)
@@ -109,7 +109,7 @@ void test_condition_event_rule(void)
        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();
index ca116716595165b5ad8bfae4707341714c449fcf..8dd7dd11a58aac396ca839659ed15abf4c63e65e 100644 (file)
@@ -270,7 +270,7 @@ end:
        return ret == 0 ? tests_ran : ret;
 }
 
-int main(int argc, char **argv)
+int main(void)
 {
        int ret;
        char test_dir[] = "/tmp/lttng-XXXXXX";
index 0fc9ec7702a44724339e5a530d19af5f71de52ae..b8adee76906b1256b77a7a9d29c812e83c110689 100644 (file)
@@ -811,7 +811,7 @@ static void test_event_rule_log_level_python(void)
                        NULL, 0);
 }
 
-int main(int argc, const char *argv[])
+int main(void)
 {
        plan_tests(NUM_TESTS);
        test_event_rule_kernel_tracepoint();
index 6df179f9d7516bfe8ffb2ef042164e867362781a..544dc84eafee3b6015ef64183c1a071125d51a2b 100644 (file)
@@ -131,7 +131,8 @@ int noop_open(void *data, int *fds)
 }
 
 static
-int noop_close(void *data, int *fds)
+int noop_close(void *data __attribute__((unused)),
+               int *fds __attribute__((unused)))
 {
        return 0;
 }
@@ -209,13 +210,13 @@ end:
 }
 
 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);
 }
@@ -301,7 +302,7 @@ void test_unsuspendable_duplicate(void)
 }
 
 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;
@@ -317,7 +318,7 @@ int open_pipes(void *data, int *out_fds)
 }
 
 static
-int close_pipes(void *data, int *fds)
+int close_pipes(void *data __attribute__((unused)), int *fds)
 {
        int i;
        int *pipes = fds;
@@ -472,7 +473,8 @@ static int open_same_file(struct fd_tracker *tracker,
 }
 
 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)
 {
@@ -882,7 +884,7 @@ end:
        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");
index 4451f65b7f1bd52f01e1621a9cf045983403eae1..cf2f53564d11969553e8eaca56ce5f0e0ae24078 100644 (file)
@@ -179,7 +179,7 @@ static void test_create_kernel_stream(void)
        trace_kernel_destroy_stream(stream);
 }
 
-int main(int argc, char **argv)
+int main(void)
 {
        plan_tests(NUM_TESTS);
 
index 0f6f89ec950cb7a0c94c3fac91e670b2b51c3d76..91211eb4e8190e0c39549f2d41ad1070d2aa8a13 100644 (file)
@@ -159,7 +159,7 @@ static void test_kernel_probe_location_symbol(void)
        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();
index d2895c811bc5331e23d00bcea68805fe7d82827c..8948006654392073152e37179abe70285d31272a 100644 (file)
@@ -178,7 +178,7 @@ static void test_log_level_rule_at_least_as_severe_as(void)
        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();
index 5a2bac14d2159d678d01b717fe658d6a357ce450..8e2006f3d5f5d2eb02db03faf2e79c05394c64d6 100644 (file)
@@ -303,7 +303,7 @@ static void test_trigger(void)
 }
 
 
-int main(int argc, const char *argv[])
+int main(void)
 {
        plan_tests(NUM_TESTS);
        test_condition_buffer_usage_low();
index acfe159039fdf79e748be3e53873b979fb27b071..d9ae4b7b6ba63fc94100c4bae3a3f9f126c8759a 100644 (file)
@@ -243,7 +243,7 @@ static void test_rate_policy_once_after_n(void)
        lttng_payload_reset(&payload);
 }
 
-int main(int argc, const char *argv[])
+int main(void)
 {
        plan_tests(NUM_TESTS);
        test_rate_policy_every_n();
index dee0fabd41df9028435da3750e7f705f4ceb60ae..1fde89cbe44132f0cb848552917df5015c5135b7 100644 (file)
@@ -127,7 +127,7 @@ end:
        return result;
 }
 
-int main(int argc, char **argv)
+int main(void)
 {
        int i;
        int num_test = sizeof(tests) / sizeof(struct test);
index 5a549a593d51ff32df4973c154a1a3787de6b0d3..c403e2355c8227598e1c33adb4fbc5db6576b96c 100644 (file)
@@ -322,7 +322,7 @@ static void test_large_session_number(void)
           MAX_SESSIONS);
 }
 
-int main(int argc, char **argv)
+int main(void)
 {
 
        plan_tests(NUM_TESTS);
index e20f88f7a8552432302194bd1e9646893b650ce9..9f1f450947aa542cc31e081a01fb33954733b57f 100644 (file)
@@ -172,7 +172,7 @@ static void test_normalize_star_glob_pattern(void)
        test_one_normalize_star_glob_pattern("**\\***", "*\\**");
 }
 
-int main(int argc, char **argv)
+int main(void)
 {
        plan_tests(NUM_TESTS);
        diag("String utils unit tests");
index d2ad04b0ce7a98a4b734ac3d83380f70ca7ed60e..a65ce6218c3ff9ca9e8d813a97187b07981f693d 100644 (file)
@@ -242,7 +242,7 @@ static void test_uri_cmp(void)
        uri_free(uri2);
 }
 
-int main(int argc, char **argv)
+int main(void)
 {
        plan_tests(NUM_TESTS);
 
index ee566f3957a38fd7bb4ac7a405339e332352aa04..04aa8c83eb994c7dc7c7fc29ddec466391047705 100644 (file)
@@ -263,7 +263,7 @@ static void test_create_ust_context(void)
        free(uctx);
 }
 
-int main(int argc, char **argv)
+int main(void)
 {
        plan_tests(NUM_TESTS);
 
index eb2b7b6ec2cf524947427bba6697d88d844812ed..2ce437372968ed63063956a417f2d8f294d468ec 100644 (file)
@@ -13,7 +13,7 @@
 
 #define TEST_NAME_PROPER_LEN 16
 
-int main(int argc, char **argv)
+int main(void)
 {
        int ret;
        char name1[TEST_NAME_PROPER_LEN];
index 8216f3fd7b7a35625f55bf865971ccdf21718456..e85cbbced9c4af4a546d629a445a70fb361a1697 100644 (file)
@@ -327,7 +327,7 @@ static void test_utils_expand_path(void)
        }
 }
 
-int main(int argc, char **argv)
+int main(void)
 {
        if (prepare_symlink_tree() != 0) {
                goto error_mkdir;
index ac3e24b645b58be1e7af63061eb1a63062c80ae5..2cd917272efd9af93879cac367b72138b1d8d604 100644 (file)
@@ -117,7 +117,7 @@ static void test_utils_parse_size_suffix(void)
        }
 }
 
-int main(int argc, char **argv)
+int main(void)
 {
        plan_tests(num_valid_tests + num_invalid_tests);
 
index 71f52e4269214696f6ea89a63e4c6e4701221333..e444464bc4abba9563fe4448e4c57bb85c1a5a97 100644 (file)
@@ -115,7 +115,7 @@ static void test_utils_parse_time_suffix(void)
        }
 }
 
-int main(int argc, char **argv)
+int main(void)
 {
        plan_tests(num_valid_tests + num_invalid_tests);
 
index e13a0975175308c684e586451d7609a8cb7e7344..2355084a51748fefd2137bb67e5745ce38f8822b 100644 (file)
@@ -172,7 +172,7 @@ void run_test(void)
        run_test_lttng_uuid_generate();
 }
 
-int main(int argc, char **argv)
+int main(void)
 {
        /* Run tap-formated tests */
        run_test();
index e6e041da998519ecadd7afc7ee4e4d9a31878caa..d530be2691b8cbacbae6db4ca57be36145376293 100644 (file)
@@ -14,7 +14,7 @@ void __attribute__ ((noinline)) test_function(void)
        not_a_function += 1;
 }
 
-int main(int argc, char *argv[])
+int main(void)
 {
        test_function();
        dynamic_symbol(42);
index ab0f241447b1cda1b7db0b0fe8194a39bb596462..2e169c8fc4fc466d04ee70f0eb479250639d3924 100644 (file)
@@ -15,7 +15,7 @@ void test_cxx_function()
        not_a_function += 1;
 }
 
-int main(int argc, char *argv[])
+int main(void)
 {
        test_class my_test_class;
        /* Call test function. */
index be6e0294cf6f13b7e518c0b9ca8cfd0f61b15731..3f296f0235342ca17b5c2e032984899b7071f93b 100644 (file)
@@ -12,7 +12,7 @@
 
 #include <libxml/parser.h>
 
-int main(int argc, char **argv)
+int main(void)
 {
        xmlDocPtr doc = NULL;
 
index fa8b2cc9d5d524995e91f8b7837eae29c8cb3c2b..8e30100c0bcf5cd2f11e249d7f3a259d856a61f1 100644 (file)
@@ -41,7 +41,8 @@ enum command_err_code {
 };
 
 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;
@@ -150,7 +151,7 @@ end:
 
 
 }
-int main(int argc, char **argv, char *env[])
+int main(int argc, char **argv)
 {
        int ret;
        struct validation_ctx ctx = { 0 };
This page took 0.09188 seconds and 4 git commands to generate.