Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1492601

Re: [PATCH] perf tools: Fix building in 32 bit platform

From Arnaldo Carvalho de Melo <acme@kernel.org>
Newsgroups linux.kernel
Subject Re: [PATCH] perf tools: Fix building in 32 bit platform
Date 2016-09-28 15:40 +0200
Message-ID <smnfz-7mO-7@gated-at.bofh.it> (permalink)
References <smech-1D0-1@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


Em Wed, Sep 28, 2016 at 03:58:46AM +0000, Wang Nan escreveu:
> On ARM32 building it report following error:
> 
> util/data-convert-bt.c: In function 'add_bpf_output_values':
> util/data-convert-bt.c:440:3: error: format '%lu' expects argument of type 'long unsigned int', but argument 5 has type 'unsigned int' [-Werror=format]
> cc1: all warnings being treated as errors
> 
> Fix it by changing %lu to %zu.

Thanks, applied.

- Arnaldo
 
> Signed-off-by: Wang Nan <wangnan0@huawei.com>
> Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
> Cc: Jiri Olsa <jolsa@kernel.org>
> ---
>  tools/perf/util/data-convert-bt.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/tools/perf/util/data-convert-bt.c b/tools/perf/util/data-convert-bt.c
> index 4f979bb..7123f4d 100644
> --- a/tools/perf/util/data-convert-bt.c
> +++ b/tools/perf/util/data-convert-bt.c
> @@ -437,7 +437,7 @@ add_bpf_output_values(struct bt_ctf_event_class *event_class,
>  	int ret;
>  
>  	if (nr_elements * sizeof(u32) != raw_size)
> -		pr_warning("Incorrect raw_size (%u) in bpf output event, skip %lu bytes\n",
> +		pr_warning("Incorrect raw_size (%u) in bpf output event, skip %zu bytes\n",
>  			   raw_size, nr_elements * sizeof(u32) - raw_size);
>  
>  	len_type = bt_ctf_event_class_get_field_by_name(event_class, "raw_len");
> -- 
> 1.8.3.4

Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH] perf tools: Fix building in 32 bit platform Wang Nan <wangnan0@huawei.com> - 2016-09-28 06:00 +0200
  Re: [PATCH] perf tools: Fix building in 32 bit platform Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-09-28 15:40 +0200
  [tip:perf/core] perf data: Fix building in 32 bit platform with  libbabeltrace tip-bot for Wang Nan <tipbot@zytor.com> - 2016-09-29 20:20 +0200

csiph-web