From: Mathieu Desnoyers Date: Tue, 27 Sep 2011 13:30:49 +0000 (-0400) Subject: ltt-kconsumerd: Fix incorrect typing X-Git-Tag: v2.0-pre14~9 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=558e70e9829c97ecd228516f6e312768be0536d7;p=lttng-tools.git ltt-kconsumerd: Fix incorrect typing ltt-kconsumerd.c: In function ‘on_recv_fd’: ltt-kconsumerd.c:298: warning: passing argument 2 of ‘kernctl_get_mmap_len’ from incompatible pointer type ../include/lttng-kernel-ctl.h:47: note: expected ‘long unsigned int *’ but argument is of type ‘size_t *’ Signed-off-by: Mathieu Desnoyers --- diff --git a/ltt-kconsumerd/ltt-kconsumerd.c b/ltt-kconsumerd/ltt-kconsumerd.c index d562c1729..a81be55e7 100644 --- a/ltt-kconsumerd/ltt-kconsumerd.c +++ b/ltt-kconsumerd/ltt-kconsumerd.c @@ -295,12 +295,15 @@ static int on_recv_fd(struct lttng_kconsumerd_fd *kconsumerd_fd) if (kconsumerd_fd->output == LTTNG_EVENT_MMAP) { /* get the len of the mmap region */ - ret = kernctl_get_mmap_len(kconsumerd_fd->consumerd_fd, &kconsumerd_fd->mmap_len); + unsigned long mmap_len; + + ret = kernctl_get_mmap_len(kconsumerd_fd->consumerd_fd, &mmap_len); if (ret != 0) { ret = errno; perror("kernctl_get_mmap_len"); goto error_close_fd; } + kconsumerd_fd->mmap_len = (size_t) mmap_len; kconsumerd_fd->mmap_base = mmap(NULL, kconsumerd_fd->mmap_len, PROT_READ, MAP_PRIVATE, kconsumerd_fd->consumerd_fd, 0);