public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Xiao Yang <yangx.jy@cn.fujitsu.com>
To: Joe Perches <joe@perches.com>
Cc: <linux-kernel@vger.kernel.org>, <peterz@infradead.org>,
	<mingo@redhat.com>, <acme@kernel.org>
Subject: Re: [PATCH] tools/perf/util/*.c: Use "%zd" output format for size_t type
Date: Wed, 26 Feb 2020 09:01:31 +0800	[thread overview]
Message-ID: <5E55C36B.1060601@cn.fujitsu.com> (raw)
In-Reply-To: <37831d22bd91f9694f7b35be158969fb997cc544.camel@perches.com>

On 2020/2/26 7:02, Joe Perches wrote:
> On Tue, 2020-02-25 at 14:39 +0800, Xiao Yang wrote:
>> Avoid the following errors when building perf:
>> -----------------------------------------------
>> 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);
> []
>> diff --git 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): %zd to %zd\n", src_size, decomp_size);
> likely better as %zu, etc...
Hi,

Sorry,  %zu is obvious better.
I will send v2 patch shortly.

Thanks,
Xiao Yang
>
>
>
> .
>




      reply	other threads:[~2020-02-26  1:01 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-25  6:39 [PATCH] tools/perf/util/*.c: Use "%zd" output format for size_t type Xiao Yang
2020-02-25 23:02 ` Joe Perches
2020-02-26  1:01   ` 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=5E55C36B.1060601@cn.fujitsu.com \
    --to=yangx.jy@cn.fujitsu.com \
    --cc=acme@kernel.org \
    --cc=joe@perches.com \
    --cc=linux-kernel@vger.kernel.org \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox