]> git.proxmox.com Git - mirror_qemu.git/commitdiff
r2d: fix build on mingw
authorMichael S. Tsirkin <mst@redhat.com>
Fri, 1 Feb 2019 22:57:42 +0000 (17:57 -0500)
committerMichael S. Tsirkin <mst@redhat.com>
Tue, 5 Feb 2019 15:58:33 +0000 (10:58 -0500)
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

index 5b399e7161d3045c5021f71218530e32ce94672d..dcdb3728cbc529a39fccd6788c6eb807186d6047 100644 (file)
@@ -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)