From: Zifei Tong Date: Fri, 14 Mar 2014 13:23:21 +0000 (+0800) Subject: Add 'unused' attribute to tracepoint callback X-Git-Tag: v2.5.0-rc1~32 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=17ca060039dadc36eff49429af850c95659ab471;p=lttng-ust.git 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 --- 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__)) \