Fix gcc unused value warning in FreeBSD simd.h
commitc480e06d88e07fe5b8aaa920cc966498bb321a8d
authorDimitry Andric <dimitry@andric.com>
Tue, 29 Oct 2024 18:49:54 +0000 (29 19:49 +0100)
committerGitHub <noreply@github.com>
Tue, 29 Oct 2024 18:49:54 +0000 (29 14:49 -0400)
treefce539a7f94d18128ad4e69e38da6ca9508e5ca4
parente5d1f6816758f3ab1939608a9a45c18ec36bef41
Fix gcc unused value warning in FreeBSD simd.h

The macros `simd_stat_init()` and `simd_stat_fini()` in FreeBSD's
`simd.h` are defined as zero, but they are actually only used as
statements. Replace the definitions with `do {} while (0)` instead, to
avoid gcc `-Wunused-value` warnings.

Reviewed-by: Tino Reichardt <milky-zfs@mcmilk.de>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Alexander Motin <mav@FreeBSD.org>
Reviewed-by: Toomas Soome <tsoome@me.com>
Signed-off-by: Dimitry Andric <dimitry@andric.com>
Closes #16693
include/os/freebsd/spl/sys/simd.h