cleanup: function attribute 'constructor'
authorMichael Jeanson <mjeanson@efficios.com>
Tue, 30 Mar 2021 19:29:42 +0000 (15:29 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Wed, 31 Mar 2021 18:12:13 +0000 (14:12 -0400)
Function attributes should be located after the declaration.

Change-Id: Ie3ef444bf150824b3a57e8485417f019cecc61be
Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
include/lttng/tracepoint.h
include/lttng/ust-libc-wrapper.h
include/lttng/ust-tracepoint-event.h
liblttng-ust-ctl/ustctl.c
liblttng-ust-dl/lttng-ust-dl.c
liblttng-ust-libc-wrapper/lttng-ust-malloc.c
liblttng-ust/lttng-ust-comm.c
liblttng-ust/lttng-ust-urcu.c

index 02d2cf13367ab2768a65886ffebb4d9f2d568a2b..d4733e057920c1cb38acb5fb1da09268c50d548f 100644 (file)
@@ -346,8 +346,9 @@ __tracepoint__init_urcu_sym(void)
 }
 #endif
 
-static void lttng_ust_notrace __attribute__((constructor))
-__tracepoints__init(void);
+static void
+__tracepoints__init(void)
+       lttng_ust_notrace __attribute__((constructor));
 static void
 __tracepoints__init(void)
 {
@@ -459,8 +460,9 @@ extern struct lttng_ust_tracepoint * const __stop___tracepoints_ptrs[]
                __lttng_ust_variable_attribute_no_sanitize_address =            \
                        &__tracepoint_##_provider##___##_name;
 
-static void lttng_ust_notrace __attribute__((constructor))
-__tracepoints__ptrs_init(void);
+static void
+__tracepoints__ptrs_init(void)
+       lttng_ust_notrace __attribute__((constructor));
 static void
 __tracepoints__ptrs_init(void)
 {
index 685ebfbdde5bea09e33d2dfd69077a2aead30648..2eaf5dc6d4c7016827f6ff0928fea0c1e11ace65 100644 (file)
@@ -20,6 +20,7 @@
  * function in liblttng-ust that is overridden by the one in
  * liblttng-ust-wrapper-libc when it's preloaded.
  */
-void lttng_ust_libc_wrapper_malloc_init(void);
+void lttng_ust_libc_wrapper_malloc_init(void)
+       __attribute__((constructor));
 
 #endif
index a5026733341be46a35271b652cab9907b2c13603..f4d3d28565376e4cc07e2678bbdff5104e56ce9d 100644 (file)
@@ -1061,8 +1061,9 @@ static int _TP_COMBINE_TOKENS(__probe_register_refcount___, TRACEPOINT_PROVIDER)
 
 /* Reset all macros within TRACEPOINT_EVENT */
 #include <lttng/ust-tracepoint-event-reset.h>
-static void lttng_ust_notrace __attribute__((constructor))
-_TP_COMBINE_TOKENS(__lttng_events_init__, TRACEPOINT_PROVIDER)(void);
+static void
+_TP_COMBINE_TOKENS(__lttng_events_init__, TRACEPOINT_PROVIDER)(void)
+       lttng_ust_notrace __attribute__((constructor));
 static void
 _TP_COMBINE_TOKENS(__lttng_events_init__, TRACEPOINT_PROVIDER)(void)
 {
index 9acce7a99b9d55fac380fb782c7f70e4e78f8e62..ecfed8c77770115ef556795cf20a9b3deafbbfb0 100644 (file)
@@ -2900,7 +2900,10 @@ int ustctl_counter_clear(struct ustctl_daemon_counter *counter,
        return counter->ops->counter_clear(counter->counter, dimension_indexes);
 }
 
-static __attribute__((constructor))
+static
+void ustctl_init(void)
+       __attribute__((constructor));
+static
 void ustctl_init(void)
 {
        ust_err_init();
index 657c27ccc9afab4ada4373bc76c10c3c012a31fe..1394ce1963fce5e31ec53dc41e1b39ebf21237c3 100644 (file)
@@ -34,7 +34,10 @@ static void *(*__lttng_ust_plibc_dlmopen)(Lmid_t nsid, const char *filename,
 #endif
 static int (*__lttng_ust_plibc_dlclose)(void *handle);
 
-static __attribute__((constructor))
+static
+void _lttng_ust_dl_init(void)
+       __attribute__((constructor));
+static
 void _lttng_ust_dl_init(void)
 {
        ust_err_init();
index e4f9c35614dafce4ef929268be3fbe82ee279b5a..f8c7aa8b967c0d8cdb218619b7dd33a3a375ea82 100644 (file)
@@ -420,7 +420,6 @@ void lttng_ust_fixup_malloc_nesting_tls(void)
        asm volatile ("" : : "m" (URCU_TLS(malloc_nesting)));
 }
 
-__attribute__((constructor))
 void lttng_ust_libc_wrapper_malloc_init(void)
 {
        /* Initialization already done */
index 7e587499efd2b14ce484a54a232fde6e3a5f4401..69ccd99d998968b3a7e75e3fc84d00e6ecb09523 100644 (file)
@@ -2067,7 +2067,11 @@ void lttng_ust_libc_wrapper_malloc_init(void)
  * sessiond monitoring thread: monitor presence of global and per-user
  * sessiond by polling the application common named pipe.
  */
-void __attribute__((constructor)) lttng_ust_init(void)
+static
+void lttng_ust_init(void)
+       __attribute__((constructor));
+static
+void lttng_ust_init(void)
 {
        struct timespec constructor_timeout;
        sigset_t sig_all_blocked, orig_parent_mask;
index 5103aa8fc18d43035ec6b0c46ab04884d154e92f..4381fd1c6868501c0083fd1528c12f653433a96c 100644 (file)
@@ -93,7 +93,8 @@ enum membarrier_cmd {
 };
 
 static
-void __attribute__((constructor)) _lttng_ust_urcu_init(void);
+void _lttng_ust_urcu_init(void)
+       __attribute__((constructor));
 static
 void __attribute__((destructor)) lttng_ust_urcu_exit(void);
 
This page took 0.028459 seconds and 4 git commands to generate.