Re: [kvm-unit-tests PATCH] lib: use %zu conversion for sizeof to fix i386 build

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



2017-05-12 17:43+0200, Paolo Bonzini:
> 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@xxxxxxxxxx>
> >> ---
> > 
> > Ugh, and I didn't test it ... libcflat doesn't support %z.
> 
> Let's add it, I have sent a patch.

Right, shame on me for fixing it on the wrong side!
Applied after your patch,

Thanks.



[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux