From: Simon Marchi Date: Mon, 8 Aug 2011 19:42:34 +0000 (-0400) Subject: Fix format string warnings X-Git-Tag: v2.0-pre10~8 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=ced2f82009443bb90d8e385e86717c78c249adb7;p=lttng-tools.git Fix format string warnings Print size_t as %zu. Signed-off-by: Simon Marchi Signed-off-by: Mathieu Desnoyers --- diff --git a/ltt-sessiond/kernel-ctl.c b/ltt-sessiond/kernel-ctl.c index 3dd146dd4..407dd5804 100644 --- a/ltt-sessiond/kernel-ctl.c +++ b/ltt-sessiond/kernel-ctl.c @@ -599,7 +599,7 @@ ssize_t kernel_list_events(int tracer_fd, struct lttng_event **events) while ((size = fscanf(fp, "event { name = %m[^;]; };%n\n", &event, &pos)) == 1) { if (count > nbmem) { - DBG("Reallocating event list from %zd to %zd bytes", nbmem, + DBG("Reallocating event list from %zu to %zu bytes", nbmem, nbmem + KERNEL_EVENT_LIST_SIZE); /* Adding the default size again */ nbmem += KERNEL_EVENT_LIST_SIZE; @@ -615,7 +615,7 @@ ssize_t kernel_list_events(int tracer_fd, struct lttng_event **events) *events = elist; - DBG("Kernel list events done (%ld events)", count); + DBG("Kernel list events done (%zu events)", count); return count; diff --git a/ltt-sessiond/main.c b/ltt-sessiond/main.c index 567742ebb..38230dbba 100644 --- a/ltt-sessiond/main.c +++ b/ltt-sessiond/main.c @@ -2062,7 +2062,7 @@ static int process_client_msg(struct command_ctx *cmd_ctx) goto setup_error; } - DBG("Listing events (%ld events)", nb_event); + DBG("Listing events (%zu events)", nb_event); list_lttng_events(kchan, (struct lttng_event *)(cmd_ctx->llm->payload));