From 17ca060039dadc36eff49429af850c95659ab471 Mon Sep 17 00:00:00 2001 From: Zifei Tong Date: Fri, 14 Mar 2014 21:23:21 +0800 Subject: [PATCH] Add 'unused' attribute to tracepoint callback Compiling tracepoint provider with clang generates 'Wunused-function' warnings. Add 'unused' attribute to silence these warnings. Fixes #760 Signed-off-by: Zifei Tong Signed-off-by: Mathieu Desnoyers --- include/lttng/tracepoint.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/lttng/tracepoint.h b/include/lttng/tracepoint.h index 66e2abd7..c5a09d81 100644 --- a/include/lttng/tracepoint.h +++ b/include/lttng/tracepoint.h @@ -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__)) \ -- 2.34.1