From: "Michael S. Tsirkin" <mst@redhat.com>
To: qemu-devel@nongnu.org
Cc: Magnus Damm <magnus.damm@gmail.com>,
Aurelien Jarno <aurelien@aurel32.net>
Subject: [Qemu-devel] [PATCH] r2d: fix build on mingw
Date: Fri, 1 Feb 2019 18:00:44 -0500 [thread overview]
Message-ID: <20190201230042.31003-1-mst@redhat.com> (raw)
Comment near strncpy explains kernel_cmdline does
not need to be 0-terminated.
Accordingly mark it as QEMU_NONSTRING.
Without this, gcc warns:
'strncpy' specified bound 256 equals destination size
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
---
hw/sh4/r2d.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/hw/sh4/r2d.c b/hw/sh4/r2d.c
index 5b399e7161..dcdb3728cb 100644
--- a/hw/sh4/r2d.c
+++ b/hw/sh4/r2d.c
@@ -220,7 +220,7 @@ static struct QEMU_PACKED
char pad[232];
- char kernel_cmdline[256];
+ char kernel_cmdline[256] QEMU_NONSTRING;
} boot_params;
static void r2d_init(MachineState *machine)
--
MST
next reply other threads:[~2019-02-01 23:00 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-02-01 23:00 Michael S. Tsirkin [this message]
2019-02-01 23:07 ` [Qemu-devel] [PATCH] r2d: fix build on mingw Philippe Mathieu-Daudé
2019-02-03 17:00 ` no-reply
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=20190201230042.31003-1-mst@redhat.com \
--to=mst@redhat.com \
--cc=aurelien@aurel32.net \
--cc=magnus.damm@gmail.com \
--cc=qemu-devel@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).