[ltt-dev] [PATCH 2/2] Fix lttd's compile warning on fc9

Zhaolei zhaolei at cn.fujitsu.com
Tue Nov 25 01:04:56 EST 2008


Hi,

Fixed following compile warning:

gcc -DHAVE_CONFIG_H -I.. -I..     -g -O2 -MT lttd.o -MD -MP -MF .deps/lttd.Tpo -c -o lttd.o lttd.c
lttd.c: In function 'read_subbuffer':
lttd.c:467: warning: passing argument 2 of 'splice' from incompatible pointer type

It can be fixed by following patch. Applies on top of ltt-control-0.58-23112008.

Signed-off-by: Zhao Lei <zhaolei at cn.fujitsu.com>
---
diff -Nur ltt-control-0.58-23112008.org/lttd/lttd.c ltt-control-0.58-23112008/lttd/lttd.c
--- ltt-control-0.58-23112008.org/lttd/lttd.c	2008-11-25 13:52:02.000000000 +0800
+++ ltt-control-0.58-23112008/lttd/lttd.c	2008-11-25 13:51:46.000000000 +0800
@@ -463,8 +463,8 @@
 	offset = 0;
 	while (len > 0) {
 		printf_verbose("splice chan to pipe offset %lu\n", offset);
-		ret = splice(pair->channel, &offset, thread_pipe[1], NULL,
-			len, SPLICE_F_MOVE);
+		ret = splice(pair->channel, (off_t *)&offset, thread_pipe[1],
+			NULL, len, SPLICE_F_MOVE);
 		printf_verbose("splice chan to pipe ret %ld\n", ret);
 		if (ret < 0) {
 			perror("Error in relay splice");





More information about the lttng-dev mailing list