]> git.proxmox.com Git - mirror_zfs.git/commit
Fix -Wattribute-warning in edonr
authorBrian Behlendorf <behlendorf1@llnl.gov>
Mon, 20 Jun 2022 19:37:38 +0000 (19:37 +0000)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Mon, 27 Jun 2022 21:19:04 +0000 (14:19 -0700)
commit18df6afdfc63b7c27cbb2b6152d76c40196e9dbb
treee6c4cb003a107771782c65e0fdb1da9fdea7cbd5
parentb0f7dd276c930129fef8575e15a36ec659e31cd2
Fix -Wattribute-warning in edonr

The wrong union memory was being accessed in EdonRInit resulting in
a write beyond size of field compiler warning.  Reference the correct
member to resolve the warning.  The warning was correct and this in
case the mistake was harmless.

    In function ‘fortify_memcpy_chk’,
    inlined from ‘EdonRInit’ at zfs/module/icp/algs/edonr/edonr.c:494:3:
    ./include/linux/fortify-string.h:344:25: error: call to
    ‘__write_overflow_field’ declared with attribute warning:
    detected write beyond size of field (1st parameter);
    maybe use struct_group()? [-Werror=attribute-warning]

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
module/icp/algs/edonr/edonr.c