[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>
Tue, 2 Nov 2021 23:56:45 +0000 (23:56 +0000)
commit2f49e08d927a238629632b81403edbf1e91c6ea6
tree6fa9733e3e321ebb4b960565c3e7be9c78290aaf
parent91bbc881b8bcfd6896268f99a4a6fdefed77e2e5
[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