[lttng-dev] [PATCH lttng-ust] Add 'unused' attribute to tracepoint callback
Mathieu Desnoyers
mathieu.desnoyers at efficios.com
Fri Mar 14 09:39:49 EDT 2014
Merged, thanks!
Mathieu
----- Original Message -----
> From: "Zifei Tong" <zifeitong at gmail.com>
> To: "mathieu desnoyers" <mathieu.desnoyers at efficios.com>
> Cc: lttng-dev at lists.lttng.org, "Zifei Tong" <zifeitong at 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 at 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
More information about the lttng-dev
mailing list