Skip to content

Commit

Permalink
r2d: fix build on mingw
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
mstsirkin committed Feb 5, 2019
1 parent 7265c2b commit 7de7b60
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion hw/sh4/r2d.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 7de7b60

Please sign in to comment.