All of lore.kernel.org
 help / color / mirror / Atom feed
From: Greg Kurz <groug@kaod.org>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: qemu-devel@nongnu.org, Eric Blake <eblake@redhat.com>,
	Howard Spoelstra <hsp.cat7@gmail.com>,
	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 11:34:25 +0200	[thread overview]
Message-ID: <20180508113425.003c5031@bahia.lan> (raw)
In-Reply-To: <71b68bd5-e50b-3baa-3f72-f6af78db4e2e@redhat.com>

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 ?

Cheers,

--
Greg

  reply	other threads:[~2018-05-08  9:34 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 [this message]
2018-05-08 11:01     ` Peter Maydell
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=20180508113425.003c5031@bahia.lan \
    --to=groug@kaod.org \
    --cc=david@gibson.dropbear.id.au \
    --cc=eblake@redhat.com \
    --cc=hsp.cat7@gmail.com \
    --cc=peter.maydell@linaro.org \
    --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.