On 8 May 2018 at 10:34, Greg Kurz <gr...@kaod.org> wrote:
> On Mon, 7 May 2018 12:53:45 -0500
> Eric Blake <ebl...@redhat.com> wrote:
>
>> On 05/07/2018 04:02 AM, Greg Kurz wrote:
>> > qemu-system-ppc fails to build with GCC 8.0.1:
>> >
>> > /home/hsp/src/qemu-master/hw/ppc/e500.c: In function 
>> > ‘ppce500_load_device_tree’:
>> > /home/hsp/src/qemu-master/hw/ppc/e500.c:442:37: error: ‘/pic@’
>> > directive output may be truncated writing 5 bytes into a region of
>> > size between 1 and 128 [-Werror=format-truncation=]
>> >       snprintf(mpic, sizeof(mpic), "%s/pic@%llx", soc, 
>> > MPC8544_MPIC_REGS_OFFSET);
>> >                                       ^~~~~
>>
>> >
>> > Fix this by converting e500 to use g_strdup_printf()+g_free() instead
>> > of snprintf(). This is done globally, even for call sites that don't
>> > break build, since this is the preferred practice in QEMU.
>> >
>> > Reported-by: Howard Spoelstra <hsp.c...@gmail.com>
>> > Signed-off-by: Greg Kurz <gr...@kaod.org>
>> > ---
>> >   hw/ppc/e500.c |   39 +++++++++++++++++++++++----------------
>> >   1 file changed, 23 insertions(+), 16 deletions(-)
>> >
>>
>> Reviewed-by: Eric Blake <ebl...@redhat.com>
>>
>
> Hi Peter,
>
> David said the next pull request for ppc would happen in a month. This
> patch fixes an annoying build break with recent GCC, and it already
> got two positive reviews, is it possible to have it merged upstream ?

Sure; applied to master.

-- PMM

Reply via email to