From c000c83361ccdd0c0bbfe803af67bf5a5db60506 Mon Sep 17 00:00:00 2001 From: Dimitry Andric Date: Sun, 27 Oct 2024 15:21:36 +0100 Subject: [PATCH] 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. Signed-off-by: Dimitry Andric --- include/os/freebsd/spl/sys/simd.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/os/freebsd/spl/sys/simd.h b/include/os/freebsd/spl/sys/simd.h index 6bc46755c4e3..d16e1db5e826 100644 --- a/include/os/freebsd/spl/sys/simd.h +++ b/include/os/freebsd/spl/sys/simd.h @@ -50,7 +50,7 @@ #define kfpu_fini() do {} while (0) #endif -#define simd_stat_init() 0 -#define simd_stat_fini() 0 +#define simd_stat_init() do {} while (0) +#define simd_stat_fini() do {} while (0) #endif