]> git.ipfire.org Git - thirdparty/libcgroup.git/commit
lscgroup: Fix strncpy() truncation warning
authorTom Hromatka <tom.hromatka@oracle.com>
Tue, 27 Apr 2021 17:07:31 +0000 (17:07 +0000)
committerTom Hromatka <tom.hromatka@oracle.com>
Tue, 27 Apr 2021 17:07:31 +0000 (17:07 +0000)
commit89aa595200b103edd0461034fba1ea466bd4f675
tree97ccee5b6abd28a50058faf2b0df0d42187fc9d1
parent9ab3bbd8416909ee27374980f64656340409a438
lscgroup: Fix strncpy() truncation warning

Fix the following strncpy() string truncation warning:

In function ‘strncpy’,
    inlined from ‘display_controller_data’ at lscgroup.c:104:2:
/usr/include/x86_64-linux-gnu/bits/string_fortified.h:106:10: warning: ‘__builtin_strncpy’ specified bound 4096 equals destination size [-Wstringop-truncation]
  106 |   return __builtin___strncpy_chk (__dest, __src, __len, __bos (__dest));
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Signed-off-by: Tom Hromatka <tom.hromatka@oracle.com>
src/tools/lscgroup.c