Add 'unused' attribute to tracepoint callback
A message that is not in the archive (sent off-list or not yet received): [email protected]
Mathieu Desnoyers
AppliedMerged, thanks!
Mathieu
----- Original Message -----
Quoted 34 lines
From: "Zifei Tong" <[email protected]>
To: "mathieu desnoyers" <[email protected]>
Cc: [email protected], "Zifei Tong" <[email protected]>
Sent: Friday, March 14, 2014 9:23:21 AM
Subject: [PATCH lttng-ust] Add 'unused' attribute to tracepoint callbackCompiling tracepoint provider with clang generates 'Wunused-function' warnings. Add 'unused' attribute to silence these warnings.
Fixes #760
Signed-off-by Zifei Tong <[email protected]>--- include/lttng/tracepoint.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)include/lttng/tracepoint.h +1
-1@@ -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__)) \
--
1.9.0
Signature · 3 lines
Mathieu Desnoyers EfficiOS Inc. http://www.efficios.com