HomeFreeBSD

Fix gcc unused value warnings in FreeBSD zfs_prop.c

Description

Fix gcc unused value warnings in FreeBSD zfs_prop.c

With gcc we are seeing the following -Werror warnings:

/workspace/src/sys/contrib/openzfs/include/os/freebsd/spl/sys/simd.h:53:33: error: statement with no effect [-Werror=unused-value]
   53 | #define simd_stat_init()        0
      |                                 ^
/workspace/src/sys/contrib/openzfs/module/zcommon/zfs_prop.c:1092:9: note: in expansion of macro 'simd_stat_init'
 1092 |         simd_stat_init();
      |         ^~~~~~~~~~~~~~
/workspace/src/sys/contrib/openzfs/module/zcommon/zfs_prop.c: In function 'zcommon_fini':
/workspace/src/sys/contrib/openzfs/include/os/freebsd/spl/sys/simd.h:54:33: error: statement with no effect [-Werror=unused-value]
   54 | #define simd_stat_fini()        0
      |                                 ^
/workspace/src/sys/contrib/openzfs/module/zcommon/zfs_prop.c:1100:9: note: in expansion of macro 'simd_stat_fini'
 1100 |         simd_stat_fini();
      |         ^~~~~~~~~~~~~~

Both simd_stat_init() and simd_stat_fini() are defined in the
FreeBSD specific version of simd.h:

#define	simd_stat_init()	0
#define	simd_stat_fini()	0

These should both be defined as do {} while (0) instead, similar to
other macros in this file.

Reviewed by: mav, tsoome (upstream)
Obtained from: https://github.com/openzfs/zfs/pull/16693
MFC after: 3 days
Differential Revision: https://reviews.freebsd.org/D47297

Details

Provenance
dimAuthored on Sun, Oct 27, 2:15 PM
Parents
rGf35ccf46c7c6: flua: lposix: add fnmatch function
Branches
Unknown
Tags
Unknown