Page MenuHomeFreeBSD

Fix gcc unused value warnings in FreeBSD zfs_prop.c
AbandonedPublic

Authored by dim on Sun, Oct 27, 2:16 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Nov 10, 12:44 AM
Unknown Object (File)
Fri, Nov 1, 11:39 AM
Unknown Object (File)
Fri, Nov 1, 11:39 AM
Unknown Object (File)
Fri, Nov 1, 11:28 AM
Unknown Object (File)
Wed, Oct 30, 3:16 PM
Unknown Object (File)
Mon, Oct 28, 5:44 PM
Subscribers

Details

Reviewers
tsoome
mm
Summary

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.

Diff Detail

Repository
rG FreeBSD src repository
Lint
No Lint Coverage
Unit
No Test Coverage
Build Status
Buildable 60206
Build 57090: arc lint + arc unit