From 80819cc01e1702275cd5672460edcdc1dd1f799c Mon Sep 17 00:00:00 2001 From: Ned Bass Date: Tue, 3 Aug 2010 11:17:28 -0700 Subject: [PATCH] remove compiler warning on 32-bit systems commit 421d95b3eae80b18666761c3d97d2f6f3a2994b8 introduced a compiler warning on 32-bit systems about casting a pointer to an integer of a different size. This commit removes the warning by casting the arguments to snprintf in the same manner as the original VERIFY3_IMPL macro. --- lib/libspl/include/assert.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/libspl/include/assert.h b/lib/libspl/include/assert.h index ace72fb35b..9073b41f3a 100644 --- a/lib/libspl/include/assert.h +++ b/lib/libspl/include/assert.h @@ -69,7 +69,8 @@ extern void __assert(const char *, const char *, int); char *__buf = alloca(256); \ (void) snprintf(__buf, 256, "%s %s %s (0x%llx %s 0x%llx)", \ #LEFT, #OP, #RIGHT, \ - (u_longlong_t)(LEFT), #OP, (u_longlong_t)(RIGHT)); \ + (u_longlong_t)((TYPE)(LEFT)), #OP, \ + (u_longlong_t)((TYPE)(RIGHT))); \ __assert(__buf, __FILE__, __LINE__); \ } \ } while (0)