cleanup: explicitly mark unused parameters (-Wunused-parameter)
[lttng-ust.git] / tests / compile / test-app-ctx / hello.c
index 6e16b12fac871b19e011fc60f03a6433b6df0990..bff2bdb5a37774302f3e5c96bdf8458f7d7eebdb 100644 (file)
@@ -35,13 +35,14 @@ struct mmsghdr;
 
 static __thread unsigned int test_count;
 
+static
 void test_inc_count(void)
 {
        test_count++;
 }
 
 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;
@@ -102,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)
 {
@@ -195,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;
@@ -242,20 +243,23 @@ void test_get_value(struct lttng_ust_ctx_field *field,
        }
 }
 
+static char myprovider_name[] = "$app.myprovider";
 struct lttng_ust_context_provider myprovider = {
        .struct_size = sizeof(struct lttng_ust_context_provider),
-       .name = "$app.myprovider",
+       .name = myprovider_name,
        .get_size = test_get_size,
        .record = test_record,
        .get_value = test_get_value,
 };
 
-void inthandler(int sig)
+static
+void inthandler(int sig __attribute__((unused)))
 {
        printf("in SIGUSR1 handler\n");
        tracepoint(ust_tests_hello, tptest_sighandler);
 }
 
+static
 int init_int_handler(void)
 {
        int result;
@@ -283,8 +287,6 @@ int init_int_handler(void)
        return 0;
 }
 
-void test_inc_count(void);
-
 int main(int argc, char **argv)
 {
        int i, netint;
This page took 0.024301 seconds and 4 git commands to generate.