Replace ASSERTV macro with compiler annotation

Remove the ASSERTV macro and handle suppressing unused 
compiler warnings for variables only in ASSERTs using the 
__attribute__((unused)) compiler annotation.  The annotation
is understood by both gcc and clang.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Jorgen Lundman <lundman@lundman.net>
Signed-off-by: Matt Macy <mmacy@FreeBSD.org>
Closes #9671
This commit is contained in:
Matthew Macy
2019-12-05 12:37:00 -08:00
committed by Brian Behlendorf
parent 12395c7b0b
commit 2a8ba608d3
28 changed files with 66 additions and 61 deletions
+1 -1
View File
@@ -141,7 +141,7 @@ dsl_dir_evict_async(void *dbu)
{
dsl_dir_t *dd = dbu;
int t;
ASSERTV(dsl_pool_t *dp = dd->dd_pool);
dsl_pool_t *dp __maybe_unused = dd->dd_pool;
dd->dd_dbuf = NULL;