[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, 11 Nov 2021 03:56:01 +0000 (03:56 +0000)
commit35bbf26686ca97d148c4024aa72fbf9ccfb58d85
tree7c7f51c8906aec21e2fab121acf60b36ed457de2
parent54996c2dbae30c6ad32b4fb84832eab6c67b6b8a
[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