[ltt-dev] [PATCH] Fix format string warnings (lttng-tools)
Mathieu Desnoyers
compudj at krystal.dyndns.org
Mon Aug 8 15:40:46 EDT 2011
Merged, thanks!
Mathieu
* simon.marchi at polymtl.ca (simon.marchi at polymtl.ca) wrote:
> From: Simon Marchi <simon.marchi at ericsson.com>
>
> Print size_t as %zu.
>
> Signed-off-by: Simon Marchi <simon.marchi at polymtl.ca>
> ---
> ltt-sessiond/kernel-ctl.c | 4 ++--
> ltt-sessiond/main.c | 2 +-
> 2 files changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/ltt-sessiond/kernel-ctl.c b/ltt-sessiond/kernel-ctl.c
> index 3dd146d..407dd58 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 567742e..38230db 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));
> --
> 1.7.2.5
>
>
> _______________________________________________
> ltt-dev mailing list
> ltt-dev at lists.casi.polymtl.ca
> http://lists.casi.polymtl.ca/cgi-bin/mailman/listinfo/ltt-dev
>
--
Mathieu Desnoyers
Operating System Efficiency R&D Consultant
EfficiOS Inc.
http://www.efficios.com
More information about the lttng-dev
mailing list