Skip to contentSkip to conversation

Add 'unused' attribute to tracepoint callback

PATCH Mathieu Desnoyers 1 participant 1 message Mar 14, 2014 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

Mathieu Desnoyers

author Applied
#1 lore raw

Merged, 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 callback

Compiling tracepoint provider with clang generates 'Wunused-function' warnings. Add 'unused' attribute to silence these warnings.

Fixes #760

---
 include/lttng/tracepoint.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
include/lttng/tracepoint.h +1 -1
index 66e2abd..c5a09d8 100644
@@ -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