From: Paolo Bonzini <pbonzini@redhat.com>
To: "Radim Krčmář" <rkrcmar@redhat.com>, kvm@vger.kernel.org
Cc: Peter Feiner <pfeiner@google.com>
Subject: Re: [kvm-unit-tests PATCH] lib: use %zu conversion for sizeof to fix i386 build
Date: Fri, 12 May 2017 17:43:03 +0200 [thread overview]
Message-ID: <97fe2204-3ecc-fa2a-654e-0fc80cf10c80@redhat.com> (raw)
In-Reply-To: <20170512152846.GC13216@potion>
On 12/05/2017 17:28, Radim Krčmář wrote:
> 2017-05-12 17:15+0200, Radim Krčmář:
>> Fixes this GCC error:
>>
>> In file included from lib/report.c:13:0:
>> lib/libcflat.h:134:10: error: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 6 has type ‘unsigned int’ [-Werror=format=]
>> printf("%s:%d: assert failed: %s: " fmt "\n", \
>> ^
>> lib/report.c:53:2: note: in expansion of macro ‘assert_msg’
>> assert_msg(len < sizeof(prefixes), "%d >= %lu", len, sizeof(prefixes));
>> ^~~~~~~~~~
>> lib/report.c:53:46: note: format string is defined here
>> assert_msg(len < sizeof(prefixes), "%d >= %lu", len, sizeof(prefixes));
>> ~~^
>> %u
>>
>> Signed-off-by: Radim Krčmář <rkrcmar@redhat.com>
>> ---
>
> Ugh, and I didn't test it ... libcflat doesn't support %z.
Let's add it, I have sent a patch.
Paolo
next prev parent reply other threads:[~2017-05-12 15:43 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-12 15:15 [kvm-unit-tests PATCH] lib: use %zu conversion for sizeof to fix i386 build Radim Krčmář
2017-05-12 15:23 ` Paolo Bonzini
2017-05-12 16:00 ` Peter Feiner
2017-05-12 15:28 ` Radim Krčmář
2017-05-12 15:43 ` Paolo Bonzini [this message]
2017-05-12 15:57 ` Radim Krčmář
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=97fe2204-3ecc-fa2a-654e-0fc80cf10c80@redhat.com \
--to=pbonzini@redhat.com \
--cc=kvm@vger.kernel.org \
--cc=pfeiner@google.com \
--cc=rkrcmar@redhat.com \
/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