Mirror of the lttng-dev mailing list
 help / color / mirror / Atom feed
* [ltt-dev] [PATCH 3/4] Fix a compile warning of 'initialization from incompatible pointer type'
@ 2008-10-23 10:46 Zhaolei
  2008-10-24 14:23 ` Mathieu Desnoyers
  0 siblings, 1 reply; 2+ messages in thread
From: Zhaolei @ 2008-10-23 10:46 UTC (permalink / raw)


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.

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





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

end of thread, other threads:[~2008-10-24 14:23 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-10-23 10:46 [ltt-dev] [PATCH 3/4] Fix a compile warning of 'initialization from incompatible pointer type' Zhaolei
2008-10-24 14:23 ` Mathieu Desnoyers

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox