From: Michael S. Tsirkin Date: Fri, 1 Feb 2019 22:57:42 +0000 (-0500) Subject: r2d: fix build on mingw X-Git-Tag: v4.0.0-rc0~117^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7de7b6087ef0443c7eef7b8b618ef9a8254a452e;p=thirdparty%2Fqemu.git 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 --- diff --git a/hw/sh4/r2d.c b/hw/sh4/r2d.c index 5b399e7161d..dcdb3728cbc 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)