diff options
author | Vasily Gorbik <gor@linux.ibm.com> | 2018-06-18 16:50:42 +0200 |
---|---|---|
committer | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2018-07-02 11:24:53 +0200 |
commit | f6ea4d25e95972f482e14cdcefaa0789e6158d35 (patch) | |
tree | 9692fea7a08d23e8b66291ef55356ce37abd6578 /mm | |
parent | s390/dasd: fix gcc 8 stringop-truncation warning (diff) | |
download | linux-f6ea4d25e95972f482e14cdcefaa0789e6158d35.tar.xz linux-f6ea4d25e95972f482e14cdcefaa0789e6158d35.zip |
s390: fix gcc 8 stringop-truncation warnings in proc handlers
arch/s390/kernel/topology.c:591:3: warning: 'strncpy' output truncated
before terminating nul copying 2 bytes from a string of the same length
[-Wstringop-truncation]
strncpy(buf, topology_is_enabled() ? "1\n" : "0\n", ARRAY_SIZE(buf));
arch/s390/appldata/appldata_base.c:326:3: warning: 'strncpy' output truncated
before terminating nul copying 2 bytes from a string of the same length
[-Wstringop-truncation]
strncpy(buf, ops->active ? "1\n" : "0\n", ARRAY_SIZE(buf));
arch/s390/appldata/appldata_base.c:217:3: warning: 'strncpy' output truncated
before terminating nul copying 2 bytes from a string of the same length
[-Wstringop-truncation]
strncpy(buf, appldata_timer_active ? "1\n" : "0\n", ARRAY_SIZE(buf));
To avoid the warning, just reuse memcpy.
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 'mm')
0 files changed, 0 insertions, 0 deletions