diff options
author | Vasily Gorbik <gor@linux.ibm.com> | 2018-06-29 18:32:09 +0300 |
---|---|---|
committer | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2018-07-02 12:25:05 +0300 |
commit | d053d639f00c58122ac0e3fe3a08aa8dc2a08ce6 (patch) | |
tree | aa8d1953fccd9673848eb36ec48124f366b6c4df /include/rdma/rdma_cm_ib.h | |
parent | 627c9b62058ebfd368b7411e7ea5a27df48486c8 (diff) | |
download | linux-d053d639f00c58122ac0e3fe3a08aa8dc2a08ce6.tar.xz |
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>
Diffstat (limited to 'include/rdma/rdma_cm_ib.h')
0 files changed, 0 insertions, 0 deletions