From: Cornelia Huck <cohuck@redhat.com>
To: Miroslav Rezanina <mrezanin@redhat.com>
Cc: Thomas Huth <thuth@redhat.com>,
qemu-s390x@nongnu.org, qemu-devel@nongnu.org
Subject: Re: [PATCH v3 2/2] s390x: Use strpadcpy for copying vm name
Date: Thu, 14 Jan 2021 11:16:20 +0100 [thread overview]
Message-ID: <20210114111620.31435df3.cohuck@redhat.com> (raw)
In-Reply-To: <6f86915755219cf6a671788075da4809b57f7d7b.1610607906.git.mrezanin@redhat.com>
On Thu, 14 Jan 2021 08:07:36 +0100
Miroslav Rezanina <mrezanin@redhat.com> wrote:
> Using strncpy with length equal to the size of target array, GCC 11
> reports following warning:
>
> warning: '__builtin_strncpy' specified bound 256 equals destination size [-Wstringop-truncation]
>
> We can prevent this warning by using strpadcpy that copies string
> up to specified length, zeroes target array after copied string
> and does not raise warning when length is equal to target array
> size (and ending '\0' is discarded).
>
> Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
> ---
> target/s390x/kvm.c | 12 +++++-------
> target/s390x/misc_helper.c | 7 +++++--
> 2 files changed, 10 insertions(+), 9 deletions(-)
Thanks, applied.
prev parent reply other threads:[~2021-01-14 10:18 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-14 7:07 [PATCH v3 0/2] Fixing several GCC 11 warnings Miroslav Rezanina
2021-01-14 7:07 ` [PATCH v3 1/2] Fix net.c warning on GCC 11 Miroslav Rezanina
2021-01-14 13:15 ` Philippe Mathieu-Daudé
2021-01-14 14:19 ` Alexander Bulekov
2021-01-14 14:35 ` Philippe Mathieu-Daudé
2021-01-14 14:38 ` Miroslav Rezanina
2021-01-14 14:42 ` Alexander Bulekov
2021-01-14 15:09 ` Philippe Mathieu-Daudé
2021-01-14 14:36 ` Miroslav Rezanina
2021-01-14 7:07 ` [PATCH v3 2/2] s390x: Use strpadcpy for copying vm name Miroslav Rezanina
2021-01-14 8:32 ` Thomas Huth
2021-01-14 10:16 ` Cornelia Huck [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=20210114111620.31435df3.cohuck@redhat.com \
--to=cohuck@redhat.com \
--cc=mrezanin@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=qemu-s390x@nongnu.org \
--cc=thuth@redhat.com \
/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.