Add 'unused' attribute to tracepoint callback
authorZifei Tong <zifeitong@gmail.com>
Fri, 14 Mar 2014 13:23:21 +0000 (21:23 +0800)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Fri, 14 Mar 2014 13:39:16 +0000 (09:39 -0400)
Compiling tracepoint provider with clang generates 'Wunused-function'
warnings. Add 'unused' attribute to silence these warnings.

Fixes #760

Signed-off-by: Zifei Tong <zifeitong@gmail.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
include/lttng/tracepoint.h

index 66e2abd7c505a296389c4bc691a809eed4c8b812..c5a09d815db1383e539c8c455e8477dda29a579a 100644 (file)
@@ -152,7 +152,7 @@ extern "C" {
  */
 #define _DECLARE_TRACEPOINT(_provider, _name, ...)                                     \
 extern struct tracepoint __tracepoint_##_provider##___##_name;                         \
-static inline __attribute__((always_inline)) lttng_ust_notrace                         \
+static inline __attribute__((always_inline, unused)) lttng_ust_notrace                 \
 void __tracepoint_cb_##_provider##___##_name(_TP_ARGS_PROTO(__VA_ARGS__));             \
 static                                                                                 \
 void __tracepoint_cb_##_provider##___##_name(_TP_ARGS_PROTO(__VA_ARGS__))              \
This page took 0.025184 seconds and 4 git commands to generate.