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

Change-Id: I62e4c3e521705756b99571281937bba6d5a6d063
Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
include/lttng/tracepoint.h
liblttng-ust-libc-wrapper/lttng-ust-malloc.c
liblttng-ust/lttng-hash-helper.h
liblttng-ust/rculfhash.c

index a8ee06beb459e8400e462ac1a97b677ff175d3f5..02d2cf13367ab2768a65886ffebb4d9f2d568a2b 100644 (file)
@@ -161,8 +161,9 @@ extern "C" {
  */
 #define _DECLARE_TRACEPOINT(_provider, _name, ...)                                     \
 extern struct lttng_ust_tracepoint __tracepoint_##_provider##___##_name;               \
-static inline __attribute__((always_inline, unused)) lttng_ust_notrace                 \
-void __tracepoint_cb_##_provider##___##_name(_TP_ARGS_PROTO(__VA_ARGS__));             \
+static inline                                                                          \
+void __tracepoint_cb_##_provider##___##_name(_TP_ARGS_PROTO(__VA_ARGS__))              \
+       __attribute__((always_inline, unused)) lttng_ust_notrace;                       \
 static                                                                                 \
 void __tracepoint_cb_##_provider##___##_name(_TP_ARGS_PROTO(__VA_ARGS__))              \
 {                                                                                      \
index 54b40e6a0a9546cbada853974994ddaf8fdac82e..e4f9c35614dafce4ef929268be3fbe82ee279b5a 100644 (file)
@@ -56,7 +56,10 @@ void *static_calloc(size_t nmemb, size_t size);
  */
 static int ust_malloc_lock;
 
-static __attribute__((unused))
+static
+void ust_malloc_spin_lock(pthread_mutex_t *lock)
+       __attribute__((unused));
+static
 void ust_malloc_spin_lock(pthread_mutex_t *lock)
 {
        /*
@@ -68,7 +71,10 @@ void ust_malloc_spin_lock(pthread_mutex_t *lock)
                caa_cpu_relax();
 }
 
-static __attribute__((unused))
+static
+void ust_malloc_spin_unlock(pthread_mutex_t *lock)
+       __attribute__((unused));
+static
 void ust_malloc_spin_unlock(pthread_mutex_t *lock)
 {
        /*
index 1978fbde6f55de4f39db5e628377ad563bf3e2f8..36c3ae4274906ea96c26886bb81293fa405e9844 100644 (file)
@@ -43,7 +43,10 @@ do { \
        c ^= b; c -= rot(b, 24); \
 }
 
-static inline __attribute__((unused))
+static inline
+uint32_t lttng_hash_u32(const uint32_t *k, size_t length, uint32_t initval)
+       __attribute__((unused));
+static inline
 uint32_t lttng_hash_u32(
        const uint32_t *k,      /* the key, an array of uint32_t values */
        size_t length,          /* the length of the key, in uint32_ts */
index b25c1c182ca77e913ad1b100f9254329087fff2b..efdb5e70ef684d37dbad74af3df3d22820c10f1f 100644 (file)
@@ -439,7 +439,10 @@ unsigned int fls_u64(uint64_t x)
 #endif
 
 #ifndef HAS_FLS_U64
-static __attribute__((unused))
+static
+unsigned int fls_u64(uint64_t x)
+       __attribute__((unused));
+static
 unsigned int fls_u64(uint64_t x)
 {
        unsigned int r = 64;
@@ -476,7 +479,10 @@ unsigned int fls_u64(uint64_t x)
 #endif
 
 #ifndef HAS_FLS_U32
-static __attribute__((unused))
+static
+unsigned int fls_u32(uint32_t x)
+       __attribute__((unused));
+static
 unsigned int fls_u32(uint32_t x)
 {
        unsigned int r = 32;
This page took 0.027568 seconds and 4 git commands to generate.