cleanup: explicitly mark unused parameters (-Wunused-parameter)
authorMichael Jeanson <mjeanson@efficios.com>
Wed, 31 Mar 2021 16:19:05 +0000 (12:19 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Thu, 1 Apr 2021 15:03:25 +0000 (11:03 -0400)
Add the 'unused' attribute to function parameters that are unused to
allow turning on -Wunused-parameter and distinguish unused parameters
that are actual errors.

Change-Id: I5a4b3790ae84da0c5135a214f2a63b513bb199eb
Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
62 files changed:
doc/examples/cmake-multiple-shared-libraries/aligner.cpp
doc/examples/cmake-multiple-shared-libraries/tester.cpp
doc/examples/easy-ust/sample.c
doc/examples/gen-tp/sample.c
doc/examples/hello-static-lib/hello.c
include/lttng/ringbuffer-context.h
libcounter/counter-internal.h
libcounter/counter.c
liblttng-ust-comm/lttng-ust-comm.c
liblttng-ust-ctl/ustctl.c
liblttng-ust-cyg-profile/lttng-ust-cyg-profile-fast.c
liblttng-ust-java-agent/jni/common/lttng_ust_context.c
liblttng-ust-java-agent/jni/jul/lttng_ust_jul.c
liblttng-ust-java-agent/jni/log4j/lttng_ust_log4j.c
liblttng-ust-java/LTTngUst.c
liblttng-ust-libc-wrapper/lttng-ust-malloc.c
liblttng-ust/lttng-bytecode-interpreter.c
liblttng-ust/lttng-bytecode-validator.c
liblttng-ust/lttng-bytecode.c
liblttng-ust/lttng-context-cgroup-ns.c
liblttng-ust/lttng-context-cpu-id.c
liblttng-ust/lttng-context-ip.c
liblttng-ust/lttng-context-ipc-ns.c
liblttng-ust/lttng-context-mnt-ns.c
liblttng-ust/lttng-context-net-ns.c
liblttng-ust/lttng-context-perf-counters.c
liblttng-ust/lttng-context-pid-ns.c
liblttng-ust/lttng-context-procname.c
liblttng-ust/lttng-context-pthread-id.c
liblttng-ust/lttng-context-time-ns.c
liblttng-ust/lttng-context-user-ns.c
liblttng-ust/lttng-context-uts-ns.c
liblttng-ust/lttng-context-vegid.c
liblttng-ust/lttng-context-veuid.c
liblttng-ust/lttng-context-vgid.c
liblttng-ust/lttng-context-vpid.c
liblttng-ust/lttng-context-vsgid.c
liblttng-ust/lttng-context-vsuid.c
liblttng-ust/lttng-context-vtid.c
liblttng-ust/lttng-context-vuid.c
liblttng-ust/lttng-events.c
liblttng-ust/lttng-ring-buffer-client-template.h
liblttng-ust/lttng-ring-buffer-metadata-client-template.h
liblttng-ust/lttng-ust-abi.c
liblttng-ust/lttng-ust-statedump.c
liblttng-ust/rculfhash.c
liblttng-ust/rculfhash.h
liblttng-ust/ust-core.c
libringbuffer/backend.h
libringbuffer/backend_internal.h
libringbuffer/frontend.h
libringbuffer/frontend_api.h
libringbuffer/frontend_internal.h
libringbuffer/ring_buffer_backend.c
libringbuffer/ring_buffer_frontend.c
libringbuffer/ringbuffer-config.h
libringbuffer/vatomic.h
tests/benchmark/bench.c
tests/compile/hello.cxx/hello.cpp
tests/compile/hello/hello.c
tests/compile/test-app-ctx/hello.c
tests/unit/libmsgpack/test_msgpack.c

index d28f7788710c9c4afe0e14d5174b38482b9b7861..cdb1e9084848c87d3c96f81affcb0d631c3d3aa4 100644 (file)
@@ -6,7 +6,7 @@
 
 #include "aligner-lib.h"
 
-int main(int argc, char **argv)
+int main(void)
 {
        align_query("molecule-foo");
 
index b0312a4251d474d0f22ca471ab0e7152d1517841..9c7a1d699ef1a38471d4f2935f257d60ab11c3b3 100644 (file)
@@ -7,7 +7,7 @@
 #include "aligner-lib.h"
 #include "tester-lib.h"
 
-int main(int argc, char **argv)
+int main(void)
 {
        /* Generate alignment */
        align_query("moleculeX");
index 01478c2733402c6a8a8986f930ad57ed567c35ef..36509ebc4c3bf3b70a3b812e058cfa8dcdd6093c 100644 (file)
@@ -14,7 +14,7 @@
 #define TRACEPOINT_DEFINE
 #include "sample_component_provider.h"
 
-int main(int argc, char **argv)
+int main(void)
 {
        int i = 0;
 
index 94feb5e5bfdadb1b24cf443fbaf3e7b078537f19..e56c332e79dfd55dc2c194e3d8c9dd7cd527658d 100644 (file)
@@ -8,7 +8,7 @@
 #include <unistd.h>
 
 #include "sample_tracepoint.h"
-int main(int argc, char **argv)
+int main(void)
 {
        int i = 0;
 
index e54b1e1be0e1711d61cbabf8c34b4d2d994900a6..8121d1fef8d3709b51ad3497d949ed595e28fc31 100644 (file)
@@ -21,7 +21,7 @@
 #include "ust_tests_hello.h"
 
 static
-void inthandler(int sig)
+void inthandler(int sig __attribute__((unused)))
 {
        printf("in SIGUSR1 handler\n");
        tracepoint(ust_tests_hello, tptest_sighandler);
index b80a69cfc184351357e9b8e6d2d468a3a2e89a2a..8c9595fd12cf18affff2e8afd24d30ed5b086075 100644 (file)
@@ -116,7 +116,8 @@ static inline
 unsigned int lttng_ust_lib_ring_buffer_align(size_t align_drift, size_t size_of_type)
        lttng_ust_notrace;
 static inline
-unsigned int lttng_ust_lib_ring_buffer_align(size_t align_drift, size_t size_of_type)
+unsigned int lttng_ust_lib_ring_buffer_align(size_t align_drift __attribute__((unused)),
+               size_t size_of_type __attribute__((unused)))
 {
        /*
         * On architectures with efficient unaligned memory access, the content
index fbf963898c53fab3d35414a096243bdff40c6667..10668ecf1be4a9bf862e79795f1b0e2aa32dc8f4 100644 (file)
 #include <urcu/compiler.h>
 #include "counter-types.h"
 
-static inline int lttng_counter_validate_indexes(const struct lib_counter_config *config,
-                                                struct lib_counter *counter,
-                                                const size_t *dimension_indexes)
+static inline int lttng_counter_validate_indexes(
+               const struct lib_counter_config *config __attribute__((unused)),
+               struct lib_counter *counter,
+               const size_t *dimension_indexes)
 {
        size_t nr_dimensions = counter->nr_dimensions, i;
 
@@ -28,9 +29,10 @@ static inline int lttng_counter_validate_indexes(const struct lib_counter_config
 }
 
 
-static inline size_t lttng_counter_get_index(const struct lib_counter_config *config,
-                                            struct lib_counter *counter,
-                                            const size_t *dimension_indexes)
+static inline size_t lttng_counter_get_index(
+               const struct lib_counter_config *config __attribute__((unused)),
+               struct lib_counter *counter,
+               const size_t *dimension_indexes)
 {
        size_t nr_dimensions = counter->nr_dimensions, i;
        size_t index = 0;
index fae7266cde315364ff6ca1d61c47bc666e625392..a825ac95e0020b0814770499b449ba157ec36a38 100644 (file)
@@ -23,8 +23,9 @@ static size_t lttng_counter_get_dimension_nr_elements(struct lib_counter_dimensi
        return dimension->max_nr_elem;
 }
 
-static int lttng_counter_init_stride(const struct lib_counter_config *config,
-                                     struct lib_counter *counter)
+static int lttng_counter_init_stride(
+               const struct lib_counter_config *config __attribute__((unused)),
+               struct lib_counter *counter)
 {
        size_t nr_dimensions = counter->nr_dimensions;
        size_t stride = 1;
@@ -162,7 +163,7 @@ int lttng_counter_set_global_sum_step(struct lib_counter *counter,
 
 static
 int validate_args(const struct lib_counter_config *config,
-       size_t nr_dimensions,
+       size_t nr_dimensions __attribute__((unused)),
        const size_t *max_nr_elem,
        int64_t global_sum_step,
        int global_counter_fd,
index 8141ace369731e3024496f4582e803ebc84c3f9a..998e556977688c832e2c1b3cbd6874cf6911f428 100644 (file)
@@ -698,7 +698,7 @@ error:
 }
 
 int ustcomm_recv_stream_from_sessiond(int sock,
-               uint64_t *memory_map_size,
+               uint64_t *memory_map_size __attribute__((unused)),
                int *shm_fd, int *wakeup_fd)
 {
        ssize_t len;
index e1c9ac7dbd3e269c884c90461e0e863577d32b75..a12e9dd377a008a308e2a9433ca5f370c7d49dd9 100644 (file)
@@ -707,7 +707,8 @@ int ustctl_wait_quiescent(int sock)
        return 0;
 }
 
-int ustctl_calibrate(int sock, struct lttng_ust_abi_calibrate *calibrate)
+int ustctl_calibrate(int sock __attribute__((unused)),
+               struct lttng_ust_abi_calibrate *calibrate)
 {
        if (!calibrate)
                return -EINVAL;
@@ -1809,7 +1810,7 @@ void ustctl_clear_buffer(struct ustctl_consumer_stream *stream)
 
 static
 struct lttng_ust_client_lib_ring_buffer_client_cb *get_client_cb(
-               struct lttng_ust_lib_ring_buffer *buf,
+               struct lttng_ust_lib_ring_buffer *buf __attribute__((unused)),
                struct lttng_ust_lib_ring_buffer_channel *chan)
 {
        const struct lttng_ust_lib_ring_buffer_config *config;
index 2025bd938516f133584203bf1f422bf87d594ed6..bee7ac04d0da2a987cc52bb4b46431fde5a0be8a 100644 (file)
@@ -20,12 +20,12 @@ void __cyg_profile_func_enter(void *this_fn, void *call_site)
 void __cyg_profile_func_exit(void *this_fn, void *call_site)
        __attribute__((no_instrument_function));
 
-void __cyg_profile_func_enter(void *this_fn, void *call_site)
+void __cyg_profile_func_enter(void *this_fn, void *call_site __attribute__((unused)))
 {
        tracepoint(lttng_ust_cyg_profile_fast, func_entry, this_fn);
 }
 
-void __cyg_profile_func_exit(void *this_fn, void *call_site)
+void __cyg_profile_func_exit(void *this_fn, void *call_site __attribute__((unused)))
 {
        tracepoint(lttng_ust_cyg_profile_fast, func_exit, this_fn);
 }
index 95679f5358bd3b8492a3c02a6615285aefd581e6..51b7c8e5f0617c295b1aff129eb35f49113404d0 100644 (file)
@@ -311,7 +311,7 @@ static void get_value_cb(struct lttng_ust_ctx_field *field,
  * so we create and register a corresponding provider on the C side.
  */
 JNIEXPORT jlong JNICALL Java_org_lttng_ust_agent_context_LttngContextApi_registerProvider(JNIEnv *env,
-                                               jobject jobj,
+                                               jobject jobj __attribute__((unused)),
                                                jstring provider_name)
 {
        jboolean iscopy;
@@ -367,8 +367,8 @@ error_jstr:
  * Called from the Java side when an application unregisters a context retriever,
  * so we unregister and delete the corresponding provider on the C side.
  */
-JNIEXPORT void JNICALL Java_org_lttng_ust_agent_context_LttngContextApi_unregisterProvider(JNIEnv *env,
-                                               jobject jobj,
+JNIEXPORT void JNICALL Java_org_lttng_ust_agent_context_LttngContextApi_unregisterProvider(JNIEnv *env __attribute__((unused)),
+                                               jobject jobj __attribute__((unused)),
                                                jlong provider_ref)
 {
        struct lttng_ust_context_provider *provider =
index 84578eecd715d8a1858a146b51793addea07c698..afc9f1119ba68a3c488e2a58a122178bcd65da51 100644 (file)
@@ -18,7 +18,7 @@
  * Deprecated function from before the context information was passed.
  */
 JNIEXPORT void JNICALL Java_org_lttng_ust_agent_jul_LttngJulApi_tracepoint(JNIEnv *env,
-                                               jobject jobj,
+                                               jobject jobj __attribute__((unused)),
                                                jstring msg,
                                                jstring logger_name,
                                                jstring class_name,
@@ -46,7 +46,7 @@ JNIEXPORT void JNICALL Java_org_lttng_ust_agent_jul_LttngJulApi_tracepoint(JNIEn
  * Tracepoint used by Java applications using the JUL handler.
  */
 JNIEXPORT void JNICALL Java_org_lttng_ust_agent_jul_LttngJulApi_tracepointWithContext(JNIEnv *env,
-                                               jobject jobj,
+                                               jobject jobj __attribute__((unused)),
                                                jstring msg,
                                                jstring logger_name,
                                                jstring class_name,
index ff7395c8ce8db8f4102fbdcc15cfc9c5057960fc..e88235a6f56e964091430fb7046a477f3b62f8ea 100644 (file)
@@ -18,7 +18,7 @@
  * Deprecated function from before the context information was passed.
  */
 JNIEXPORT void JNICALL Java_org_lttng_ust_agent_log4j_LttngLog4jApi_tracepoint(JNIEnv *env,
-                                               jobject jobj,
+                                               jobject jobj __attribute__((unused)),
                                                jstring msg,
                                                jstring logger_name,
                                                jstring class_name,
@@ -53,7 +53,7 @@ JNIEXPORT void JNICALL Java_org_lttng_ust_agent_log4j_LttngLog4jApi_tracepoint(J
  * Tracepoint used by Java applications using the log4j handler.
  */
 JNIEXPORT void JNICALL Java_org_lttng_ust_agent_log4j_LttngLog4jApi_tracepointWithContext(JNIEnv *env,
-                                               jobject jobj,
+                                               jobject jobj __attribute__((unused)),
                                                jstring msg,
                                                jstring logger_name,
                                                jstring class_name,
index 64b42f3b22a22f5585c2fb8ae4504ca20340caee..f5e0c96b9c1e59e74e29a51b47577c49d0d15ed6 100644 (file)
@@ -12,7 +12,7 @@
 #include "lttng_ust_java.h"
 
 JNIEXPORT void JNICALL Java_org_lttng_ust_LTTngUst_tracepointInt(JNIEnv *env,
-                                               jobject jobj,
+                                               jobject jobj __attribute__((unused)),
                                                jstring ev_name,
                                                jint payload)
 {
@@ -25,7 +25,7 @@ JNIEXPORT void JNICALL Java_org_lttng_ust_LTTngUst_tracepointInt(JNIEnv *env,
 }
 
 JNIEXPORT void JNICALL Java_org_lttng_ust_LTTngUst_tracepointIntInt(JNIEnv *env,
-                                               jobject jobj,
+                                               jobject jobj __attribute__((unused)),
                                                jstring ev_name,
                                                jint payload1,
                                                jint payload2)
@@ -39,7 +39,7 @@ JNIEXPORT void JNICALL Java_org_lttng_ust_LTTngUst_tracepointIntInt(JNIEnv *env,
 }
 
 JNIEXPORT void JNICALL Java_org_lttng_ust_LTTngUst_tracepointLong(JNIEnv *env,
-                                               jobject jobj,
+                                               jobject jobj  __attribute__((unused)),
                                                jstring ev_name,
                                                jlong payload)
 {
@@ -52,7 +52,7 @@ JNIEXPORT void JNICALL Java_org_lttng_ust_LTTngUst_tracepointLong(JNIEnv *env,
 }
 
 JNIEXPORT void JNICALL Java_org_lttng_ust_LTTngUst_tracepointLongLong(JNIEnv *env,
-                                               jobject jobj,
+                                               jobject jobj  __attribute__((unused)),
                                                jstring ev_name,
                                                jlong payload1,
                                                jlong payload2)
@@ -66,7 +66,7 @@ JNIEXPORT void JNICALL Java_org_lttng_ust_LTTngUst_tracepointLongLong(JNIEnv *en
 }
 
 JNIEXPORT void JNICALL Java_org_lttng_ust_LTTngUst_tracepointString(JNIEnv *env,
-                                               jobject jobj,
+                                               jobject jobj __attribute__((unused)),
                                                jstring ev_name,
                                                jstring payload)
 {
index d407985f58c9d6abd306bd32ba1d3ebddfc885be..e1ff8e807f7a9fb22dc6f783230ce6f1b1693e4f 100644 (file)
@@ -65,7 +65,7 @@ static
 void ust_malloc_spin_lock(pthread_mutex_t *lock)
        __attribute__((unused));
 static
-void ust_malloc_spin_lock(pthread_mutex_t *lock)
+void ust_malloc_spin_lock(pthread_mutex_t *lock __attribute__((unused)))
 {
        /*
         * The memory barrier within cmpxchg takes care of ordering
@@ -80,7 +80,7 @@ static
 void ust_malloc_spin_unlock(pthread_mutex_t *lock)
        __attribute__((unused));
 static
-void ust_malloc_spin_unlock(pthread_mutex_t *lock)
+void ust_malloc_spin_unlock(pthread_mutex_t *lock __attribute__((unused)))
 {
        /*
         * Ensure memory accesses within the critical section do not
@@ -150,7 +150,7 @@ void *static_malloc(size_t size)
 }
 
 static
-void static_free(void *ptr)
+void static_free(void *ptr __attribute__((unused)))
 {
        /* no-op. */
 }
index 4ca1338a1b431519d6a6b1c90f655528981f8a34..56b0688452d35fc502105569e263cd7fff545134 100644 (file)
@@ -57,7 +57,8 @@ size_t get_str_or_seq_len(const struct estack_entry *entry)
 }
 
 static
-int stack_star_glob_match(struct estack *stack, int top, const char *cmp_type)
+int stack_star_glob_match(struct estack *stack, int top,
+               const char *cmp_type __attribute__((unused)))
 {
        const char *pattern;
        const char *candidate;
@@ -83,7 +84,7 @@ int stack_star_glob_match(struct estack *stack, int top, const char *cmp_type)
 }
 
 static
-int stack_strcmp(struct estack *stack, int top, const char *cmp_type)
+int stack_strcmp(struct estack *stack, int top, const char *cmp_type __attribute__((unused)))
 {
        const char *p = estack_bx(stack, top)->u.s.str, *q = estack_ax(stack, top)->u.s.str;
        int ret;
@@ -149,9 +150,10 @@ int stack_strcmp(struct estack *stack, int top, const char *cmp_type)
        return diff;
 }
 
-int lttng_bytecode_interpret_error(struct lttng_ust_bytecode_runtime *bytecode_runtime,
-               const char *stack_data,
-               void *ctx)
+int lttng_bytecode_interpret_error(
+               struct lttng_ust_bytecode_runtime *bytecode_runtime __attribute__((unused)),
+               const char *stack_data __attribute__((unused)),
+               void *ctx __attribute__((unused)))
 {
        return LTTNG_UST_BYTECODE_INTERPRETER_ERROR;
 }
@@ -2511,7 +2513,7 @@ end:
  */
 int lttng_ust_interpret_event_filter(struct lttng_ust_event_common *event,
                const char *interpreter_stack_data,
-               void *event_filter_ctx)
+               void *event_filter_ctx __attribute__((unused)))
 {
        struct lttng_ust_bytecode_runtime *filter_bc_runtime;
        struct cds_list_head *filter_bytecode_runtime_head = &event->priv->filter_bytecode_runtime_head;
index 68b9e008a111144aa6fb77ddf2c908dbc5b7d911..267c5c19635a3ab56fe454ee80357c3fc1b60a7c 100644 (file)
@@ -209,7 +209,8 @@ error_type:
  * (unknown), negative error value on error.
  */
 static
-int bin_op_bitwise_check(struct vstack *stack, bytecode_opcode_t opcode,
+int bin_op_bitwise_check(struct vstack *stack,
+               bytecode_opcode_t opcode __attribute__((unused)),
                const char *str)
 {
        if (unlikely(!vstack_ax(stack) || !vstack_bx(stack)))
@@ -553,7 +554,8 @@ unsigned long delete_all_nodes(struct lttng_ust_lfht *ht)
  * <0: error
  */
 static
-int validate_instruction_context(struct bytecode_runtime *bytecode,
+int validate_instruction_context(
+               struct bytecode_runtime *bytecode __attribute__((unused)),
                struct vstack *stack,
                char *start_pc,
                char *pc)
@@ -1254,7 +1256,7 @@ int validate_instruction_all_contexts(struct bytecode_runtime *bytecode,
  * <0: error
  */
 static
-int exec_insn(struct bytecode_runtime *bytecode,
+int exec_insn(struct bytecode_runtime *bytecode __attribute__((unused)),
                struct lttng_ust_lfht *merge_points,
                struct vstack *stack,
                char **_next_pc,
index 67fb1a0677d0d14c4ebfa910971e59cf3dbca53a..387fc4b97f99441a135874aca0af16711c36d1c3 100644 (file)
@@ -174,7 +174,7 @@ const char *lttng_bytecode_print_op(enum bytecode_op op)
 static
 int apply_field_reloc(const struct lttng_ust_event_desc *event_desc,
                struct bytecode_runtime *runtime,
-               uint32_t runtime_len,
+               uint32_t runtime_len __attribute__((unused)),
                uint32_t reloc_offset,
                const char *field_name,
                enum bytecode_op bytecode_op)
@@ -282,7 +282,7 @@ int apply_field_reloc(const struct lttng_ust_event_desc *event_desc,
 
 static
 int apply_context_reloc(struct bytecode_runtime *runtime,
-               uint32_t runtime_len,
+               uint32_t runtime_len __attribute__((unused)),
                uint32_t reloc_offset,
                const char *context_name,
                enum bytecode_op bytecode_op)
index d25a9b13207f232d263fcdb109db03316b52de6d..51991cc6f4633736fcc10238b9fb098e2e671503 100644 (file)
@@ -91,7 +91,8 @@ void lttng_context_cgroup_ns_reset(void)
 }
 
 static
-size_t cgroup_ns_get_size(struct lttng_ust_ctx_field *field, size_t offset)
+size_t cgroup_ns_get_size(struct lttng_ust_ctx_field *field __attribute__((unused)),
+               size_t offset)
 {
        size_t size = 0;
 
@@ -101,7 +102,7 @@ size_t cgroup_ns_get_size(struct lttng_ust_ctx_field *field, size_t offset)
 }
 
 static
-void cgroup_ns_record(struct lttng_ust_ctx_field *field,
+void cgroup_ns_record(struct lttng_ust_ctx_field *field __attribute__((unused)),
                 struct lttng_ust_lib_ring_buffer_ctx *ctx,
                 struct lttng_ust_channel_buffer *chan)
 {
@@ -113,7 +114,7 @@ void cgroup_ns_record(struct lttng_ust_ctx_field *field,
 }
 
 static
-void cgroup_ns_get_value(struct lttng_ust_ctx_field *field,
+void cgroup_ns_get_value(struct lttng_ust_ctx_field *field __attribute__((unused)),
                struct lttng_ust_ctx_value *value)
 {
        value->u.s64 = get_cgroup_ns();
index b3c64974ed37b43961f0a149b5d782332e44a9ae..9fa4c37165694887d1d00be51d830f8fb5cbd2ae 100644 (file)
@@ -25,7 +25,8 @@
 #include "context-internal.h"
 
 static
-size_t cpu_id_get_size(struct lttng_ust_ctx_field *field, size_t offset)
+size_t cpu_id_get_size(struct lttng_ust_ctx_field *field __attribute__((unused)),
+               size_t offset)
 {
        size_t size = 0;
 
@@ -35,7 +36,7 @@ size_t cpu_id_get_size(struct lttng_ust_ctx_field *field, size_t offset)
 }
 
 static
-void cpu_id_record(struct lttng_ust_ctx_field *field,
+void cpu_id_record(struct lttng_ust_ctx_field *field __attribute__((unused)),
                 struct lttng_ust_lib_ring_buffer_ctx *ctx,
                 struct lttng_ust_channel_buffer *chan)
 {
@@ -46,7 +47,7 @@ void cpu_id_record(struct lttng_ust_ctx_field *field,
 }
 
 static
-void cpu_id_get_value(struct lttng_ust_ctx_field *field,
+void cpu_id_get_value(struct lttng_ust_ctx_field *field __attribute__((unused)),
                struct lttng_ust_ctx_value *value)
 {
        value->u.s64 = lttng_ust_get_cpu();
index 4f4ef632508542911ebbbf0b3aa7271b6ee50159..bdf2f12389af0ba3684f3ffe38a1ee6eacfd2e33 100644 (file)
@@ -18,7 +18,8 @@
 #include "context-internal.h"
 
 static
-size_t ip_get_size(struct lttng_ust_ctx_field *field, size_t offset)
+size_t ip_get_size(struct lttng_ust_ctx_field *field __attribute__((unused)),
+               size_t offset)
 {
        size_t size = 0;
 
@@ -28,7 +29,7 @@ size_t ip_get_size(struct lttng_ust_ctx_field *field, size_t offset)
 }
 
 static
-void ip_record(struct lttng_ust_ctx_field *field,
+void ip_record(struct lttng_ust_ctx_field *field __attribute__((unused)),
                 struct lttng_ust_lib_ring_buffer_ctx *ctx,
                 struct lttng_ust_channel_buffer *chan)
 {
index a08b9a021ec964a0b528b216b87bd65ef13826f2..464887bbd199dad631b11ab9a78709d04ad9a7a4 100644 (file)
@@ -90,7 +90,8 @@ void lttng_context_ipc_ns_reset(void)
 }
 
 static
-size_t ipc_ns_get_size(struct lttng_ust_ctx_field *field, size_t offset)
+size_t ipc_ns_get_size(struct lttng_ust_ctx_field *field __attribute__((unused)),
+               size_t offset)
 {
        size_t size = 0;
 
@@ -100,7 +101,7 @@ size_t ipc_ns_get_size(struct lttng_ust_ctx_field *field, size_t offset)
 }
 
 static
-void ipc_ns_record(struct lttng_ust_ctx_field *field,
+void ipc_ns_record(struct lttng_ust_ctx_field *field __attribute__((unused)),
                 struct lttng_ust_lib_ring_buffer_ctx *ctx,
                 struct lttng_ust_channel_buffer *chan)
 {
@@ -111,7 +112,7 @@ void ipc_ns_record(struct lttng_ust_ctx_field *field,
 }
 
 static
-void ipc_ns_get_value(struct lttng_ust_ctx_field *field,
+void ipc_ns_get_value(struct lttng_ust_ctx_field *field __attribute__((unused)),
                struct lttng_ust_ctx_value *value)
 {
        value->u.s64 = get_ipc_ns();
index 8a2b7e867aee652007160f3275424037720426c6..8d4bdb1debe9acb61b6a715fe4b37eec1b11dce9 100644 (file)
@@ -73,7 +73,8 @@ void lttng_context_mnt_ns_reset(void)
 }
 
 static
-size_t mnt_ns_get_size(struct lttng_ust_ctx_field *field, size_t offset)
+size_t mnt_ns_get_size(struct lttng_ust_ctx_field *field __attribute__((unused)),
+               size_t offset)
 {
        size_t size = 0;
 
@@ -83,7 +84,7 @@ size_t mnt_ns_get_size(struct lttng_ust_ctx_field *field, size_t offset)
 }
 
 static
-void mnt_ns_record(struct lttng_ust_ctx_field *field,
+void mnt_ns_record(struct lttng_ust_ctx_field *field __attribute__((unused)),
                 struct lttng_ust_lib_ring_buffer_ctx *ctx,
                 struct lttng_ust_channel_buffer *chan)
 {
@@ -94,7 +95,7 @@ void mnt_ns_record(struct lttng_ust_ctx_field *field,
 }
 
 static
-void mnt_ns_get_value(struct lttng_ust_ctx_field *field,
+void mnt_ns_get_value(struct lttng_ust_ctx_field *field __attribute__((unused)),
                struct lttng_ust_ctx_value *value)
 {
        value->u.s64 = get_mnt_ns();
index 655759ac06ef25c854c5da1217107fd29b95dd40..004d3978e118fb5c4dc1cf8d82340ad352572897 100644 (file)
@@ -90,7 +90,8 @@ void lttng_context_net_ns_reset(void)
 }
 
 static
-size_t net_ns_get_size(struct lttng_ust_ctx_field *field, size_t offset)
+size_t net_ns_get_size(struct lttng_ust_ctx_field *field __attribute__((unused)),
+               size_t offset)
 {
        size_t size = 0;
 
@@ -100,7 +101,7 @@ size_t net_ns_get_size(struct lttng_ust_ctx_field *field, size_t offset)
 }
 
 static
-void net_ns_record(struct lttng_ust_ctx_field *field,
+void net_ns_record(struct lttng_ust_ctx_field *field __attribute__((unused)),
                 struct lttng_ust_lib_ring_buffer_ctx *ctx,
                 struct lttng_ust_channel_buffer *chan)
 {
@@ -111,7 +112,7 @@ void net_ns_record(struct lttng_ust_ctx_field *field,
 }
 
 static
-void net_ns_get_value(struct lttng_ust_ctx_field *field,
+void net_ns_get_value(struct lttng_ust_ctx_field *field __attribute__((unused)),
                struct lttng_ust_ctx_value *value)
 {
        value->u.s64 = get_net_ns();
index 94f4e95d4589bf8bb798af3a07fa7478e1e88c96..dac953ffe961852dc21ce01cf85c3f7c66431929 100644 (file)
@@ -158,7 +158,8 @@ void lttng_perf_unlock(void)
 }
 
 static
-size_t perf_counter_get_size(struct lttng_ust_ctx_field *field, size_t offset)
+size_t perf_counter_get_size(struct lttng_ust_ctx_field *field __attribute__((unused)),
+               size_t offset)
 {
        size_t size = 0;
 
index 21dae9a83b47ceba6d7d1a712ef1e91e7dd8e566..10b0c1b292429b270190072ef512a21bc2287920 100644 (file)
@@ -76,7 +76,8 @@ void lttng_context_pid_ns_reset(void)
 }
 
 static
-size_t pid_ns_get_size(struct lttng_ust_ctx_field *field, size_t offset)
+size_t pid_ns_get_size(struct lttng_ust_ctx_field *field __attribute__((unused)),
+               size_t offset)
 {
        size_t size = 0;
 
@@ -86,7 +87,7 @@ size_t pid_ns_get_size(struct lttng_ust_ctx_field *field, size_t offset)
 }
 
 static
-void pid_ns_record(struct lttng_ust_ctx_field *field,
+void pid_ns_record(struct lttng_ust_ctx_field *field __attribute__((unused)),
                 struct lttng_ust_lib_ring_buffer_ctx *ctx,
                 struct lttng_ust_channel_buffer *chan)
 {
@@ -97,7 +98,7 @@ void pid_ns_record(struct lttng_ust_ctx_field *field,
 }
 
 static
-void pid_ns_get_value(struct lttng_ust_ctx_field *field,
+void pid_ns_get_value(struct lttng_ust_ctx_field *field __attribute__((unused)),
                struct lttng_ust_ctx_value *value)
 {
        value->u.s64 = get_pid_ns();
index 53c42d9eb67e79325e1e23280335c8af66d8447a..0edde6e8f4bbe07cf8636a36a3df45bc443dc7b3 100644 (file)
@@ -66,13 +66,14 @@ void lttng_ust_context_procname_reset(void)
 }
 
 static
-size_t procname_get_size(struct lttng_ust_ctx_field *field, size_t offset)
+size_t procname_get_size(struct lttng_ust_ctx_field *field __attribute__((unused)),
+               size_t offset __attribute__((unused)))
 {
        return LTTNG_UST_ABI_PROCNAME_LEN;
 }
 
 static
-void procname_record(struct lttng_ust_ctx_field *field,
+void procname_record(struct lttng_ust_ctx_field *field __attribute__((unused)),
                 struct lttng_ust_lib_ring_buffer_ctx *ctx,
                 struct lttng_ust_channel_buffer *chan)
 {
@@ -83,7 +84,7 @@ void procname_record(struct lttng_ust_ctx_field *field,
 }
 
 static
-void procname_get_value(struct lttng_ust_ctx_field *field,
+void procname_get_value(struct lttng_ust_ctx_field *field __attribute__((unused)),
                struct lttng_ust_ctx_value *value)
 {
        value->u.str = wrapper_getprocname();
index b6aa547062425689469c9bd1dd2eb63f80ab1de6..a032b26ab7f57e1dee47f430cdf1f12931b7b9fb 100644 (file)
@@ -17,7 +17,8 @@
 #include "context-internal.h"
 
 static
-size_t pthread_id_get_size(struct lttng_ust_ctx_field *field, size_t offset)
+size_t pthread_id_get_size(struct lttng_ust_ctx_field *field __attribute__((unused)),
+               size_t offset)
 {
        size_t size = 0;
 
@@ -27,7 +28,7 @@ size_t pthread_id_get_size(struct lttng_ust_ctx_field *field, size_t offset)
 }
 
 static
-void pthread_id_record(struct lttng_ust_ctx_field *field,
+void pthread_id_record(struct lttng_ust_ctx_field *field __attribute__((unused)),
                 struct lttng_ust_lib_ring_buffer_ctx *ctx,
                 struct lttng_ust_channel_buffer *chan)
 {
@@ -38,7 +39,7 @@ void pthread_id_record(struct lttng_ust_ctx_field *field,
 }
 
 static
-void pthread_id_get_value(struct lttng_ust_ctx_field *field,
+void pthread_id_get_value(struct lttng_ust_ctx_field *field __attribute__((unused)),
                struct lttng_ust_ctx_value *value)
 {
        value->u.s64 = (unsigned long) pthread_self();
index b9d07d0861adc0f4aa98257c0fe83d2eb75fac84..a8a30df8fea2349e2d46d3263d16adf267643370 100644 (file)
@@ -89,7 +89,8 @@ void lttng_context_time_ns_reset(void)
 }
 
 static
-size_t time_ns_get_size(struct lttng_ust_ctx_field *field, size_t offset)
+size_t time_ns_get_size(struct lttng_ust_ctx_field *field __attribute__((unused)),
+               size_t offset)
 {
        size_t size = 0;
 
@@ -99,7 +100,7 @@ size_t time_ns_get_size(struct lttng_ust_ctx_field *field, size_t offset)
 }
 
 static
-void time_ns_record(struct lttng_ust_ctx_field *field,
+void time_ns_record(struct lttng_ust_ctx_field *field __attribute__((unused)),
                 struct lttng_ust_lib_ring_buffer_ctx *ctx,
                 struct lttng_ust_channel_buffer *chan)
 {
@@ -110,7 +111,7 @@ void time_ns_record(struct lttng_ust_ctx_field *field,
 }
 
 static
-void time_ns_get_value(struct lttng_ust_ctx_field *field,
+void time_ns_get_value(struct lttng_ust_ctx_field *field __attribute__((unused)),
                struct lttng_ust_ctx_value *value)
 {
        value->u.s64 = get_time_ns();
index f42ac0791edcfded382870c2adc63b0fd3720e8e..53303d0f4305311b47f2c2be43d37e5467a3852d 100644 (file)
@@ -73,7 +73,8 @@ void lttng_context_user_ns_reset(void)
 }
 
 static
-size_t user_ns_get_size(struct lttng_ust_ctx_field *field, size_t offset)
+size_t user_ns_get_size(struct lttng_ust_ctx_field *field __attribute__((unused)),
+               size_t offset)
 {
        size_t size = 0;
 
@@ -83,7 +84,7 @@ size_t user_ns_get_size(struct lttng_ust_ctx_field *field, size_t offset)
 }
 
 static
-void user_ns_record(struct lttng_ust_ctx_field *field,
+void user_ns_record(struct lttng_ust_ctx_field *field __attribute__((unused)),
                 struct lttng_ust_lib_ring_buffer_ctx *ctx,
                 struct lttng_ust_channel_buffer *chan)
 {
@@ -94,7 +95,7 @@ void user_ns_record(struct lttng_ust_ctx_field *field,
 }
 
 static
-void user_ns_get_value(struct lttng_ust_ctx_field *field,
+void user_ns_get_value(struct lttng_ust_ctx_field *field __attribute__((unused)),
                struct lttng_ust_ctx_value *value)
 {
        value->u.s64 = get_user_ns();
index f8b0bd8c33b07a1eccf0e8d5ea78e560e41a2a66..5ac0205fc530faaccde4847989757ae2e5cc050a 100644 (file)
@@ -91,7 +91,8 @@ void lttng_context_uts_ns_reset(void)
 }
 
 static
-size_t uts_ns_get_size(struct lttng_ust_ctx_field *field, size_t offset)
+size_t uts_ns_get_size(struct lttng_ust_ctx_field *field __attribute__((unused)),
+               size_t offset)
 {
        size_t size = 0;
 
@@ -101,7 +102,7 @@ size_t uts_ns_get_size(struct lttng_ust_ctx_field *field, size_t offset)
 }
 
 static
-void uts_ns_record(struct lttng_ust_ctx_field *field,
+void uts_ns_record(struct lttng_ust_ctx_field *field __attribute__((unused)),
                 struct lttng_ust_lib_ring_buffer_ctx *ctx,
                 struct lttng_ust_channel_buffer *chan)
 {
@@ -112,7 +113,7 @@ void uts_ns_record(struct lttng_ust_ctx_field *field,
 }
 
 static
-void uts_ns_get_value(struct lttng_ust_ctx_field *field,
+void uts_ns_get_value(struct lttng_ust_ctx_field *field __attribute__((unused)),
                struct lttng_ust_ctx_value *value)
 {
        value->u.s64 = get_uts_ns();
index a6306f3c6e1865064d8984add57eda810b2fb2ba..6b7d06981012097663b410c5a96ba5aded0e12f5 100644 (file)
@@ -62,7 +62,8 @@ void lttng_context_vegid_reset(void)
 }
 
 static
-size_t vegid_get_size(struct lttng_ust_ctx_field *field, size_t offset)
+size_t vegid_get_size(struct lttng_ust_ctx_field *field __attribute__((unused)),
+               size_t offset)
 {
        size_t size = 0;
 
@@ -72,7 +73,7 @@ size_t vegid_get_size(struct lttng_ust_ctx_field *field, size_t offset)
 }
 
 static
-void vegid_record(struct lttng_ust_ctx_field *field,
+void vegid_record(struct lttng_ust_ctx_field *field __attribute__((unused)),
                 struct lttng_ust_lib_ring_buffer_ctx *ctx,
                 struct lttng_ust_channel_buffer *chan)
 {
@@ -83,7 +84,7 @@ void vegid_record(struct lttng_ust_ctx_field *field,
 }
 
 static
-void vegid_get_value(struct lttng_ust_ctx_field *field,
+void vegid_get_value(struct lttng_ust_ctx_field *field __attribute__((unused)),
                struct lttng_ust_ctx_value *value)
 {
        value->u.s64 = get_vegid();
index d5ef5199498ba28c6914d606d18fb816cd50b445..506422e93b8785a722b1ca03c869966b12f69de8 100644 (file)
@@ -62,7 +62,8 @@ void lttng_context_veuid_reset(void)
 }
 
 static
-size_t veuid_get_size(struct lttng_ust_ctx_field *field, size_t offset)
+size_t veuid_get_size(struct lttng_ust_ctx_field *field __attribute__((unused)),
+               size_t offset)
 {
        size_t size = 0;
 
@@ -72,7 +73,7 @@ size_t veuid_get_size(struct lttng_ust_ctx_field *field, size_t offset)
 }
 
 static
-void veuid_record(struct lttng_ust_ctx_field *field,
+void veuid_record(struct lttng_ust_ctx_field *field __attribute__((unused)),
                 struct lttng_ust_lib_ring_buffer_ctx *ctx,
                 struct lttng_ust_channel_buffer *chan)
 {
@@ -83,7 +84,7 @@ void veuid_record(struct lttng_ust_ctx_field *field,
 }
 
 static
-void veuid_get_value(struct lttng_ust_ctx_field *field,
+void veuid_get_value(struct lttng_ust_ctx_field *field __attribute__((unused)),
                struct lttng_ust_ctx_value *value)
 {
        value->u.s64 = get_veuid();
index 78316139c7d2dc9c2c36eed0141ad9e755989caf..17026112948968fe3edb0fb64c24e5e2f7f96a2a 100644 (file)
@@ -62,7 +62,8 @@ void lttng_context_vgid_reset(void)
 }
 
 static
-size_t vgid_get_size(struct lttng_ust_ctx_field *field, size_t offset)
+size_t vgid_get_size(struct lttng_ust_ctx_field *field __attribute__((unused)),
+               size_t offset)
 {
        size_t size = 0;
 
@@ -72,7 +73,7 @@ size_t vgid_get_size(struct lttng_ust_ctx_field *field, size_t offset)
 }
 
 static
-void vgid_record(struct lttng_ust_ctx_field *field,
+void vgid_record(struct lttng_ust_ctx_field *field __attribute__((unused)),
                 struct lttng_ust_lib_ring_buffer_ctx *ctx,
                 struct lttng_ust_channel_buffer *chan)
 {
@@ -83,7 +84,7 @@ void vgid_record(struct lttng_ust_ctx_field *field,
 }
 
 static
-void vgid_get_value(struct lttng_ust_ctx_field *field,
+void vgid_get_value(struct lttng_ust_ctx_field *field __attribute__((unused)),
                struct lttng_ust_ctx_value *value)
 {
        value->u.s64 = get_vgid();
index 436859600260dead1b9fc6b6505a7fd973892abb..9f20d8cb17c832c1d93b23a0c8d819e7d14fd63d 100644 (file)
@@ -46,7 +46,8 @@ void lttng_context_vpid_reset(void)
 }
 
 static
-size_t vpid_get_size(struct lttng_ust_ctx_field *field, size_t offset)
+size_t vpid_get_size(struct lttng_ust_ctx_field *field __attribute__((unused)),
+               size_t offset)
 {
        size_t size = 0;
 
@@ -56,7 +57,7 @@ size_t vpid_get_size(struct lttng_ust_ctx_field *field, size_t offset)
 }
 
 static
-void vpid_record(struct lttng_ust_ctx_field *field,
+void vpid_record(struct lttng_ust_ctx_field *field __attribute__((unused)),
                 struct lttng_ust_lib_ring_buffer_ctx *ctx,
                 struct lttng_ust_channel_buffer *chan)
 {
@@ -66,7 +67,7 @@ void vpid_record(struct lttng_ust_ctx_field *field,
 }
 
 static
-void vpid_get_value(struct lttng_ust_ctx_field *field,
+void vpid_get_value(struct lttng_ust_ctx_field *field __attribute__((unused)),
                struct lttng_ust_ctx_value *value)
 {
        value->u.s64 = wrapper_getvpid();
index d2ac2a709c98db889ac7be85a376a72c4c4ceb23..387e931bed2c763b5b8d7075c9d12c3d8c89586e 100644 (file)
@@ -66,7 +66,8 @@ void lttng_context_vsgid_reset(void)
 }
 
 static
-size_t vsgid_get_size(struct lttng_ust_ctx_field *field, size_t offset)
+size_t vsgid_get_size(struct lttng_ust_ctx_field *field __attribute__((unused)),
+               size_t offset)
 {
        size_t size = 0;
 
@@ -76,7 +77,7 @@ size_t vsgid_get_size(struct lttng_ust_ctx_field *field, size_t offset)
 }
 
 static
-void vsgid_record(struct lttng_ust_ctx_field *field,
+void vsgid_record(struct lttng_ust_ctx_field *field __attribute__((unused)),
                 struct lttng_ust_lib_ring_buffer_ctx *ctx,
                 struct lttng_ust_channel_buffer *chan)
 {
@@ -87,7 +88,7 @@ void vsgid_record(struct lttng_ust_ctx_field *field,
 }
 
 static
-void vsgid_get_value(struct lttng_ust_ctx_field *field,
+void vsgid_get_value(struct lttng_ust_ctx_field *field __attribute__((unused)),
                struct lttng_ust_ctx_value *value)
 {
        value->u.s64 = get_vsgid();
index ff58a7412fde49fee1935ca1ff0bd0c4eae4717f..f1fe8e211087c6ab902003f539d23b7c80cfa255 100644 (file)
@@ -66,7 +66,8 @@ void lttng_context_vsuid_reset(void)
 }
 
 static
-size_t vsuid_get_size(struct lttng_ust_ctx_field *field, size_t offset)
+size_t vsuid_get_size(struct lttng_ust_ctx_field *field __attribute__((unused)),
+               size_t offset)
 {
        size_t size = 0;
 
@@ -76,7 +77,7 @@ size_t vsuid_get_size(struct lttng_ust_ctx_field *field, size_t offset)
 }
 
 static
-void vsuid_record(struct lttng_ust_ctx_field *field,
+void vsuid_record(struct lttng_ust_ctx_field *field __attribute__((unused)),
                 struct lttng_ust_lib_ring_buffer_ctx *ctx,
                 struct lttng_ust_channel_buffer *chan)
 {
@@ -87,7 +88,7 @@ void vsuid_record(struct lttng_ust_ctx_field *field,
 }
 
 static
-void vsuid_get_value(struct lttng_ust_ctx_field *field,
+void vsuid_get_value(struct lttng_ust_ctx_field *field __attribute__((unused)),
                struct lttng_ust_ctx_value *value)
 {
        value->u.s64 = get_vsuid();
index 297d8025a552726a286bcff18d442c004afd0dbc..a7e7679b98c7babe6580ff488184cb122240740c 100644 (file)
@@ -37,7 +37,8 @@ void lttng_context_vtid_reset(void)
 }
 
 static
-size_t vtid_get_size(struct lttng_ust_ctx_field *field, size_t offset)
+size_t vtid_get_size(struct lttng_ust_ctx_field *field __attribute__((unused)),
+               size_t offset)
 {
        size_t size = 0;
 
@@ -60,7 +61,7 @@ pid_t wrapper_getvtid(void)
 }
 
 static
-void vtid_record(struct lttng_ust_ctx_field *field,
+void vtid_record(struct lttng_ust_ctx_field *field __attribute__((unused)),
                 struct lttng_ust_lib_ring_buffer_ctx *ctx,
                 struct lttng_ust_channel_buffer *chan)
 {
@@ -70,7 +71,7 @@ void vtid_record(struct lttng_ust_ctx_field *field,
 }
 
 static
-void vtid_get_value(struct lttng_ust_ctx_field *field,
+void vtid_get_value(struct lttng_ust_ctx_field *field __attribute__((unused)),
                struct lttng_ust_ctx_value *value)
 {
        value->u.s64 = wrapper_getvtid();
index 0e05fc4f1d8422404eddee187185a1e33f7c21a5..d945e309ce46dabb17f18e86ed8d933d671eb060 100644 (file)
@@ -62,7 +62,8 @@ void lttng_context_vuid_reset(void)
 }
 
 static
-size_t vuid_get_size(struct lttng_ust_ctx_field *field, size_t offset)
+size_t vuid_get_size(struct lttng_ust_ctx_field *field __attribute__((unused)),
+               size_t offset)
 {
        size_t size = 0;
 
@@ -72,7 +73,7 @@ size_t vuid_get_size(struct lttng_ust_ctx_field *field, size_t offset)
 }
 
 static
-void vuid_record(struct lttng_ust_ctx_field *field,
+void vuid_record(struct lttng_ust_ctx_field *field __attribute__((unused)),
                 struct lttng_ust_lib_ring_buffer_ctx *ctx,
                 struct lttng_ust_channel_buffer *chan)
 {
@@ -83,7 +84,7 @@ void vuid_record(struct lttng_ust_ctx_field *field,
 }
 
 static
-void vuid_get_value(struct lttng_ust_ctx_field *field,
+void vuid_get_value(struct lttng_ust_ctx_field *field __attribute__((unused)),
                struct lttng_ust_ctx_value *value)
 {
        value->u.s64 = get_vuid();
index d411dcf1594185f4552266a91b50c3031fb48095..16fb9f44634a8d8be330cbe58f23003f90d9836e 100644 (file)
@@ -1654,8 +1654,9 @@ int lttng_attach_context(struct lttng_ust_abi_context *context_param,
        }
 }
 
-int lttng_event_enabler_attach_context(struct lttng_event_enabler *enabler,
-               struct lttng_ust_abi_context *context_param)
+int lttng_event_enabler_attach_context(
+               struct lttng_event_enabler *enabler __attribute__((unused)),
+               struct lttng_ust_abi_context *context_param __attribute__((unused)))
 {
        return -ENOSYS;
 }
index dfc98ceeff8c4bc5044b35c771ef31043c985b92..d4f25fccf7ecdb64b8d6bb8b9ee512bed9cc6a01 100644 (file)
@@ -83,7 +83,8 @@ void RING_BUFFER_MODE_TEMPLATE_TLS_FIXUP(void)
        asm volatile ("" : : "m" (URCU_TLS(private_ctx_stack)));
 }
 
-static inline uint64_t lib_ring_buffer_clock_read(struct lttng_ust_lib_ring_buffer_channel *chan)
+static inline uint64_t lib_ring_buffer_clock_read(
+               struct lttng_ust_lib_ring_buffer_channel *chan __attribute__((unused)))
 {
        return trace_clock_read64();
 }
@@ -184,12 +185,13 @@ void ctx_record(struct lttng_ust_lib_ring_buffer_ctx *bufctx,
  * contains.
  */
 static __inline__
-size_t record_header_size(const struct lttng_ust_lib_ring_buffer_config *config,
-                                struct lttng_ust_lib_ring_buffer_channel *chan,
-                                size_t offset,
-                                size_t *pre_header_padding,
-                                struct lttng_ust_lib_ring_buffer_ctx *ctx,
-                                struct lttng_client_ctx *client_ctx)
+size_t record_header_size(
+               const struct lttng_ust_lib_ring_buffer_config *config __attribute__((unused)),
+               struct lttng_ust_lib_ring_buffer_channel *chan,
+               size_t offset,
+               size_t *pre_header_padding,
+               struct lttng_ust_lib_ring_buffer_ctx *ctx,
+               struct lttng_client_ctx *client_ctx)
 {
        struct lttng_ust_channel_buffer *lttng_chan = channel_get_private(chan);
        size_t orig_offset = offset;
@@ -467,25 +469,35 @@ static void client_buffer_end(struct lttng_ust_lib_ring_buffer *buf, uint64_t ts
        header->ctx.events_discarded = records_lost;
 }
 
-static int client_buffer_create(struct lttng_ust_lib_ring_buffer *buf, void *priv,
-                               int cpu, const char *name, struct lttng_ust_shm_handle *handle)
+static int client_buffer_create(
+               struct lttng_ust_lib_ring_buffer *buf __attribute__((unused)),
+               void *priv __attribute__((unused)),
+               int cpu __attribute__((unused)),
+               const char *name __attribute__((unused)),
+               struct lttng_ust_shm_handle *handle __attribute__((unused)))
 {
        return 0;
 }
 
-static void client_buffer_finalize(struct lttng_ust_lib_ring_buffer *buf, void *priv, int cpu, struct lttng_ust_shm_handle *handle)
+static void client_buffer_finalize(
+               struct lttng_ust_lib_ring_buffer *buf __attribute__((unused)),
+               void *priv __attribute__((unused)),
+               int cpu __attribute__((unused)),
+               struct lttng_ust_shm_handle *handle __attribute__((unused)))
 {
 }
 
-static void client_content_size_field(const struct lttng_ust_lib_ring_buffer_config *config,
-                                     size_t *offset, size_t *length)
+static void client_content_size_field(
+               const struct lttng_ust_lib_ring_buffer_config *config __attribute__((unused)),
+               size_t *offset, size_t *length)
 {
        *offset = offsetof(struct packet_header, ctx.content_size);
        *length = sizeof(((struct packet_header *) NULL)->ctx.content_size);
 }
 
-static void client_packet_size_field(const struct lttng_ust_lib_ring_buffer_config *config,
-                                     size_t *offset, size_t *length)
+static void client_packet_size_field(
+               const struct lttng_ust_lib_ring_buffer_config *config __attribute__((unused)),
+               size_t *offset, size_t *length)
 {
        *offset = offsetof(struct packet_header, ctx.packet_size);
        *length = sizeof(((struct packet_header *) NULL)->ctx.packet_size);
@@ -567,7 +579,7 @@ static int client_packet_size(struct lttng_ust_lib_ring_buffer *buf,
        return 0;
 }
 
-static int client_stream_id(struct lttng_ust_lib_ring_buffer *buf,
+static int client_stream_id(struct lttng_ust_lib_ring_buffer *buf __attribute__((unused)),
                struct lttng_ust_lib_ring_buffer_channel *chan,
                uint64_t *stream_id)
 {
@@ -578,7 +590,8 @@ static int client_stream_id(struct lttng_ust_lib_ring_buffer *buf,
        return 0;
 }
 
-static int client_current_timestamp(struct lttng_ust_lib_ring_buffer *buf,
+static int client_current_timestamp(
+               struct lttng_ust_lib_ring_buffer *buf  __attribute__((unused)),
                struct lttng_ust_lib_ring_buffer_channel *chan,
                uint64_t *ts)
 {
@@ -602,7 +615,7 @@ static int client_sequence_number(struct lttng_ust_lib_ring_buffer *buf,
 }
 
 static int client_instance_id(struct lttng_ust_lib_ring_buffer *buf,
-               struct lttng_ust_lib_ring_buffer_channel *chan,
+               struct lttng_ust_lib_ring_buffer_channel *chan __attribute__((unused)),
                uint64_t *id)
 {
        *id = buf->backend.cpu;
index f4d1362a6e9b95303349483a574842815a96ed77..fe080dca99cdb92b890687c8055ed42ad64bf1e7 100644 (file)
@@ -40,18 +40,20 @@ static const struct lttng_ust_lib_ring_buffer_config client_config;
 /* No nested use supported for metadata ring buffer. */
 static DEFINE_URCU_TLS(struct lttng_ust_lib_ring_buffer_ctx_private, private_ctx);
 
-static inline uint64_t lib_ring_buffer_clock_read(struct lttng_ust_lib_ring_buffer_channel *chan)
+static inline uint64_t lib_ring_buffer_clock_read(
+               struct lttng_ust_lib_ring_buffer_channel *chan __attribute__((unused)))
 {
        return 0;
 }
 
 static inline
-size_t record_header_size(const struct lttng_ust_lib_ring_buffer_config *config,
-                                struct lttng_ust_lib_ring_buffer_channel *chan,
-                                size_t offset,
-                                size_t *pre_header_padding,
-                                struct lttng_ust_lib_ring_buffer_ctx *ctx,
-                                void *client_ctx)
+size_t record_header_size(
+               const struct lttng_ust_lib_ring_buffer_config *config __attribute__((unused)),
+               struct lttng_ust_lib_ring_buffer_channel *chan __attribute__((unused)),
+               size_t offset __attribute__((unused)),
+               size_t *pre_header_padding __attribute__((unused)),
+               struct lttng_ust_lib_ring_buffer_ctx *ctx __attribute__((unused)),
+               void *client_ctx __attribute__((unused)))
 {
        return 0;
 }
@@ -59,18 +61,20 @@ size_t record_header_size(const struct lttng_ust_lib_ring_buffer_config *config,
 #include "../libringbuffer/api.h"
 #include "lttng-rb-clients.h"
 
-static uint64_t client_ring_buffer_clock_read(struct lttng_ust_lib_ring_buffer_channel *chan)
+static uint64_t client_ring_buffer_clock_read(
+               struct lttng_ust_lib_ring_buffer_channel *chan __attribute__((unused)))
 {
        return 0;
 }
 
 static
-size_t client_record_header_size(const struct lttng_ust_lib_ring_buffer_config *config,
-                                struct lttng_ust_lib_ring_buffer_channel *chan,
-                                size_t offset,
-                                size_t *pre_header_padding,
-                                struct lttng_ust_lib_ring_buffer_ctx *ctx,
-                                void *client_ctx)
+size_t client_record_header_size(
+               const struct lttng_ust_lib_ring_buffer_config *config __attribute__((unused)),
+               struct lttng_ust_lib_ring_buffer_channel *chan __attribute__((unused)),
+               size_t offset __attribute__((unused)),
+               size_t *pre_header_padding __attribute__((unused)),
+               struct lttng_ust_lib_ring_buffer_ctx *ctx __attribute__((unused)),
+               void *client_ctx __attribute__((unused)))
 {
        return 0;
 }
@@ -87,9 +91,10 @@ static size_t client_packet_header_size(void)
        return offsetof(struct metadata_packet_header, header_end);
 }
 
-static void client_buffer_begin(struct lttng_ust_lib_ring_buffer *buf, uint64_t tsc,
-                               unsigned int subbuf_idx,
-                               struct lttng_ust_shm_handle *handle)
+static void client_buffer_begin(struct lttng_ust_lib_ring_buffer *buf,
+               uint64_t tsc __attribute__((unused)),
+               unsigned int subbuf_idx,
+               struct lttng_ust_shm_handle *handle)
 {
        struct lttng_ust_lib_ring_buffer_channel *chan = shmp(handle, buf->backend.chan);
        struct metadata_packet_header *header =
@@ -118,9 +123,10 @@ static void client_buffer_begin(struct lttng_ust_lib_ring_buffer *buf, uint64_t
  * offset is assumed to never be 0 here : never deliver a completely empty
  * subbuffer. data_size is between 1 and subbuf_size.
  */
-static void client_buffer_end(struct lttng_ust_lib_ring_buffer *buf, uint64_t tsc,
-                             unsigned int subbuf_idx, unsigned long data_size,
-                             struct lttng_ust_shm_handle *handle)
+static void client_buffer_end(struct lttng_ust_lib_ring_buffer *buf,
+               uint64_t tsc  __attribute__((unused)),
+               unsigned int subbuf_idx, unsigned long data_size,
+               struct lttng_ust_shm_handle *handle)
 {
        struct lttng_ust_lib_ring_buffer_channel *chan = shmp(handle, buf->backend.chan);
        struct metadata_packet_header *header =
@@ -145,16 +151,21 @@ static void client_buffer_end(struct lttng_ust_lib_ring_buffer *buf, uint64_t ts
        WARN_ON_ONCE(records_lost != 0);
 }
 
-static int client_buffer_create(struct lttng_ust_lib_ring_buffer *buf, void *priv,
-                               int cpu, const char *name,
-                               struct lttng_ust_shm_handle *handle)
+static int client_buffer_create(
+               struct lttng_ust_lib_ring_buffer *buf __attribute__((unused)),
+               void *priv __attribute__((unused)),
+               int cpu __attribute__((unused)),
+               const char *name __attribute__((unused)),
+               struct lttng_ust_shm_handle *handle __attribute__((unused)))
 {
        return 0;
 }
 
-static void client_buffer_finalize(struct lttng_ust_lib_ring_buffer *buf,
-                                  void *priv, int cpu,
-                                  struct lttng_ust_shm_handle *handle)
+static void client_buffer_finalize(
+               struct lttng_ust_lib_ring_buffer *buf __attribute__((unused)),
+               void *priv __attribute__((unused)),
+               int cpu __attribute__((unused)),
+               struct lttng_ust_shm_handle *handle __attribute__((unused)))
 {
 }
 
index b399722515c57b7b5a7c4e8ce6f32d034a37de53..61105ace6dccd9d83e00865454e7580252b21199 100644 (file)
@@ -323,7 +323,7 @@ objd_error:
 }
 
 static
-long lttng_abi_tracer_version(int objd,
+long lttng_abi_tracer_version(int objd __attribute__((unused)),
        struct lttng_ust_abi_tracer_version *v)
 {
        v->major = LTTNG_UST_MAJOR_VERSION;
@@ -377,7 +377,7 @@ fd_error:
 }
 
 static
-long lttng_abi_add_context(int objd,
+long lttng_abi_add_context(int objd __attribute__((unused)),
        struct lttng_ust_abi_context *context_param,
        union lttng_ust_abi_args *uargs,
        struct lttng_ust_ctx **ctx, struct lttng_ust_session *session)
@@ -714,7 +714,8 @@ objd_error:
 
 static
 long lttng_event_notifier_enabler_cmd(int objd, unsigned int cmd, unsigned long arg,
-               union lttng_ust_abi_args *uargs, void *owner)
+               union lttng_ust_abi_args *uargs __attribute__((unused)),
+               void *owner __attribute__((unused)))
 {
        struct lttng_event_notifier_enabler *event_notifier_enabler = objd_private(objd);
        switch (cmd) {
@@ -755,7 +756,7 @@ long lttng_event_notifier_enabler_cmd(int objd, unsigned int cmd, unsigned long
  */
 static
 long lttng_event_notifier_group_error_counter_cmd(int objd, unsigned int cmd, unsigned long arg,
-       union lttng_ust_abi_args *uargs, void *owner)
+       union lttng_ust_abi_args *uargs, void *owner __attribute__((unused)))
 {
        int ret;
        struct lttng_counter *counter = objd_private(objd);
@@ -956,7 +957,8 @@ static const struct lttng_ust_abi_objd_ops lttng_event_notifier_group_ops = {
 
 static
 long lttng_tracepoint_list_cmd(int objd, unsigned int cmd, unsigned long arg,
-       union lttng_ust_abi_args *uargs, void *owner)
+       union lttng_ust_abi_args *uargs __attribute__((unused)),
+       void *owner __attribute__((unused)))
 {
        struct lttng_ust_tracepoint_list *list = objd_private(objd);
        struct lttng_ust_abi_tracepoint_iter *tp =
@@ -1036,7 +1038,8 @@ static const struct lttng_ust_abi_objd_ops lttng_tracepoint_list_ops = {
 
 static
 long lttng_tracepoint_field_list_cmd(int objd, unsigned int cmd,
-       unsigned long arg, union lttng_ust_abi_args *uargs, void *owner)
+       unsigned long arg __attribute__((unused)), union lttng_ust_abi_args *uargs,
+       void *owner __attribute__((unused)))
 {
        struct lttng_ust_field_list *list = objd_private(objd);
        struct lttng_ust_abi_field_iter *tp = &uargs->field_list.entry;
@@ -1116,7 +1119,7 @@ static const struct lttng_ust_abi_objd_ops lttng_tracepoint_field_list_ops = {
 
 static
 int lttng_abi_map_stream(int channel_objd, struct lttng_ust_abi_stream *info,
-               union lttng_ust_abi_args *uargs, void *owner)
+               union lttng_ust_abi_args *uargs, void *owner __attribute__((unused)))
 {
        struct lttng_ust_channel_buffer *lttng_chan_buf = objd_private(channel_objd);
        int ret;
@@ -1297,7 +1300,8 @@ static const struct lttng_ust_abi_objd_ops lttng_channel_ops = {
  */
 static
 long lttng_event_enabler_cmd(int objd, unsigned int cmd, unsigned long arg,
-       union lttng_ust_abi_args *uargs, void *owner)
+       union lttng_ust_abi_args *uargs __attribute__((unused)),
+       void *owner __attribute__((unused)))
 {
        struct lttng_event_enabler *enabler = objd_private(objd);
 
index 98b80b35fa3a343fd85d3d6d854e61fa2eadb66f..eaee338a79d5b740591f015e58bd63c81dd22434 100644 (file)
@@ -243,13 +243,13 @@ void procname_cb(struct lttng_ust_session *session, void *priv)
 }
 
 static
-void trace_start_cb(struct lttng_ust_session *session, void *priv)
+void trace_start_cb(struct lttng_ust_session *session, void *priv __attribute__((unused)))
 {
        tracepoint(lttng_ust_statedump, start, session);
 }
 
 static
-void trace_end_cb(struct lttng_ust_session *session, void *priv)
+void trace_end_cb(struct lttng_ust_session *session, void *priv __attribute__((unused)))
 {
        tracepoint(lttng_ust_statedump, end, session);
 }
@@ -444,7 +444,7 @@ end:
 }
 
 static
-int extract_bin_info_events(struct dl_phdr_info *info, size_t size, void *_data)
+int extract_bin_info_events(struct dl_phdr_info *info, size_t size __attribute__((unused)), void *_data)
 {
        int j, ret = 0;
        struct dl_iterate_data *data = _data;
index efdb5e70ef684d37dbad74af3df3d22820c10f1f..de90d71051133d129fd39cfeab927a6aa3bb8b1a 100644 (file)
@@ -334,7 +334,8 @@ void lttng_ust_lfht_iter_debug_set_ht(struct lttng_ust_lfht *ht, struct lttng_us
 #else
 
 static
-void lttng_ust_lfht_iter_debug_set_ht(struct lttng_ust_lfht *ht, struct lttng_ust_lfht_iter *iter)
+void lttng_ust_lfht_iter_debug_set_ht(struct lttng_ust_lfht *ht __attribute__((unused)),
+               struct lttng_ust_lfht_iter *iter __attribute__((unused)))
 {
 }
 
@@ -1105,7 +1106,8 @@ void lttng_ust_lfht_lookup(struct lttng_ust_lfht *ht, unsigned long hash,
        iter->next = next;
 }
 
-void lttng_ust_lfht_next_duplicate(struct lttng_ust_lfht *ht, lttng_ust_lfht_match_fct match,
+void lttng_ust_lfht_next_duplicate(struct lttng_ust_lfht *ht __attribute__((unused)),
+               lttng_ust_lfht_match_fct match,
                const void *key, struct lttng_ust_lfht_iter *iter)
 {
        struct lttng_ust_lfht_node *node, *next;
@@ -1139,7 +1141,8 @@ void lttng_ust_lfht_next_duplicate(struct lttng_ust_lfht *ht, lttng_ust_lfht_mat
        iter->next = next;
 }
 
-void lttng_ust_lfht_next(struct lttng_ust_lfht *ht, struct lttng_ust_lfht_iter *iter)
+void lttng_ust_lfht_next(struct lttng_ust_lfht *ht __attribute__((unused)),
+               struct lttng_ust_lfht_iter *iter)
 {
        struct lttng_ust_lfht_node *node, *next;
 
index 6ac204091b51d744d69c922b45eff92bd7e2b003..9f5016a05ea7c305c39bf1e0b56d6158e241695c 100644 (file)
@@ -75,7 +75,7 @@ typedef int (*lttng_ust_lfht_match_fct)(struct lttng_ust_lfht_node *node, const
  * (detection of memory corruption).
  */
 static inline
-void lttng_ust_lfht_node_init(struct lttng_ust_lfht_node *node)
+void lttng_ust_lfht_node_init(struct lttng_ust_lfht_node *node __attribute__((unused)))
 {
 }
 
index 61293d137868ec804c954fca12005d38f455fde6..6569c6f4004d133c715805ed8c47df69947f13e8 100644 (file)
@@ -108,7 +108,8 @@ struct lttng_enum *lttng_ust_enum_get_from_desc(struct lttng_ust_session *sessio
        return NULL;
 }
 
-size_t lttng_ust_dummy_get_size(struct lttng_ust_ctx_field *field, size_t offset)
+size_t lttng_ust_dummy_get_size(struct lttng_ust_ctx_field *field __attribute__((unused)),
+               size_t offset)
 {
        size_t size = 0;
 
@@ -117,7 +118,7 @@ size_t lttng_ust_dummy_get_size(struct lttng_ust_ctx_field *field, size_t offset
        return size;
 }
 
-void lttng_ust_dummy_record(struct lttng_ust_ctx_field *field,
+void lttng_ust_dummy_record(struct lttng_ust_ctx_field *field __attribute__((unused)),
                 struct lttng_ust_lib_ring_buffer_ctx *ctx,
                 struct lttng_ust_channel_buffer *chan)
 {
@@ -126,7 +127,7 @@ void lttng_ust_dummy_record(struct lttng_ust_ctx_field *field,
        chan->ops->event_write(ctx, &sel_char, sizeof(sel_char), lttng_ust_rb_alignof(sel_char));
 }
 
-void lttng_ust_dummy_get_value(struct lttng_ust_ctx_field *field,
+void lttng_ust_dummy_get_value(struct lttng_ust_ctx_field *field __attribute__((unused)),
                struct lttng_ust_ctx_value *value)
 {
        value->sel = LTTNG_UST_DYNAMIC_TYPE_NONE;
index 6b18e4cf51f7fbf94fe442ad473fead7ed673947..0b482182a59b0400d60386a599ee8df26cd2959b 100644 (file)
@@ -109,7 +109,8 @@ size_t lib_ring_buffer_do_strcpy(const struct lttng_ust_lib_ring_buffer_config *
                char *dest, const char *src, size_t len)
        __attribute__((always_inline));
 static inline
-size_t lib_ring_buffer_do_strcpy(const struct lttng_ust_lib_ring_buffer_config *config,
+size_t lib_ring_buffer_do_strcpy(
+               const struct lttng_ust_lib_ring_buffer_config *config  __attribute__((unused)),
                char *dest, const char *src, size_t len)
 {
        size_t count;
index 67c6e90143f58f7161b93edff5f4a16b7aab88e2..a325875cbd98eafdddad0f9d453fbaeed40bcb40 100644 (file)
@@ -122,8 +122,9 @@ unsigned long subbuffer_id(const struct lttng_ust_lib_ring_buffer_config *config
  * bits are identical, else 0.
  */
 static inline
-int subbuffer_id_compare_offset(const struct lttng_ust_lib_ring_buffer_config *config,
-                               unsigned long id, unsigned long offset)
+int subbuffer_id_compare_offset(
+               const struct lttng_ust_lib_ring_buffer_config *config __attribute__((unused)),
+               unsigned long id, unsigned long offset)
 {
        return (id & SB_ID_OFFSET_MASK) == (offset << SB_ID_OFFSET_SHIFT);
 }
@@ -241,7 +242,8 @@ int lib_ring_buffer_backend_get_pages(const struct lttng_ust_lib_ring_buffer_con
 /* Get backend pages from cache. */
 static inline
 struct lttng_ust_lib_ring_buffer_backend_pages *
-       lib_ring_buffer_get_backend_pages_from_ctx(const struct lttng_ust_lib_ring_buffer_config *config,
+       lib_ring_buffer_get_backend_pages_from_ctx(
+               const struct lttng_ust_lib_ring_buffer_config *config __attribute__((unused)),
                struct lttng_ust_lib_ring_buffer_ctx *ctx)
 {
        return ctx->priv->backend_pages;
@@ -269,10 +271,11 @@ void subbuffer_count_record(const struct lttng_ust_lib_ring_buffer_config *confi
 }
 #else /* LTTNG_RING_BUFFER_COUNT_EVENTS */
 static inline
-void subbuffer_count_record(const struct lttng_ust_lib_ring_buffer_config *config,
-                           const struct lttng_ust_lib_ring_buffer_ctx *ctx,
-                           struct lttng_ust_lib_ring_buffer_backend *bufb,
-                           unsigned long idx, struct lttng_ust_shm_handle *handle)
+void subbuffer_count_record(const struct lttng_ust_lib_ring_buffer_config *config __attribute__((unused)),
+               const struct lttng_ust_lib_ring_buffer_ctx *ctx __attribute__((unused)),
+               struct lttng_ust_lib_ring_buffer_backend *bufb __attribute__((unused)),
+               unsigned long idx __attribute__((unused)),
+               struct lttng_ust_shm_handle *handle __attribute__((unused)))
 {
 }
 #endif /* #else LTTNG_RING_BUFFER_COUNT_EVENTS */
@@ -440,7 +443,8 @@ unsigned long subbuffer_get_data_size(
 }
 
 static inline
-void subbuffer_inc_packet_count(const struct lttng_ust_lib_ring_buffer_config *config,
+void subbuffer_inc_packet_count(
+               const struct lttng_ust_lib_ring_buffer_config *config __attribute__((unused)),
                struct lttng_ust_lib_ring_buffer_backend *bufb,
                unsigned long idx, struct lttng_ust_shm_handle *handle)
 {
@@ -544,7 +548,7 @@ void lib_ring_buffer_set_noref_offset(const struct lttng_ust_lib_ring_buffer_con
 static inline
 int update_read_sb_index(const struct lttng_ust_lib_ring_buffer_config *config,
                         struct lttng_ust_lib_ring_buffer_backend *bufb,
-                        struct channel_backend *chanb,
+                        struct channel_backend *chanb __attribute__((unused)),
                         unsigned long consumed_idx,
                         unsigned long consumed_count,
                         struct lttng_ust_shm_handle *handle)
index ed255c749508a41546546a8135745b561467fb5a..12e210050b1882ae1849a5571a3407c00b37420e 100644 (file)
@@ -201,8 +201,9 @@ unsigned long lib_ring_buffer_get_offset(const struct lttng_ust_lib_ring_buffer_
 }
 
 static inline
-unsigned long lib_ring_buffer_get_consumed(const struct lttng_ust_lib_ring_buffer_config *config,
-                                          struct lttng_ust_lib_ring_buffer *buf)
+unsigned long lib_ring_buffer_get_consumed(
+               const struct lttng_ust_lib_ring_buffer_config *config __attribute__((unused)),
+               struct lttng_ust_lib_ring_buffer *buf)
 {
        return uatomic_read(&buf->consumed);
 }
@@ -212,8 +213,9 @@ unsigned long lib_ring_buffer_get_consumed(const struct lttng_ust_lib_ring_buffe
  * ordering enforced with respect to trace teardown).
  */
 static inline
-int lib_ring_buffer_is_finalized(const struct lttng_ust_lib_ring_buffer_config *config,
-                                struct lttng_ust_lib_ring_buffer *buf)
+int lib_ring_buffer_is_finalized(
+               const struct lttng_ust_lib_ring_buffer_config *config __attribute__((unused)),
+                struct lttng_ust_lib_ring_buffer *buf)
 {
        int finalized = CMM_ACCESS_ONCE(buf->finalized);
        /*
index be077e516f4f55e818540bd4667c4b4529530a5d..ac5e31bf1c4f0ee95b0b74066b8fb9566a16672e 100644 (file)
@@ -32,7 +32,8 @@
  * section.
  */
 static inline
-int lib_ring_buffer_nesting_inc(const struct lttng_ust_lib_ring_buffer_config *config)
+int lib_ring_buffer_nesting_inc(
+               const struct lttng_ust_lib_ring_buffer_config *config __attribute__((unused)))
 {
        int nesting;
 
@@ -47,13 +48,15 @@ int lib_ring_buffer_nesting_inc(const struct lttng_ust_lib_ring_buffer_config *c
 }
 
 static inline
-int lib_ring_buffer_nesting_count(const struct lttng_ust_lib_ring_buffer_config *config)
+int lib_ring_buffer_nesting_count(
+               const struct lttng_ust_lib_ring_buffer_config *config __attribute__((unused)))
 {
        return URCU_TLS(lib_ring_buffer_nesting);
 }
 
 static inline
-void lib_ring_buffer_nesting_dec(const struct lttng_ust_lib_ring_buffer_config *config)
+void lib_ring_buffer_nesting_dec(
+               const struct lttng_ust_lib_ring_buffer_config *config __attribute__((unused)))
 {
        cmm_barrier();
        URCU_TLS(lib_ring_buffer_nesting)--;            /* TLS */
@@ -215,9 +218,10 @@ slow_path:
  * disabled, for RING_BUFFER_SYNC_PER_CPU configuration.
  */
 static inline
-void lib_ring_buffer_switch(const struct lttng_ust_lib_ring_buffer_config *config,
-                           struct lttng_ust_lib_ring_buffer *buf, enum switch_mode mode,
-                           struct lttng_ust_shm_handle *handle)
+void lib_ring_buffer_switch(
+               const struct lttng_ust_lib_ring_buffer_config *config __attribute__((unused)),
+               struct lttng_ust_lib_ring_buffer *buf, enum switch_mode mode,
+               struct lttng_ust_shm_handle *handle)
 {
        lib_ring_buffer_switch_slow(buf, mode, handle);
 }
@@ -332,29 +336,33 @@ int lib_ring_buffer_try_discard_reserve(const struct lttng_ust_lib_ring_buffer_c
 }
 
 static inline
-void channel_record_disable(const struct lttng_ust_lib_ring_buffer_config *config,
-                           struct lttng_ust_lib_ring_buffer_channel *chan)
+void channel_record_disable(
+               const struct lttng_ust_lib_ring_buffer_config *config __attribute__((unused)),
+               struct lttng_ust_lib_ring_buffer_channel *chan)
 {
        uatomic_inc(&chan->record_disabled);
 }
 
 static inline
-void channel_record_enable(const struct lttng_ust_lib_ring_buffer_config *config,
-                          struct lttng_ust_lib_ring_buffer_channel *chan)
+void channel_record_enable(
+               const struct lttng_ust_lib_ring_buffer_config *config __attribute__((unused)),
+               struct lttng_ust_lib_ring_buffer_channel *chan)
 {
        uatomic_dec(&chan->record_disabled);
 }
 
 static inline
-void lib_ring_buffer_record_disable(const struct lttng_ust_lib_ring_buffer_config *config,
-                                   struct lttng_ust_lib_ring_buffer *buf)
+void lib_ring_buffer_record_disable(
+               const struct lttng_ust_lib_ring_buffer_config *config __attribute__((unused)),
+               struct lttng_ust_lib_ring_buffer *buf)
 {
        uatomic_inc(&buf->record_disabled);
 }
 
 static inline
-void lib_ring_buffer_record_enable(const struct lttng_ust_lib_ring_buffer_config *config,
-                                  struct lttng_ust_lib_ring_buffer *buf)
+void lib_ring_buffer_record_enable(
+               const struct lttng_ust_lib_ring_buffer_config *config __attribute__((unused)),
+               struct lttng_ust_lib_ring_buffer *buf)
 {
        uatomic_dec(&buf->record_disabled);
 }
index fc0b0535717772495ff05923eb7b735943ead90f..7d905d4bc55fee4d951bbfcfe5daf5104afea20c 100644 (file)
@@ -322,13 +322,14 @@ void lib_ring_buffer_check_deliver(const struct lttng_ust_lib_ring_buffer_config
  * useful for crash dump.
  */
 static inline
-void lib_ring_buffer_write_commit_counter(const struct lttng_ust_lib_ring_buffer_config *config,
-                                         struct lttng_ust_lib_ring_buffer *buf,
-                                         struct lttng_ust_lib_ring_buffer_channel *chan,
-                                         unsigned long buf_offset,
-                                         unsigned long commit_count,
-                                         struct lttng_ust_shm_handle *handle,
-                                         struct commit_counters_hot *cc_hot)
+void lib_ring_buffer_write_commit_counter(
+               const struct lttng_ust_lib_ring_buffer_config *config,
+               struct lttng_ust_lib_ring_buffer *buf __attribute__((unused)),
+               struct lttng_ust_lib_ring_buffer_channel *chan,
+               unsigned long buf_offset,
+               unsigned long commit_count,
+               struct lttng_ust_shm_handle *handle __attribute__((unused)),
+               struct commit_counters_hot *cc_hot)
 {
        unsigned long commit_seq_old;
 
index ac45446b8a4ea09525e63fc128b8a9d58039a8be..6ba0d8b1d44fe4fbb4dbe8989e773a355691c4d2 100644 (file)
@@ -33,7 +33,7 @@
 static
 int lib_ring_buffer_backend_allocate(const struct lttng_ust_lib_ring_buffer_config *config,
                                     struct lttng_ust_lib_ring_buffer_backend *bufb,
-                                    size_t size, size_t num_subbuf,
+                                    size_t size __attribute__((unused)), size_t num_subbuf,
                                     int extra_reader_sb,
                                     struct lttng_ust_shm_handle *handle,
                                     struct shm_object *shmobj)
@@ -395,8 +395,8 @@ end:
  *
  * Destroy all channel buffers and frees the channel.
  */
-void channel_backend_free(struct channel_backend *chanb,
-                         struct lttng_ust_shm_handle *handle)
+void channel_backend_free(struct channel_backend *chanb __attribute__((unused)),
+                         struct lttng_ust_shm_handle *handle __attribute__((unused)))
 {
        /* SHM teardown takes care of everything */
 }
index 8112ced4719f118c256ab07c29e4b3780351ebcd..1b9ec40d3cc9b001a5bd951457438cf2445c53e3 100644 (file)
@@ -428,7 +428,8 @@ free_chanbuf:
 }
 
 static
-void lib_ring_buffer_channel_switch_timer(int sig, siginfo_t *si, void *uc)
+void lib_ring_buffer_channel_switch_timer(int sig __attribute__((unused)),
+               siginfo_t *si, void *uc __attribute__((unused)))
 {
        const struct lttng_ust_lib_ring_buffer_config *config;
        struct lttng_ust_shm_handle *handle;
@@ -628,7 +629,8 @@ end:
 }
 
 static
-void lib_ring_buffer_channel_read_timer(int sig, siginfo_t *si, void *uc)
+void lib_ring_buffer_channel_read_timer(int sig __attribute__((unused)),
+               siginfo_t *si, void *uc __attribute__((unused)))
 {
        struct lttng_ust_lib_ring_buffer_channel *chan;
 
@@ -663,7 +665,7 @@ void rb_setmask(sigset_t *mask)
 }
 
 static
-void *sig_thread(void *arg)
+void *sig_thread(void *arg __attribute__((unused)))
 {
        sigset_t mask;
        siginfo_t info;
@@ -895,7 +897,7 @@ void lib_ring_buffer_channel_read_timer_stop(struct lttng_ust_lib_ring_buffer_ch
 }
 
 static void channel_unregister_notifiers(struct lttng_ust_lib_ring_buffer_channel *chan,
-                          struct lttng_ust_shm_handle *handle)
+                          struct lttng_ust_shm_handle *handle __attribute__((unused)))
 {
        lib_ring_buffer_channel_switch_timer_stop(chan);
        lib_ring_buffer_channel_read_timer_stop(chan);
@@ -963,7 +965,7 @@ struct lttng_ust_shm_handle *channel_create(const struct lttng_ust_lib_ring_buff
                   size_t priv_data_size,
                   void *priv_data_init,
                   void *priv,
-                  void *buf_addr, size_t subbuf_size,
+                  void *buf_addr __attribute__((unused)), size_t subbuf_size,
                   size_t num_subbuf, unsigned int switch_timer_interval,
                   unsigned int read_timer_interval,
                   const int *stream_fds, int nr_stream_fds,
@@ -1197,9 +1199,10 @@ struct lttng_ust_lib_ring_buffer *channel_get_ring_buffer(
        return shmp(handle, chan->backend.buf[cpu].shmp);
 }
 
-int ring_buffer_channel_close_wait_fd(const struct lttng_ust_lib_ring_buffer_config *config,
-                       struct lttng_ust_lib_ring_buffer_channel *chan,
-                       struct lttng_ust_shm_handle *handle)
+int ring_buffer_channel_close_wait_fd(
+               const struct lttng_ust_lib_ring_buffer_config *config __attribute__((unused)),
+               struct lttng_ust_lib_ring_buffer_channel *chan __attribute__((unused)),
+               struct lttng_ust_shm_handle *handle)
 {
        struct shm_ref *ref;
 
@@ -1207,9 +1210,10 @@ int ring_buffer_channel_close_wait_fd(const struct lttng_ust_lib_ring_buffer_con
        return shm_close_wait_fd(handle, ref);
 }
 
-int ring_buffer_channel_close_wakeup_fd(const struct lttng_ust_lib_ring_buffer_config *config,
-                       struct lttng_ust_lib_ring_buffer_channel *chan,
-                       struct lttng_ust_shm_handle *handle)
+int ring_buffer_channel_close_wakeup_fd(
+               const struct lttng_ust_lib_ring_buffer_config *config __attribute__((unused)),
+               struct lttng_ust_lib_ring_buffer_channel *chan __attribute__((unused)),
+               struct lttng_ust_shm_handle *handle)
 {
        struct shm_ref *ref;
 
@@ -1256,7 +1260,7 @@ int ring_buffer_stream_close_wakeup_fd(const struct lttng_ust_lib_ring_buffer_co
 }
 
 int lib_ring_buffer_open_read(struct lttng_ust_lib_ring_buffer *buf,
-                             struct lttng_ust_shm_handle *handle)
+                             struct lttng_ust_shm_handle *handle __attribute__((unused)))
 {
        if (uatomic_cmpxchg(&buf->active_readers, 0, 1) != 0)
                return -EBUSY;
@@ -2423,10 +2427,11 @@ void deliver_count_events(const struct lttng_ust_lib_ring_buffer_config *config,
 }
 #else /* LTTNG_RING_BUFFER_COUNT_EVENTS */
 static
-void deliver_count_events(const struct lttng_ust_lib_ring_buffer_config *config,
-               struct lttng_ust_lib_ring_buffer *buf,
-               unsigned long idx,
-               struct lttng_ust_shm_handle *handle)
+void deliver_count_events(
+               const struct lttng_ust_lib_ring_buffer_config *config __attribute__((unused)),
+               struct lttng_ust_lib_ring_buffer *buf __attribute__((unused)),
+               unsigned long idx __attribute__((unused)),
+               struct lttng_ust_shm_handle *handle __attribute__((unused)))
 {
 }
 #endif /* #else LTTNG_RING_BUFFER_COUNT_EVENTS */
@@ -2438,7 +2443,7 @@ void lib_ring_buffer_check_deliver_slow(const struct lttng_ust_lib_ring_buffer_c
                                   unsigned long commit_count,
                                   unsigned long idx,
                                   struct lttng_ust_shm_handle *handle,
-                                  uint64_t tsc)
+                                  uint64_t tsc __attribute__((unused)))
 {
        unsigned long old_commit_count = commit_count
                                         - chan->backend.subbuf_size;
index 37669b0d0b8e7e88a4d00c31ab547df740c703ee..2e10de03366ca772356820fc7f53a35099afd08b 100644 (file)
@@ -226,10 +226,11 @@ int lib_ring_buffer_check_config(const struct lttng_ust_lib_ring_buffer_config *
                             unsigned int switch_timer_interval,
                             unsigned int read_timer_interval)
        lttng_ust_notrace;
+
 static inline
 int lib_ring_buffer_check_config(const struct lttng_ust_lib_ring_buffer_config *config,
                             unsigned int switch_timer_interval,
-                            unsigned int read_timer_interval)
+                            unsigned int read_timer_interval __attribute__((unused)))
 {
        if (config->alloc == RING_BUFFER_ALLOC_GLOBAL
            && config->sync == RING_BUFFER_SYNC_PER_CPU
index 0f5cc03d9fdd895a6ad9cc56f88fa352b80df890..199d2c77faacc184856ba8317ba829913c3f091a 100644 (file)
@@ -56,7 +56,7 @@ void v_inc(const struct lttng_ust_lib_ring_buffer_config *config, union v_atomic
  * Non-atomic decrement. Only used by reader, apply to reader-owned subbuffer.
  */
 static inline
-void _v_dec(const struct lttng_ust_lib_ring_buffer_config *config, union v_atomic *v_a)
+void _v_dec(const struct lttng_ust_lib_ring_buffer_config *config __attribute__((unused)), union v_atomic *v_a)
 {
        --v_a->v;
 }
index d42d0b65a1237d3c22e8ee445dd3b57ca56b27b7..a5afa76909a90e40b7f358f0584fddccd753f1c2 100644 (file)
@@ -54,7 +54,7 @@ void do_stuff(void)
 
 
 static
-void *function(void *arg)
+void *function(void *arg __attribute__((unused)))
 {
        unsigned long long nr_loops = 0;
        struct thread_counter *thread_counter = arg;
index bd40323ef37647140c29bf492932de321c260fd2..afbcf4694783aaa6f19567bd6854b383b80b2d92 100644 (file)
@@ -21,7 +21,7 @@
 #include "ust_tests_hello.h"
 
 static
-void inthandler(int sig)
+void inthandler(int sig __attribute__((unused)))
 {
        printf("in SIGUSR1 handler\n");
        tracepoint(ust_tests_hello, tptest_sighandler);
index 9ef33099b54aae31950f69fa4c1acc1c96c2b601..87f2637b487ba39d60038e7a5484d981814f5339 100644 (file)
@@ -27,7 +27,7 @@ struct mmsghdr;
 #include "ust_tests_hello.h"
 
 static
-void inthandler(int sig)
+void inthandler(int sig __attribute__((unused)))
 {
        printf("in SIGUSR1 handler\n");
        tracepoint(ust_tests_hello, tptest_sighandler);
index da347714d5d8fc68906bc38ebcc75ca1406bf9e2..bff2bdb5a37774302f3e5c96bdf8458f7d7eebdb 100644 (file)
@@ -42,7 +42,7 @@ void test_inc_count(void)
 }
 
 static
-size_t test_get_size(struct lttng_ust_ctx_field *field, size_t offset)
+size_t test_get_size(struct lttng_ust_ctx_field *field __attribute__((unused)), size_t offset)
 {
        int sel = test_count % _NR_LTTNG_UST_DYNAMIC_TYPES;
        size_t size = 0;
@@ -103,7 +103,7 @@ size_t test_get_size(struct lttng_ust_ctx_field *field, size_t offset)
 }
 
 static
-void test_record(struct lttng_ust_ctx_field *field,
+void test_record(struct lttng_ust_ctx_field *field __attribute__((unused)),
                 struct lttng_ust_lib_ring_buffer_ctx *ctx,
                 struct lttng_ust_channel_buffer *lttng_chan_buf)
 {
@@ -196,7 +196,7 @@ void test_record(struct lttng_ust_ctx_field *field,
 }
 
 static
-void test_get_value(struct lttng_ust_ctx_field *field,
+void test_get_value(struct lttng_ust_ctx_field *field __attribute__((unused)),
                struct lttng_ust_ctx_value *value)
 {
        int sel = test_count % _NR_LTTNG_UST_DYNAMIC_TYPES;
@@ -253,7 +253,7 @@ struct lttng_ust_context_provider myprovider = {
 };
 
 static
-void inthandler(int sig)
+void inthandler(int sig __attribute__((unused)))
 {
        printf("in SIGUSR1 handler\n");
        tracepoint(ust_tests_hello, tptest_sighandler);
index ee2268831c0e6b489abdf3ee469ea233740162e2..f7edf033a8813c0762a1e2cd13a7b906d969c34c 100644 (file)
@@ -255,7 +255,7 @@ static void nil_test(uint8_t *buf)
        lttng_msgpack_writer_fini(&writer);
 }
 
-int main(int argc, char *argv[])
+int main(void)
 {
        uint8_t buf[BUFFER_SIZE] = {0};
        double arr_double[] = {1.1, 2.3, -12345.2};
This page took 0.067701 seconds and 4 git commands to generate.