qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: Eric Blake <eblake@redhat.com>, qemu-devel@nongnu.org
Cc: qemu-trivial@nongnu.org,
	"Marc-André Lureau" <marcandre.lureau@redhat.com>
Subject: Re: [Qemu-devel] [PATCH for-2.12] dump: Fix build with newer gcc
Date: Fri, 6 Apr 2018 17:23:08 +0200	[thread overview]
Message-ID: <1417354e-cb91-3f1c-a7b7-5e46a6142b2e@redhat.com> (raw)
In-Reply-To: <82cc73cb-ba8a-be38-496a-5dc66d2c6850@redhat.com>

On 06/04/2018 17:06, Eric Blake wrote:
> On 04/03/2018 01:46 PM, Eric Blake wrote:
>> On 03/27/2018 03:21 PM, Eric Blake wrote:
>>> gcc 8 on rawhide is picky enough to complain:
>>>
>>> /home/dummy/qemu/dump.c: In function 'create_header32':
>>> /home/dummy/qemu/dump.c:817:5: error: 'strncpy' output truncated before terminating nul copying 8 bytes from a string of the same length [-Werror=stringop-truncation]
>>>      strncpy(dh->signature, KDUMP_SIGNATURE, strlen(KDUMP_SIGNATURE));
>>>      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>>>
>>> But we already have SIG_LEN defined as the right length without needing
>>> to do a strlen(), and memcpy() is better than strncpy() when we know
>>> we do not want a trailing NUL byte.
>>>
>>> Signed-off-by: Eric Blake <eblake@redhat.com>
>>> ---
>>>  dump.c | 4 ++--
>>>  1 file changed, 2 insertions(+), 2 deletions(-)
>>
>> I'll include this in my qapi+misc pull request for 2.12-rc2
> 
> That pull request was abandoned; Paolo, do you want to pick this up in
> your misc tree?
> 

Ok.

Paolo

      reply	other threads:[~2018-04-06 15:23 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-27 20:21 [Qemu-devel] [PATCH for-2.12] dump: Fix build with newer gcc Eric Blake
2018-03-27 20:36 ` Philippe Mathieu-Daudé
2018-03-27 22:27 ` Marc-André Lureau
2018-03-31  6:49 ` no-reply
2018-04-03 18:46 ` Eric Blake
2018-04-06 15:06   ` Eric Blake
2018-04-06 15:23     ` Paolo Bonzini [this message]

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=1417354e-cb91-3f1c-a7b7-5e46a6142b2e@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=eblake@redhat.com \
    --cc=marcandre.lureau@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-trivial@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).