Index: trunk/include/iprt/assert.h
===================================================================
--- trunk/include/iprt/assert.h	(revision 96435)
+++ trunk/include/iprt/assert.h	(revision 96447)
@@ -1598,5 +1598,9 @@
  * used to bail out before taking down the system (the VMMR0 case).
  */
-#define RTAssertReleasePanic()   do { RTAssertShouldPanic(); RTAssertDoPanic(); } while (0)
+#if defined(RT_STRICT) || !defined(RTASSERT_NO_RELEASE_ASSERTIONS)
+# define RTAssertReleasePanic()  do { RTAssertShouldPanic(); RTAssertDoPanic(); } while (0)
+#else
+# define RTAssertReleasePanic()  do { } while (0)
+#endif
 
 
@@ -1606,5 +1610,6 @@
  * @param   expr    Expression which should be true.
  */
-#define AssertRelease(expr)  \
+#if defined(RT_STRICT) || !defined(RTASSERT_NO_RELEASE_ASSERTIONS)
+# define AssertRelease(expr)  \
     do { \
         if (RT_LIKELY(!!(expr))) \
@@ -1616,4 +1621,8 @@
         } \
     } while (0)
+#else
+# define AssertRelease(expr)  do { } while (0)
+#endif
+
 
 /** @def AssertReleaseReturn
@@ -1623,5 +1632,6 @@
  * @param   rc      What is to be presented to return.
  */
-#define AssertReleaseReturn(expr, rc)  \
+#if defined(RT_STRICT) || !defined(RTASSERT_NO_RELEASE_ASSERTIONS)
+# define AssertReleaseReturn(expr, rc)  \
     do { \
         if (RT_LIKELY(!!(expr))) \
@@ -1634,4 +1644,13 @@
         } \
     } while (0)
+#else
+# define AssertReleaseReturn(expr, rc) \
+    do { \
+        if (RT_LIKELY(!!(expr))) \
+        { /* likely */ } \
+        else \
+            return (rc); \
+    } while (0)
+#endif
 
 /** @def AssertReleaseReturnVoid
@@ -1640,5 +1659,6 @@
  * @param   expr    Expression which should be true.
  */
-#define AssertReleaseReturnVoid(expr)  \
+#if defined(RT_STRICT) || !defined(RTASSERT_NO_RELEASE_ASSERTIONS)
+# define AssertReleaseReturnVoid(expr)  \
     do { \
         if (RT_LIKELY(!!(expr))) \
@@ -1651,4 +1671,13 @@
         } \
     } while (0)
+#else
+# define AssertReleaseReturnVoid(expr)  \
+    do { \
+        if (RT_LIKELY(!!(expr))) \
+        { /* likely */ } \
+        else \
+            return; \
+    } while (0)
+#endif
 
 
@@ -1658,5 +1687,6 @@
  * @param   expr    Expression which should be true.
  */
-#define AssertReleaseBreak(expr)  \
+#if defined(RT_STRICT) || !defined(RTASSERT_NO_RELEASE_ASSERTIONS)
+# define AssertReleaseBreak(expr)  \
     if (RT_LIKELY(!!(expr))) \
     { /* likely */ } \
@@ -1668,4 +1698,11 @@
     } else \
         break
+#else
+# define AssertReleaseBreak(expr)  \
+    if (RT_LIKELY(!!(expr))) \
+    { /* likely */ } \
+    else \
+        break
+#endif
 
 /** @def AssertReleaseBreakStmt
@@ -1675,5 +1712,6 @@
  * @param   stmt    Statement to execute before break in case of a failed assertion.
  */
-#define AssertReleaseBreakStmt(expr, stmt)  \
+#if defined(RT_STRICT) || !defined(RTASSERT_NO_RELEASE_ASSERTIONS)
+# define AssertReleaseBreakStmt(expr, stmt)  \
     if (RT_LIKELY(!!(expr))) \
     { /* likely */ } \
@@ -1686,4 +1724,15 @@
     } else \
         break
+#else
+# define AssertReleaseBreakStmt(expr, stmt)  \
+    if (RT_LIKELY(!!(expr))) \
+    { /* likely */ } \
+    else if (1) \
+    { \
+        stmt; \
+        break; \
+    } else \
+        break
+#endif
 
 
@@ -1694,5 +1743,6 @@
  * @param   a       printf argument list (in parenthesis).
  */
-#define AssertReleaseMsg(expr, a)  \
+#if defined(RT_STRICT) || !defined(RTASSERT_NO_RELEASE_ASSERTIONS)
+# define AssertReleaseMsg(expr, a)  \
     do { \
         if (RT_LIKELY(!!(expr))) \
@@ -1705,4 +1755,7 @@
         } \
     } while (0)
+#else
+# define AssertReleaseMsg(expr, a) do { } while (0)
+#endif
 
 /** @def AssertReleaseMsgReturn
@@ -1713,5 +1766,6 @@
  * @param   rc      What is to be presented to return.
  */
-#define AssertReleaseMsgReturn(expr, a, rc)  \
+#if defined(RT_STRICT) || !defined(RTASSERT_NO_RELEASE_ASSERTIONS)
+# define AssertReleaseMsgReturn(expr, a, rc)  \
     do { \
         if (RT_LIKELY(!!(expr))) \
@@ -1725,4 +1779,13 @@
         } \
     } while (0)
+#else
+# define AssertReleaseMsgReturn(expr, a, rc)  \
+    do { \
+        if (RT_LIKELY(!!(expr))) \
+        { /* likely */ } \
+        else \
+            return (rc); \
+    } while (0)
+#endif
 
 /** @def AssertReleaseMsgReturnVoid
@@ -1732,5 +1795,6 @@
  * @param   a       printf argument list (in parenthesis).
  */
-#define AssertReleaseMsgReturnVoid(expr, a)  \
+#if defined(RT_STRICT) || !defined(RTASSERT_NO_RELEASE_ASSERTIONS)
+# define AssertReleaseMsgReturnVoid(expr, a)  \
     do { \
         if (RT_LIKELY(!!(expr))) \
@@ -1744,4 +1808,13 @@
         } \
     } while (0)
+#else
+# define AssertReleaseMsgReturnVoid(expr, a)  \
+    do { \
+        if (RT_LIKELY(!!(expr))) \
+        { /* likely */ } \
+        else \
+            return; \
+    } while (0)
+#endif
 
 
@@ -1752,5 +1825,6 @@
  * @param   a       printf argument list (in parenthesis).
  */
-#define AssertReleaseMsgBreak(expr, a)  \
+#if defined(RT_STRICT) || !defined(RTASSERT_NO_RELEASE_ASSERTIONS)
+# define AssertReleaseMsgBreak(expr, a)  \
     if (RT_LIKELY(!!(expr))) \
     { /* likely */ } \
@@ -1763,4 +1837,13 @@
     } else \
         break
+#else
+# define AssertReleaseMsgBreak(expr, a)  \
+    if (RT_LIKELY(!!(expr))) \
+    { /* likely */ } \
+    else if (1) \
+        break; \
+    else \
+        break
+#endif
 
 /** @def AssertReleaseMsgBreakStmt
@@ -1771,5 +1854,6 @@
  * @param   stmt    Statement to execute before break in case of a failed assertion.
  */
-#define AssertReleaseMsgBreakStmt(expr, a, stmt)  \
+#if defined(RT_STRICT) || !defined(RTASSERT_NO_RELEASE_ASSERTIONS)
+# define AssertReleaseMsgBreakStmt(expr, a, stmt)  \
     if (RT_LIKELY(!!(expr))) \
     { /* likely */ } \
@@ -1783,4 +1867,15 @@
     } else \
         break
+#else
+# define AssertReleaseMsgBreakStmt(expr, a, stmt)  \
+    if (RT_LIKELY(!!(expr))) \
+    { /* likely */ } \
+    else if (1) \
+    { \
+        stmt; \
+        break; \
+    } else \
+        break
+#endif
 
 
@@ -1788,9 +1883,13 @@
  * An assertion failed, hit a breakpoint.
  */
-#define AssertReleaseFailed()  \
+#if defined(RT_STRICT) || !defined(RTASSERT_NO_RELEASE_ASSERTIONS)
+# define AssertReleaseFailed()  \
     do { \
         RTAssertMsg1Weak((const char *)0, __LINE__, __FILE__, RT_GCC_EXTENSION __PRETTY_FUNCTION__); \
         RTAssertReleasePanic(); \
     } while (0)
+#else
+# define AssertReleaseFailed() do { } while (0)
+#endif
 
 /** @def AssertReleaseFailedReturn
@@ -1799,5 +1898,6 @@
  * @param   rc      What is to be presented to return.
  */
-#define AssertReleaseFailedReturn(rc)  \
+#if defined(RT_STRICT) || !defined(RTASSERT_NO_RELEASE_ASSERTIONS)
+# define AssertReleaseFailedReturn(rc)  \
     do { \
         RTAssertMsg1Weak((const char *)0, __LINE__, __FILE__, RT_GCC_EXTENSION __PRETTY_FUNCTION__); \
@@ -1805,9 +1905,14 @@
         return (rc); \
     } while (0)
+#else
+# define AssertReleaseFailedReturn(rc)  \
+    do { return (rc); } while (0)
+#endif
 
 /** @def AssertReleaseFailedReturnVoid
  * An assertion failed, hit a breakpoint and return.
  */
-#define AssertReleaseFailedReturnVoid()  \
+#if defined(RT_STRICT) || !defined(RTASSERT_NO_RELEASE_ASSERTIONS)
+# define AssertReleaseFailedReturnVoid()  \
     do { \
         RTAssertMsg1Weak((const char *)0, __LINE__, __FILE__, RT_GCC_EXTENSION __PRETTY_FUNCTION__); \
@@ -1815,10 +1920,14 @@
         return; \
     } while (0)
-
+#else
+# define AssertReleaseFailedReturnVoid()  \
+    do { return; } while (0)
+#endif
 
 /** @def AssertReleaseFailedBreak
  * An assertion failed, hit a breakpoint and break.
  */
-#define AssertReleaseFailedBreak()  \
+#if defined(RT_STRICT) || !defined(RTASSERT_NO_RELEASE_ASSERTIONS)
+# define AssertReleaseFailedBreak()  \
     if (1) { \
         RTAssertMsg1Weak((const char *)0, __LINE__, __FILE__, RT_GCC_EXTENSION __PRETTY_FUNCTION__); \
@@ -1827,4 +1936,11 @@
     } else \
         break
+#else
+# define AssertReleaseFailedBreak()  \
+    if (1) \
+        break; \
+    else \
+        break
+#endif
 
 /** @def AssertReleaseFailedBreakStmt
@@ -1833,5 +1949,6 @@
  * @param   stmt    Statement to execute before break.
  */
-#define AssertReleaseFailedBreakStmt(stmt)  \
+#if defined(RT_STRICT) || !defined(RTASSERT_NO_RELEASE_ASSERTIONS)
+# define AssertReleaseFailedBreakStmt(stmt)  \
     if (1) { \
         RTAssertMsg1Weak((const char *)0, __LINE__, __FILE__, RT_GCC_EXTENSION __PRETTY_FUNCTION__); \
@@ -1841,5 +1958,12 @@
     } else \
         break
-
+#else
+# define AssertReleaseFailedBreakStmt(stmt)  \
+    if (1) { \
+        stmt; \
+        break; \
+    } else \
+        break
+#endif
 
 /** @def AssertReleaseMsgFailed
@@ -1848,5 +1972,6 @@
  * @param   a   printf argument list (in parenthesis).
  */
-#define AssertReleaseMsgFailed(a)  \
+#if defined(RT_STRICT) || !defined(RTASSERT_NO_RELEASE_ASSERTIONS)
+# define AssertReleaseMsgFailed(a)  \
     do { \
         RTAssertMsg1Weak((const char *)0, __LINE__, __FILE__, RT_GCC_EXTENSION __PRETTY_FUNCTION__); \
@@ -1854,4 +1979,7 @@
         RTAssertReleasePanic(); \
     } while (0)
+#else
+# define AssertReleaseMsgFailed(a)  do { } while (0)
+#endif
 
 /** @def AssertReleaseMsgFailedReturn
@@ -1861,5 +1989,6 @@
  * @param   rc      What is to be presented to return.
  */
-#define AssertReleaseMsgFailedReturn(a, rc) \
+#if defined(RT_STRICT) || !defined(RTASSERT_NO_RELEASE_ASSERTIONS)
+# define AssertReleaseMsgFailedReturn(a, rc) \
     do { \
         RTAssertMsg1Weak((const char *)0, __LINE__, __FILE__, RT_GCC_EXTENSION __PRETTY_FUNCTION__); \
@@ -1868,4 +1997,8 @@
         return (rc); \
     } while (0)
+#else
+# define AssertReleaseMsgFailedReturn(a, rc) \
+    do { return (rc); } while (0)
+#endif
 
 /** @def AssertReleaseMsgFailedReturnVoid
@@ -1874,5 +2007,6 @@
  * @param   a   printf argument list (in parenthesis).
  */
-#define AssertReleaseMsgFailedReturnVoid(a) \
+#if defined(RT_STRICT) || !defined(RTASSERT_NO_RELEASE_ASSERTIONS)
+# define AssertReleaseMsgFailedReturnVoid(a) \
     do { \
         RTAssertMsg1Weak((const char *)0, __LINE__, __FILE__, RT_GCC_EXTENSION __PRETTY_FUNCTION__); \
@@ -1881,4 +2015,8 @@
         return; \
     } while (0)
+#else
+# define AssertReleaseMsgFailedReturnVoid(a) \
+    do { return; } while (0)
+#endif
 
 
@@ -1888,5 +2026,6 @@
  * @param   a   printf argument list (in parenthesis).
  */
-#define AssertReleaseMsgFailedBreak(a) \
+#if defined(RT_STRICT) || !defined(RTASSERT_NO_RELEASE_ASSERTIONS)
+# define AssertReleaseMsgFailedBreak(a) \
     if (1) { \
         RTAssertMsg1Weak((const char *)0, __LINE__, __FILE__, RT_GCC_EXTENSION __PRETTY_FUNCTION__); \
@@ -1896,4 +2035,11 @@
     } else \
         break
+#else
+# define AssertReleaseMsgFailedBreak(a) \
+    if (1) \
+        break; \
+    else \
+        break
+#endif
 
 /** @def AssertReleaseMsgFailedBreakStmt
@@ -1903,5 +2049,6 @@
  * @param   stmt    Statement to execute before break.
  */
-#define AssertReleaseMsgFailedBreakStmt(a, stmt) \
+#if defined(RT_STRICT) || !defined(RTASSERT_NO_RELEASE_ASSERTIONS)
+# define AssertReleaseMsgFailedBreakStmt(a, stmt) \
     if (1) { \
         RTAssertMsg1Weak((const char *)0, __LINE__, __FILE__, RT_GCC_EXTENSION __PRETTY_FUNCTION__); \
@@ -1912,5 +2059,12 @@
     } else \
         break
-
+#else
+# define AssertReleaseMsgFailedBreakStmt(a, stmt) \
+    if (1) { \
+        stmt; \
+        break; \
+    } else \
+        break
+#endif
 /** @} */
 
