HomeFreeBSD

Fix -Wattribute-warning in zfs_log_xvattr()

Description

Fix -Wattribute-warning in zfs_log_xvattr()

Restructure the code in zfs_log_xvattr() to use a lr_attr_end
structure when accessing lr_attr_t elements located after the
variable sized array. This makes the code more understandable
and resolves the accessing beyond the end of the field warnings.

Reviewed-by: Ryan Moeller <ryan@iXsystems.com>
Reviewed-by: Alexander Motin <mav@FreeBSD.org>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes #13528
Closes #13575

Details

Provenance
Brian Behlendorf <behlendorf1@llnl.gov>Authored on Jun 20 2022, 10:36 PM
Parents
rGa6e8113fed8a: Silence -Winfinite-recursion warning in luaD_throw()
Branches
Unknown
Tags
Unknown

Event Timeline

Brian Behlendorf <behlendorf1@llnl.gov> committed rGb0f7dd276c93: Fix -Wattribute-warning in zfs_log_xvattr() (authored by Brian Behlendorf <behlendorf1@llnl.gov>).Jun 27 2022, 9:18 PM