2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2024-12-19 10:44:14 +08:00
linux-next/arch/s390/tools
Vasily Gorbik d053d639f0 s390/tools: fix gcc 8 stringop-truncation warnings
Replace strncpy which has been used to copy a substring into buf
without NUL-termination with memcpy to avoid the following gcc 8
warnings:

arch/s390/tools/gen_opcode_table.c: In function ‘add_to_group.isra.4’:
arch/s390/tools/gen_opcode_table.c:260:2: warning: ‘strncpy’
output may be truncated copying 2 bytes from a string of length 19
[-Wstringop-truncation]
  strncpy(group->opcode, insn->opcode, 2);

In function ‘print_opcode_table’,
    inlined from ‘main’ at arch/s390/tools/gen_opcode_table.c:333:2:
arch/s390/tools/gen_opcode_table.c:286:4: warning: ‘strncpy’
output may be truncated copying 2 bytes from a string of length 19
[-Wstringop-truncation]
    strncpy(opcode, insn->opcode, 2);

Reviewed-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2018-07-02 11:25:05 +02:00
..
.gitignore s390/disassembler: add generated gen_opcode_table tool to .gitignore 2018-01-23 07:36:45 +01:00
gen_facilities.c KVM: s390: implement CPU model only facilities 2018-03-09 09:44:17 +00:00
gen_opcode_table.c s390/tools: fix gcc 8 stringop-truncation warnings 2018-07-02 11:25:05 +02:00
Makefile s390/tools: generate header files in arch/s390/include/generated/ 2018-01-23 07:36:53 +01:00
opcodes.txt s390/disassembler: generate opcode tables from text file 2017-11-08 22:11:02 +01:00