[ltt-dev] [PATCH 3/4] Fix a compile warning of 'initialization from incompatible pointer type'
Mathieu Desnoyers
compudj at krystal.dyndns.org
Fri Oct 24 10:23:43 EDT 2008
* Zhaolei (zhaolei at cn.fujitsu.com) wrote:
> Warning is:
> ltt/ltt-relay.c:1602: warning: initialization from incompatible pointer type
>
> Return value of ltt_relay_reserve_slot should be int because it only return
> errorcode or 0.
>
Also merged manually given it touches 3 different patches. Thanks !
Mathieu
> Signed-off-by: Zhao Lei <zhaolei at cn.fujitsu.com>
> ---
> include/linux/ltt-tracer.h | 2 +-
> ltt/ltt-relay-locked.c | 2 +-
> ltt/ltt-relay.c | 2 +-
> 3 files changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/include/linux/ltt-tracer.h b/include/linux/ltt-tracer.h
> index a1c6c14..f7cb1d1 100644
> --- a/include/linux/ltt-tracer.h
> +++ b/include/linux/ltt-tracer.h
> @@ -174,7 +174,7 @@ struct user_dbg_data {
>
> struct ltt_trace_ops {
> /* First 32 bytes cache-hot cacheline */
> - ssize_t (*reserve_slot) (struct ltt_trace_struct *trace,
> + int (*reserve_slot) (struct ltt_trace_struct *trace,
> struct ltt_channel_struct *channel,
> void **transport_data, size_t data_size,
> size_t *slot_size, long *buf_offset, u64 *tsc,
> diff --git a/ltt/ltt-relay-locked.c b/ltt/ltt-relay-locked.c
> index 779ff89..ab402f8 100644
> --- a/ltt/ltt-relay-locked.c
> +++ b/ltt/ltt-relay-locked.c
> @@ -1252,7 +1252,7 @@ static inline void ltt_reserve_end_switch_current(
> *
> * It will take care of sub-buffer switching.
> */
> -static notrace long ltt_relay_reserve_slot(struct ltt_trace_struct *trace,
> +static notrace int ltt_relay_reserve_slot(struct ltt_trace_struct *trace,
> struct ltt_channel_struct *ltt_channel, void **transport_data,
> size_t data_size, size_t *slot_size, long *buf_offset, u64 *tsc,
> unsigned int *rflags, int largest_align, int cpu)
> diff --git a/ltt/ltt-relay.c b/ltt/ltt-relay.c
> index 86f5082..5667ab8 100644
> --- a/ltt/ltt-relay.c
> +++ b/ltt/ltt-relay.c
> @@ -1278,7 +1278,7 @@ static inline void ltt_reserve_end_switch_current(
> *
> * It will take care of sub-buffer switching.
> */
> -static notrace long ltt_relay_reserve_slot(struct ltt_trace_struct *trace,
> +static notrace int ltt_relay_reserve_slot(struct ltt_trace_struct *trace,
> struct ltt_channel_struct *ltt_channel, void **transport_data,
> size_t data_size, size_t *slot_size, long *buf_offset, u64 *tsc,
> unsigned int *rflags, int largest_align, int cpu)
> --
> 1.5.5.3
>
>
>
> _______________________________________________
> ltt-dev mailing list
> ltt-dev at lists.casi.polymtl.ca
> http://lists.casi.polymtl.ca/cgi-bin/mailman/listinfo/ltt-dev
>
--
Mathieu Desnoyers
OpenPGP key fingerprint: 8CD5 52C3 8E3C 4140 715F BA06 3F25 A8FE 3BAE 9A68
More information about the lttng-dev
mailing list