summary refs log tree commit diff stats
path: root/ui/x_keymap.c
diff options
context:
space:
mode:
authorEric Blake <eblake@redhat.com>2018-03-27 15:21:51 -0500
committerPaolo Bonzini <pbonzini@redhat.com>2018-04-09 16:36:40 +0200
commit84c868f6b8f8c1be9d3d65df93cf00b30821401c (patch)
treeaa1ca4d570d830e8f2856a44aeb84471b57278d7 /ui/x_keymap.c
parent01366ef9a4a6dd1240614960561cdba5e7220d14 (diff)
downloadfocaccia-qemu-84c868f6b8f8c1be9d3d65df93cf00b30821401c.tar.gz
focaccia-qemu-84c868f6b8f8c1be9d3d65df93cf00b30821401c.zip
dump: Fix build with newer gcc
gcc 8 on rawhide is picky enough to complain:

/home/dummy/qemu/dump.c: In function 'create_header32':
/home/dummy/qemu/dump.c:817:5: error: 'strncpy' output truncated before terminating nul copying 8 bytes from a string of the same length [-Werror=stringop-truncation]
     strncpy(dh->signature, KDUMP_SIGNATURE, strlen(KDUMP_SIGNATURE));
     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

But we already have SIG_LEN defined as the right length without needing
to do a strlen(), and memcpy() is better than strncpy() when we know
we do not want a trailing NUL byte.

Signed-off-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'ui/x_keymap.c')
0 files changed, 0 insertions, 0 deletions