[PATCH libaio 17/28] harness: Use destination strncpy() expression for sizeof() argument
authorGuillem Jover <guillem@hadrons.org>
Sat, 20 Jul 2019 19:20:58 +0000 (21:20 +0200)
committerGuillem Jover <guillem@debian.org>
Thu, 24 Dec 2020 14:41:17 +0000 (14:41 +0000)
commitfef44b909ec1157285e46ff0d8fc221f7b1cba8a
tree35778ace2505b63a2fe866b2879c46a4965bef7d
parent7faaa16fae98d2e5fe28eff8802c12b1845032e0
[PATCH libaio 17/28] harness: Use destination strncpy() expression for sizeof() argument

Even though this is the same size, as the sizeof() is derived from the
source expression, recent gcc versions will emit a warning, which is
turned into an error by -Werror:

  error: argument to ‘sizeof’ in ‘strncpy’ call is the same expression
    as the source; did you mean to use the size of the destination?
    [-Werror=sizeof-pointer-memaccess]

Signed-off-by: Guillem Jover <guillem@hadrons.org>
Signed-off-by: Jeff Moyer <jmoyer@redhat.com>
Gbp-Pq: Topic upstream
Gbp-Pq: Name 0017-harness-Use-destination-strncpy-expression-for-sizeo.patch
harness/cases/19.t
harness/cases/21.t