qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] r2d: fix build on mingw
@ 2019-02-01 23:00 Michael S. Tsirkin
  2019-02-01 23:07 ` Philippe Mathieu-Daudé
  2019-02-03 17:00 ` no-reply
  0 siblings, 2 replies; 3+ messages in thread
From: Michael S. Tsirkin @ 2019-02-01 23:00 UTC (permalink / raw)
  To: qemu-devel; +Cc: Magnus Damm, Aurelien Jarno

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

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-02-03 17:01 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-02-01 23:00 [Qemu-devel] [PATCH] r2d: fix build on mingw Michael S. Tsirkin
2019-02-01 23:07 ` Philippe Mathieu-Daudé
2019-02-03 17:00 ` no-reply

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).