summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael S. Tsirkin2019-02-01 23:57:42 +0100
committerMichael S. Tsirkin2019-02-05 16:58:33 +0100
commit7de7b6087ef0443c7eef7b8b618ef9a8254a452e (patch)
treeeff7627d9e90e09a944fae64e22addd75f2b30c1
parentmmap-alloc: fix hugetlbfs misaligned length in ppc64 (diff)
downloadqemu-7de7b6087ef0443c7eef7b8b618ef9a8254a452e.tar.gz
qemu-7de7b6087ef0443c7eef7b8b618ef9a8254a452e.tar.xz
qemu-7de7b6087ef0443c7eef7b8b618ef9a8254a452e.zip
r2d: fix build on mingw
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>
-rw-r--r--hw/sh4/r2d.c2
1 files changed, 1 insertions, 1 deletions
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)