From f6ce6944306db6d9110178778d3a9d04db26e1be Mon Sep 17 00:00:00 2001 From: Bas Schouten Date: Wed, 11 Apr 2012 17:18:30 +0200 Subject: [PATCH] Bug 719776 - Part 1 - Followup: Fix one more case of assuming ASSERT expands to an expression. r=bustage --- js/src/assembler/wtf/Assertions.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/js/src/assembler/wtf/Assertions.h b/js/src/assembler/wtf/Assertions.h index 1c1d63674e8c..29a4f10f7e59 100644 --- a/js/src/assembler/wtf/Assertions.h +++ b/js/src/assembler/wtf/Assertions.h @@ -38,7 +38,10 @@ #endif #define ASSERT(assertion) MOZ_ASSERT(assertion) -#define ASSERT_UNUSED(variable, assertion) (((void)variable), ASSERT(assertion)) +#define ASSERT_UNUSED(variable, assertion) do { \ + (void)variable; \ + ASSERT(assertion); \ +} while (0) #define ASSERT_NOT_REACHED() MOZ_NOT_REACHED("") #define CRASH() MOZ_CRASH() #define COMPILE_ASSERT(exp, name) MOZ_STATIC_ASSERT(exp, #name)