All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Maydell <peter.maydell@linaro.org>
To: Greg Kurz <groug@kaod.org>
Cc: QEMU Developers <qemu-devel@nongnu.org>,
	Eric Blake <eblake@redhat.com>,
	Howard Spoelstra <hsp.cat7@gmail.com>,
	qemu-ppc <qemu-ppc@nongnu.org>,
	David Gibson <david@gibson.dropbear.id.au>
Subject: Re: [Qemu-devel] [PATCH] ppc: e500: use g_strdup_printf() instead of snprintf()
Date: Tue, 8 May 2018 12:01:59 +0100	[thread overview]
Message-ID: <CAFEAcA8bbdzEPZLA1sTXH-eGeOPUZw8f=p3_a9c4ERq35+mDew@mail.gmail.com> (raw)
In-Reply-To: <20180508113425.003c5031@bahia.lan>

On 8 May 2018 at 10:34, Greg Kurz <groug@kaod.org> wrote:
> On Mon, 7 May 2018 12:53:45 -0500
> Eric Blake <eblake@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.cat7@gmail.com>
>> > Signed-off-by: Greg Kurz <groug@kaod.org>
>> > ---
>> >   hw/ppc/e500.c |   39 +++++++++++++++++++++++----------------
>> >   1 file changed, 23 insertions(+), 16 deletions(-)
>> >
>>
>> Reviewed-by: Eric Blake <eblake@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	other threads:[~2018-05-08 11:02 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-07  9:02 [Qemu-devel] [PATCH] ppc: e500: use g_strdup_printf() instead of snprintf() Greg Kurz
2018-05-07 17:53 ` Eric Blake
2018-05-08  9:34   ` Greg Kurz
2018-05-08 11:01     ` Peter Maydell [this message]
2018-06-04  0:43       ` David Gibson

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='CAFEAcA8bbdzEPZLA1sTXH-eGeOPUZw8f=p3_a9c4ERq35+mDew@mail.gmail.com' \
    --to=peter.maydell@linaro.org \
    --cc=david@gibson.dropbear.id.au \
    --cc=eblake@redhat.com \
    --cc=groug@kaod.org \
    --cc=hsp.cat7@gmail.com \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-ppc@nongnu.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.