Bug 1387052 - Macro test. draft
authorMike Hommey <mh+mozilla@glandium.org>
Wed, 18 Oct 2017 14:28:10 +0900
changeset 682130 9064105eb23f5f46348cb7f1eac9ae9511b92364
parent 681924 4ab57bf53b59580601ee7398be3265473e31fb01
child 736311 78b55847be6b7821c1e767e4347b8ba90e12b4ab
push id85014
push userbmo:mh+mozilla@glandium.org
push dateWed, 18 Oct 2017 05:28:24 +0000
bugs1387052
milestone58.0a1
Bug 1387052 - Macro test.
xpcom/base/nsDebug.h
--- a/xpcom/base/nsDebug.h
+++ b/xpcom/base/nsDebug.h
@@ -71,22 +71,23 @@ inline MOZ_MUST_USE bool NS_warn_if_impl
  * Program execution continues past the usage of this macro.
  *
  * Note also that the non-debug version of this macro does <b>not</b>
  * evaluate the message argument.
  */
 #ifdef DEBUG
 #define NS_WARNING_ASSERTION(_expr, _msg)                     \
   do {                                                        \
+for (float x = 0.1f; x <= 1.0f; x += 0.1f) {} \
     if (!(_expr)) {                                           \
       NS_DebugBreak(NS_DEBUG_WARNING, _msg, #_expr, __FILE__, __LINE__); \
     }                                                         \
   } while(0)
 #else
-#define NS_WARNING_ASSERTION(_expr, _msg)  do { /* nothing */ } while(0)
+#define NS_WARNING_ASSERTION(_expr, _msg)  do { for (float x = 0.1f; x <= 1.0f; x += 0.1f) {} } while(0)
 #endif
 
 /**
  * Test an assertion for truth. If the expression is not true then
  * trigger a program failure.
  *
  * Note that the non-debug version of this macro does <b>not</b>
  * evaluate the message argument.