All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH lttng-ust] Add 'unused' attribute to tracepoint callback
@ 2014-03-14 13:20 Zifei Tong
  0 siblings, 0 replies; 3+ messages in thread
From: Zifei Tong @ 2014-03-14 13:20 UTC (permalink / raw)
  To: mathieu.desnoyers; +Cc: lttng-dev

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>
---
 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 66e2abd..c5a09d8 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__))		\
-- 
1.9.0

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH lttng-ust] Add 'unused' attribute to tracepoint callback
       [not found] <1394803401-32171-1-git-send-email-zifeitong@gmail.com>
@ 2014-03-14 13:39 ` Mathieu Desnoyers
  0 siblings, 0 replies; 3+ messages in thread
From: Mathieu Desnoyers @ 2014-03-14 13:39 UTC (permalink / raw)
  To: Zifei Tong; +Cc: lttng-dev

Merged, thanks!

Mathieu

----- Original Message -----
> From: "Zifei Tong" <zifeitong@gmail.com>
> To: "mathieu desnoyers" <mathieu.desnoyers@efficios.com>
> Cc: lttng-dev@lists.lttng.org, "Zifei Tong" <zifeitong@gmail.com>
> 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
> 
> Signed-off-by: Zifei Tong <zifeitong@gmail.com>
> ---
>  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 66e2abd..c5a09d8 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__))		\
> --
> 1.9.0
> 
> 

-- 
Mathieu Desnoyers
EfficiOS Inc.
http://www.efficios.com

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH lttng-ust] Add 'unused' attribute to tracepoint callback
@ 2014-03-14 13:23 Zifei Tong
  0 siblings, 0 replies; 3+ messages in thread
From: Zifei Tong @ 2014-03-14 13:23 UTC (permalink / raw)
  To: mathieu.desnoyers; +Cc: lttng-dev

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>
---
 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 66e2abd..c5a09d8 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__))		\
-- 
1.9.0

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-03-14 13:39 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-03-14 13:20 [PATCH lttng-ust] Add 'unused' attribute to tracepoint callback Zifei Tong
2014-03-14 13:23 Zifei Tong
     [not found] <1394803401-32171-1-git-send-email-zifeitong@gmail.com>
2014-03-14 13:39 ` Mathieu Desnoyers

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.