Skip to content

Commit

Permalink
Silence unused-but-set-variable warning
Browse files Browse the repository at this point in the history
This was breaking the kmod port build on FreeBSD with Clang 13.

Use the same trick as we do for ASSERT() to make DNODE_VERIFY() use
its parameter at compile time without actually using it at run time
in non-debug builds.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Ryan Moeller <ryan@iXsystems.com>
Closes openzfs#13507
  • Loading branch information
Ryan Moeller authored and andrewc12 committed Sep 23, 2022
1 parent 5533e3f commit 38bd644
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion include/sys/dnode.h
Original file line number Diff line number Diff line change
Expand Up @@ -616,7 +616,7 @@ extern dnode_stats_t dnode_stats;
#else

#define dprintf_dnode(db, fmt, ...)
#define DNODE_VERIFY(dn)
#define DNODE_VERIFY(dn) ((void) sizeof ((uintptr_t)(dn)))
#define FREE_VERIFY(db, start, end, tx)

#endif
Expand Down

0 comments on commit 38bd644

Please sign in to comment.