oslib/linux-blkzoned: fix bogus poiter alignment warning
authorJens Axboe <axboe@kernel.dk>
Tue, 23 Jun 2020 17:41:56 +0000 (11:41 -0600)
committerJens Axboe <axboe@kernel.dk>
Tue, 23 Jun 2020 17:41:56 +0000 (11:41 -0600)
commitf8779edfd9ee3f87f515a846b020c11b984e68f3
tree01a210df9272a126dd1a96527fde7cc465e6724d
parentbaa16486051f83158ffca01fa2e76a7232bb16f3
oslib/linux-blkzoned: fix bogus poiter alignment warning

GCC 10.x reports:

oslib/linux-blkzoned.c: In function ‘blkzoned_report_zones’:
oslib/linux-blkzoned.c:146:18: warning: taking address of packed member of ‘struct blk_zone_report’ may result in an unaligned pointer value [-Waddress-of-packed-member]
  146 |  blkz = (void *) &hdr->zones[0];

which is totally fine, but we can easily avoid this warning by just
setting the 'blkz' pointer to the end of 'hdr'.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
oslib/linux-blkzoned.c