All of lore.kernel.org
 help / color / mirror / Atom feed
From: Xiao Yang <yangx.jy@cn.fujitsu.com>
To: Xiao Yang <yangx.jy@cn.fujitsu.com>
Cc: <linux-kernel@vger.kernel.org>, <peterz@infradead.org>,
	<mingo@redhat.com>, <acme@kernel.org>, <joe@perches.com>,
	kernel test robot <lkp@intel.com>
Subject: Re: [PATCH v2] tools/perf/util/*.c: Use "%zu" output format for size_t type
Date: Tue, 12 May 2020 10:12:33 +0800	[thread overview]
Message-ID: <5EBA0611.1070608@cn.fujitsu.com> (raw)
In-Reply-To: <20200226010818.8639-1-yangx.jy@cn.fujitsu.com>

Hi,

Ping!

Thanks,
Xiao Yang
On 2020/2/26 9:08, Xiao Yang wrote:
> Avoid the following errors when building perf on i386:
> -----------------------------------------------
> util/session.c: In function 'perf_session__process_compressed_event':
> util/session.c:91:11: error: format '%ld' expects argument of type 'long int', but argument 4 has type 'size_t {aka unsigned int}' [-Werror=format=]
>    pr_debug("decomp (B): %ld to %ld\n", src_size, decomp_size);
> ...
> til/zstd.c: In function 'zstd_decompress_stream':
> util/zstd.c:102:11: error: format '%ld' expects argument of type 'long int', but argument 4 has type 'size_t {aka unsigned int}' [-Werror=format=]
>      pr_err("failed to decompress (B): %ld ->  %ld, dst_size %ld : %s\n",
> ...
> -----------------------------------------------
> 
> Reported-by: kernel test robot<lkp@intel.com>
> Signed-off-by: Xiao Yang<yangx.jy@cn.fujitsu.com>
> ---
>   tools/perf/util/session.c | 2 +-
>   tools/perf/util/zstd.c    | 2 +-
>   2 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/tools/perf/util/session.c b/tools/perf/util/session.c
> index d0d7d25b23e3..55c3d2fefd41 100644
> --- a/tools/perf/util/session.c
> +++ b/tools/perf/util/session.c
> @@ -88,7 +88,7 @@ static int perf_session__process_compressed_event(struct perf_session *session,
>   		session->decomp_last = decomp;
>   	}
> 
> -	pr_debug("decomp (B): %ld to %ld\n", src_size, decomp_size);
> +	pr_debug("decomp (B): %zu to %zu\n", src_size, decomp_size);
> 
>   	return 0;
>   }
> diff --git a/tools/perf/util/zstd.c b/tools/perf/util/zstd.c
> index d2202392ffdb..a051237cacf2 100644
> --- a/tools/perf/util/zstd.c
> +++ b/tools/perf/util/zstd.c
> @@ -99,7 +99,7 @@ size_t zstd_decompress_stream(struct zstd_data *data, void *src, size_t src_size
>   	while (input.pos<  input.size) {
>   		ret = ZSTD_decompressStream(data->dstream,&output,&input);
>   		if (ZSTD_isError(ret)) {
> -			pr_err("failed to decompress (B): %ld ->  %ld, dst_size %ld : %s\n",
> +			pr_err("failed to decompress (B): %zu ->  %zu, dst_size %zu : %s\n",
>   			       src_size, output.size, dst_size, ZSTD_getErrorName(ret));
>   			break;
>   		}




      reply	other threads:[~2020-05-12  2:12 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-26  1:08 [PATCH v2] tools/perf/util/*.c: Use "%zu" output format for size_t type Xiao Yang
2020-05-12  2:12 ` Xiao Yang [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5EBA0611.1070608@cn.fujitsu.com \
    --to=yangx.jy@cn.fujitsu.com \
    --cc=acme@kernel.org \
    --cc=joe@perches.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lkp@intel.com \
    --cc=mingo@redhat.com \
    --cc=peterz@infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.