[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)
committerPeter Michael Green <plugwash@raspbian.org>
Mon, 15 Nov 2021 00:13:31 +0000 (00:13 +0000)
commite653e737d1595b3ca22c16c4ebbd3ae882cb1491
tree6b318597672865725b25738b7baa04d3bbb775e1
parent892d176985b735f22c41f28b87d735c429c969d8
[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