Skip to content

Commit

Permalink
Refactor VERIFYF to silence (void) complaining
Browse files Browse the repository at this point in the history
Signed-off-by: Rich Ercolani <rincebrain@gmail.com>
  • Loading branch information
rincebrain committed Feb 15, 2024
1 parent 037929f commit f10c4c4
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions include/os/linux/spl/sys/debug.h
Original file line number Diff line number Diff line change
Expand Up @@ -102,10 +102,11 @@ spl_assert(const char *buf, const char *file, const char *func, int line)
spl_assert("VERIFY(" #cond ") failed\n", \
__FILE__, __FUNCTION__, __LINE__))

#define VERIFYF(cond, str, ...) \
(void) (unlikely(!(cond)) && \
spl_panic(__FILE__, __FUNCTION__, __LINE__, \
"VERIFY(" #cond ") failed " str "\n", __VA_ARGS__))
#define VERIFYF(cond, str, ...) do { \
if (unlikely(!cond)) \
spl_panic(__FILE__, __FUNCTION__, __LINE__, \
"VERIFY(" #cond ") failed " str "\n", __VA_ARGS__));\
} while (0)

#define VERIFY3B(LEFT, OP, RIGHT) do { \
const boolean_t _verify3_left = (boolean_t)(LEFT); \
Expand Down

0 comments on commit f10c4c4

Please sign in to comment.