Index: /trunk/include/iprt/assert.h
===================================================================
--- /trunk/include/iprt/assert.h	(revision 55864)
+++ /trunk/include/iprt/assert.h	(revision 55865)
@@ -457,5 +457,5 @@
 # define RTAssertMsg1Weak(pszExpr, uLine, pszfile, pszFunction) \
                                 do { } while (0)
-# define RTAssertMsg2Weak       if (0) RTAssertMsg2Weak
+# define RTAssertMsg2Weak       if (1) {} else RTAssertMsg2Weak
 #endif
 
@@ -499,5 +499,7 @@
 # define Assert(expr)  \
     do { \
-        if (RT_UNLIKELY(!(expr))) \
+        if (RT_LIKELY(!!(expr))) \
+        { /* likely */ } \
+        else \
         { \
             RTAssertMsg1Weak(#expr, __LINE__, __FILE__, __PRETTY_FUNCTION__); \
@@ -519,5 +521,7 @@
 # define AssertStmt(expr, stmt)  \
     do { \
-        if (RT_UNLIKELY(!(expr))) \
+        if (RT_LIKELY(!!(expr))) \
+        { /* likely */ } \
+        else \
         { \
             RTAssertMsg1Weak(#expr, __LINE__, __FILE__, __PRETTY_FUNCTION__); \
@@ -529,5 +533,7 @@
 # define AssertStmt(expr, stmt)  \
     do { \
-        if (RT_UNLIKELY(!(expr))) \
+        if (RT_LIKELY(!!(expr))) \
+        { /* likely */ } \
+        else \
         { \
             stmt; \
@@ -547,5 +553,7 @@
 # define AssertReturn(expr, rc) \
     do { \
-        if (RT_UNLIKELY(!(expr))) \
+        if (RT_LIKELY(!!(expr))) \
+        { /* likely */ } \
+        else \
         { \
             RTAssertMsg1Weak(#expr, __LINE__, __FILE__, __PRETTY_FUNCTION__); \
@@ -557,5 +565,7 @@
 # define AssertReturn(expr, rc) \
     do { \
-        if (RT_UNLIKELY(!(expr))) \
+        if (RT_LIKELY(!!(expr))) \
+        { /* likely */ } \
+        else \
             return (rc); \
     } while (0)
@@ -576,5 +586,7 @@
 # define AssertReturnStmt(expr, stmt, rc) \
     do { \
-        if (RT_UNLIKELY(!(expr))) \
+        if (RT_LIKELY(!!(expr))) \
+        { /* likely */ } \
+        else \
         { \
             RTAssertMsg1Weak(#expr, __LINE__, __FILE__, __PRETTY_FUNCTION__); \
@@ -587,5 +599,7 @@
 # define AssertReturnStmt(expr, stmt, rc) \
     do { \
-        if (RT_UNLIKELY(!(expr))) \
+        if (RT_LIKELY(!!(expr))) \
+        { /* likely */ } \
+        else \
         { \
             stmt; \
@@ -604,5 +618,7 @@
 # define AssertReturnVoid(expr) \
     do { \
-        if (RT_UNLIKELY(!(expr))) \
+        if (RT_LIKELY(!!(expr))) \
+        { /* likely */ } \
+        else \
         { \
             RTAssertMsg1Weak(#expr, __LINE__, __FILE__, __PRETTY_FUNCTION__); \
@@ -614,5 +630,7 @@
 # define AssertReturnVoid(expr) \
     do { \
-        if (RT_UNLIKELY(!(expr))) \
+        if (RT_LIKELY(!!(expr))) \
+        { /* likely */ } \
+        else \
             return; \
     } while (0)
@@ -631,5 +649,7 @@
 # define AssertReturnVoidStmt(expr, stmt) \
     do { \
-        if (RT_UNLIKELY(!(expr))) \
+        if (RT_LIKELY(!!(expr))) \
+        { /* likely */ } \
+        else \
         { \
             RTAssertMsg1Weak(#expr, __LINE__, __FILE__, __PRETTY_FUNCTION__); \
@@ -642,5 +662,7 @@
 # define AssertReturnVoidStmt(expr, stmt) \
     do { \
-        if (RT_UNLIKELY(!(expr))) \
+        if (RT_LIKELY(!!(expr))) \
+        { /* likely */ } \
+        else \
         { \
             stmt; \
@@ -659,5 +681,7 @@
 #ifdef RT_STRICT
 # define AssertBreak(expr) \
-    if (RT_UNLIKELY(!(expr))) \
+    if (RT_LIKELY(!!(expr))) \
+    { /* likely */ } \
+    else if (1) \
     { \
         RTAssertMsg1Weak(#expr, __LINE__, __FILE__, __PRETTY_FUNCTION__); \
@@ -667,7 +691,8 @@
 #else
 # define AssertBreak(expr) \
-    if (RT_UNLIKELY(!(expr))) \
-        break; \
-    else do {} while (0)
+    if (RT_LIKELY(!!(expr))) \
+    { /* likely */ } \
+    else \
+        break
 #endif
 
@@ -681,5 +706,8 @@
 #ifdef RT_STRICT
 # define AssertBreakStmt(expr, stmt) \
-    if (RT_UNLIKELY(!(expr))) { \
+    if (RT_LIKELY(!!(expr))) \
+    { /* likely */ } \
+    else if (1) \
+    { \
         RTAssertMsg1Weak(#expr, __LINE__, __FILE__, __PRETTY_FUNCTION__); \
         RTAssertPanic(); \
@@ -689,5 +717,8 @@
 #else
 # define AssertBreakStmt(expr, stmt) \
-    if (RT_UNLIKELY(!(expr))) { \
+    if (RT_LIKELY(!!(expr))) \
+    { /* likely */ } \
+    else if (1) \
+    { \
         stmt; \
         break; \
@@ -704,5 +735,7 @@
 # define AssertMsg(expr, a)  \
     do { \
-        if (RT_UNLIKELY(!(expr))) \
+        if (RT_LIKELY(!!(expr))) \
+        { /* likely */ } \
+        else \
         { \
             RTAssertMsg1Weak(#expr, __LINE__, __FILE__, __PRETTY_FUNCTION__); \
@@ -728,5 +761,7 @@
 # define AssertMsgStmt(expr, a, stmt)  \
     do { \
-        if (RT_UNLIKELY(!(expr))) \
+        if (RT_LIKELY(!!(expr))) \
+        { /* likely */ } \
+        else \
         { \
             RTAssertMsg1Weak(#expr, __LINE__, __FILE__, __PRETTY_FUNCTION__); \
@@ -739,5 +774,7 @@
 # define AssertMsgStmt(expr, a, stmt)  \
     do { \
-        if (RT_UNLIKELY(!(expr))) \
+        if (RT_LIKELY(!!(expr))) \
+        { /* likely */ } \
+        else \
         { \
             stmt; \
@@ -757,5 +794,7 @@
 # define AssertMsgReturn(expr, a, rc)  \
     do { \
-        if (RT_UNLIKELY(!(expr))) \
+        if (RT_LIKELY(!!(expr))) \
+        { /* likely */ } \
+        else \
         { \
             RTAssertMsg1Weak(#expr, __LINE__, __FILE__, __PRETTY_FUNCTION__); \
@@ -768,5 +807,7 @@
 # define AssertMsgReturn(expr, a, rc) \
     do { \
-        if (RT_UNLIKELY(!(expr))) \
+        if (RT_LIKELY(!!(expr))) \
+        { /* likely */ } \
+        else \
             return (rc); \
     } while (0)
@@ -788,5 +829,7 @@
 # define AssertMsgReturnStmt(expr, a, stmt, rc)  \
     do { \
-        if (RT_UNLIKELY(!(expr))) \
+        if (RT_LIKELY(!!(expr))) \
+        { /* likely */ } \
+        else \
         { \
             RTAssertMsg1Weak(#expr, __LINE__, __FILE__, __PRETTY_FUNCTION__); \
@@ -800,5 +843,7 @@
 # define AssertMsgReturnStmt(expr, a, stmt, rc) \
     do { \
-        if (RT_UNLIKELY(!(expr))) \
+        if (RT_LIKELY(!!(expr))) \
+        { /* likely */ } \
+        else \
         { \
             stmt; \
@@ -818,5 +863,7 @@
 # define AssertMsgReturnVoid(expr, a)  \
     do { \
-        if (RT_UNLIKELY(!(expr))) \
+        if (RT_LIKELY(!!(expr))) \
+        { /* likely */ } \
+        else \
         { \
             RTAssertMsg1Weak(#expr, __LINE__, __FILE__, __PRETTY_FUNCTION__); \
@@ -829,5 +876,7 @@
 # define AssertMsgReturnVoid(expr, a) \
     do { \
-        if (RT_UNLIKELY(!(expr))) \
+        if (RT_LIKELY(!!(expr))) \
+        { /* likely */ } \
+        else \
             return; \
     } while (0)
@@ -842,10 +891,12 @@
  * @param   expr    Expression which should be true.
  * @param   a       printf argument list (in parenthesis).
- * @param   stmt    Statement to execute before break in case of a failed assertion.
+ * @param   stmt    Statement to execute before return in case of a failed assertion.
  */
 #ifdef RT_STRICT
 # define AssertMsgReturnVoidStmt(expr, a, stmt)  \
     do { \
-        if (RT_UNLIKELY(!(expr))) \
+        if (RT_LIKELY(!!(expr))) \
+        { /* likely */ } \
+        else \
         { \
             RTAssertMsg1Weak(#expr, __LINE__, __FILE__, __PRETTY_FUNCTION__); \
@@ -859,5 +910,7 @@
 # define AssertMsgReturnVoidStmt(expr, a, stmt) \
     do { \
-        if (RT_UNLIKELY(!(expr))) \
+        if (RT_LIKELY(!!(expr))) \
+        { /* likely */ } \
+        else \
         { \
             stmt; \
@@ -876,6 +929,8 @@
  */
 #ifdef RT_STRICT
-# define AssertMsgBreak(expr, a)  \
-    if (RT_UNLIKELY(!(expr))) \
+# define AssertMsgBreak(expr, a) \
+    if (RT_LIKELY(!!(expr))) \
+    { /* likely */ } \
+    else if (1) \
     { \
         RTAssertMsg1Weak(#expr, __LINE__, __FILE__, __PRETTY_FUNCTION__); \
@@ -886,7 +941,8 @@
 #else
 # define AssertMsgBreak(expr, a) \
-    if (RT_UNLIKELY(!(expr))) \
-        break; \
-    else do {} while (0)
+    if (RT_LIKELY(!!(expr))) \
+    { /* likely */ } \
+    else \
+        break
 #endif
 
@@ -901,5 +957,8 @@
 #ifdef RT_STRICT
 # define AssertMsgBreakStmt(expr, a, stmt) \
-    if (RT_UNLIKELY(!(expr))) { \
+    if (RT_LIKELY(!!(expr))) \
+    { /* likely */ } \
+    else if (1) \
+    { \
         RTAssertMsg1Weak(#expr, __LINE__, __FILE__, __PRETTY_FUNCTION__); \
         RTAssertMsg2Weak a; \
@@ -910,5 +969,8 @@
 #else
 # define AssertMsgBreakStmt(expr, a, stmt) \
-    if (RT_UNLIKELY(!(expr))) { \
+    if (RT_LIKELY(!!(expr))) \
+    { /* likely */ } \
+    else if (1) \
+    { \
         stmt; \
         break; \
@@ -1196,5 +1258,7 @@
 #define AssertLogRel(expr) \
     do { \
-        if (RT_UNLIKELY(!(expr))) \
+        if (RT_LIKELY(!!(expr))) \
+        { /* likely */ } \
+        else \
         { \
             RTAssertLogRelMsg1(#expr, __LINE__, __FILE__, __PRETTY_FUNCTION__); \
@@ -1212,5 +1276,7 @@
 #define AssertLogRelReturn(expr, rc) \
     do { \
-        if (RT_UNLIKELY(!(expr))) \
+        if (RT_LIKELY(!!(expr))) \
+        { /* likely */ } \
+        else \
         { \
             RTAssertLogRelMsg1(#expr, __LINE__, __FILE__, __PRETTY_FUNCTION__); \
@@ -1228,5 +1294,7 @@
 #define AssertLogRelReturnVoid(expr) \
     do { \
-        if (RT_UNLIKELY(!(expr))) \
+        if (RT_LIKELY(!!(expr))) \
+        { /* likely */ } \
+        else \
         { \
             RTAssertLogRelMsg1(#expr, __LINE__, __FILE__, __PRETTY_FUNCTION__); \
@@ -1243,5 +1311,7 @@
  */
 #define AssertLogRelBreak(expr) \
-    if (RT_UNLIKELY(!(expr))) \
+    if (RT_LIKELY(!!(expr))) \
+    { /* likely */ } \
+    else if (1) \
     { \
         RTAssertLogRelMsg1(#expr, __LINE__, __FILE__, __PRETTY_FUNCTION__); \
@@ -1259,5 +1329,7 @@
  */
 #define AssertLogRelBreakStmt(expr, stmt) \
-    if (RT_UNLIKELY(!(expr))) \
+    if (RT_LIKELY(!!(expr))) \
+    { /* likely */ } \
+    else if (1) \
     { \
         RTAssertLogRelMsg1(#expr, __LINE__, __FILE__, __PRETTY_FUNCTION__); \
@@ -1276,5 +1348,7 @@
 #define AssertLogRelMsg(expr, a) \
     do { \
-        if (RT_UNLIKELY(!(expr))) \
+        if (RT_LIKELY(!!(expr))) \
+        { /* likely */ } \
+        else\
         { \
             RTAssertLogRelMsg1(#expr, __LINE__, __FILE__, __PRETTY_FUNCTION__); \
@@ -1294,5 +1368,7 @@
 #define AssertLogRelMsgStmt(expr, a, stmt) \
     do { \
-        if (RT_UNLIKELY(!(expr))) \
+        if (RT_LIKELY(!!(expr))) \
+        { /* likely */ } \
+        else\
         { \
             RTAssertLogRelMsg1(#expr, __LINE__, __FILE__, __PRETTY_FUNCTION__); \
@@ -1313,5 +1389,7 @@
 #define AssertLogRelMsgReturn(expr, a, rc) \
     do { \
-        if (RT_UNLIKELY(!(expr))) \
+        if (RT_LIKELY(!!(expr))) \
+        { /* likely */ } \
+        else\
         { \
             RTAssertLogRelMsg1(#expr, __LINE__, __FILE__, __PRETTY_FUNCTION__); \
@@ -1335,5 +1413,7 @@
 #define AssertLogRelMsgReturnStmt(expr, a, stmt, rcRet) \
     do { \
-        if (RT_UNLIKELY(!(expr))) \
+        if (RT_LIKELY(!!(expr))) \
+        { /* likely */ } \
+        else\
         { \
             RTAssertLogRelMsg1(#expr, __LINE__, __FILE__, __PRETTY_FUNCTION__); \
@@ -1354,5 +1434,7 @@
 #define AssertLogRelMsgReturnVoid(expr, a) \
     do { \
-        if (RT_UNLIKELY(!(expr))) \
+        if (RT_LIKELY(!!(expr))) \
+        { /* likely */ } \
+        else\
         { \
             RTAssertLogRelMsg1(#expr, __LINE__, __FILE__, __PRETTY_FUNCTION__); \
@@ -1371,5 +1453,7 @@
  */
 #define AssertLogRelMsgBreak(expr, a) \
-    if (RT_UNLIKELY(!(expr))) \
+    if (RT_LIKELY(!!(expr))) \
+    { /* likely */ } \
+    else if (1) \
     { \
         RTAssertLogRelMsg1(#expr, __LINE__, __FILE__, __PRETTY_FUNCTION__); \
@@ -1389,5 +1473,7 @@
  */
 #define AssertLogRelMsgBreakStmt(expr, a, stmt) \
-    if (RT_UNLIKELY(!(expr))) \
+    if (RT_LIKELY(!!(expr))) \
+    { /* likely */ } \
+    else if (1) \
     { \
         RTAssertLogRelMsg1(#expr, __LINE__, __FILE__, __PRETTY_FUNCTION__); \
@@ -1612,5 +1698,7 @@
 #define AssertRelease(expr)  \
     do { \
-        if (RT_UNLIKELY(!(expr))) \
+        if (RT_LIKELY(!!(expr))) \
+        { /* likely */ } \
+        else \
         { \
             RTAssertMsg1Weak(#expr, __LINE__, __FILE__, RT_GCC_EXTENSION __PRETTY_FUNCTION__); \
@@ -1627,5 +1715,7 @@
 #define AssertReleaseReturn(expr, rc)  \
     do { \
-        if (RT_UNLIKELY(!(expr))) \
+        if (RT_LIKELY(!!(expr))) \
+        { /* likely */ } \
+        else \
         { \
             RTAssertMsg1Weak(#expr, __LINE__, __FILE__, __PRETTY_FUNCTION__); \
@@ -1642,5 +1732,7 @@
 #define AssertReleaseReturnVoid(expr)  \
     do { \
-        if (RT_UNLIKELY(!(expr))) \
+        if (RT_LIKELY(!!(expr))) \
+        { /* likely */ } \
+        else \
         { \
             RTAssertMsg1Weak(#expr, __LINE__, __FILE__, __PRETTY_FUNCTION__); \
@@ -1657,11 +1749,11 @@
  */
 #define AssertReleaseBreak(expr)  \
-    if { \
-        if (RT_UNLIKELY(!(expr))) \
-        { \
-            RTAssertMsg1Weak(#expr, __LINE__, __FILE__, __PRETTY_FUNCTION__); \
-            RTAssertReleasePanic(); \
-            break; \
-        } \
+    if (RT_LIKELY(!!(expr))) \
+    { /* likely */ } \
+    else if (1) \
+    { \
+        RTAssertMsg1Weak(#expr, __LINE__, __FILE__, __PRETTY_FUNCTION__); \
+        RTAssertReleasePanic(); \
+        break; \
     } else do {} while (0)
 
@@ -1673,5 +1765,7 @@
  */
 #define AssertReleaseBreakStmt(expr, stmt)  \
-    if (RT_UNLIKELY(!(expr))) \
+    if (RT_LIKELY(!!(expr))) \
+    { /* likely */ } \
+    else if (1) \
     { \
         RTAssertMsg1Weak(#expr, __LINE__, __FILE__, __PRETTY_FUNCTION__); \
@@ -1690,5 +1784,7 @@
 #define AssertReleaseMsg(expr, a)  \
     do { \
-        if (RT_UNLIKELY(!(expr))) \
+        if (RT_LIKELY(!!(expr))) \
+        { /* likely */ } \
+        else \
         { \
             RTAssertMsg1Weak(#expr, __LINE__, __FILE__, __PRETTY_FUNCTION__); \
@@ -1707,5 +1803,7 @@
 #define AssertReleaseMsgReturn(expr, a, rc)  \
     do { \
-        if (RT_UNLIKELY(!(expr))) \
+        if (RT_LIKELY(!!(expr))) \
+        { /* likely */ } \
+        else \
         { \
             RTAssertMsg1Weak(#expr, __LINE__, __FILE__, __PRETTY_FUNCTION__); \
@@ -1724,5 +1822,7 @@
 #define AssertReleaseMsgReturnVoid(expr, a)  \
     do { \
-        if (RT_UNLIKELY(!(expr))) \
+        if (RT_LIKELY(!!(expr))) \
+        { /* likely */ } \
+        else \
         { \
             RTAssertMsg1Weak(#expr, __LINE__, __FILE__, __PRETTY_FUNCTION__); \
@@ -1741,5 +1841,7 @@
  */
 #define AssertReleaseMsgBreak(expr, a)  \
-    if (RT_UNLIKELY(!(expr))) \
+    if (RT_LIKELY(!!(expr))) \
+    { /* likely */ } \
+    else if (1) \
     { \
         RTAssertMsg1Weak(#expr, __LINE__, __FILE__, __PRETTY_FUNCTION__); \
@@ -1757,5 +1859,8 @@
  */
 #define AssertReleaseMsgBreakStmt(expr, a, stmt)  \
-    if (RT_UNLIKELY(!(expr))) { \
+    if (RT_LIKELY(!!(expr))) \
+    { /* likely */ } \
+    else if (1) \
+    { \
         RTAssertMsg1Weak(#expr, __LINE__, __FILE__, __PRETTY_FUNCTION__); \
         RTAssertMsg2Weak a; \
@@ -1908,5 +2013,7 @@
 #define AssertFatal(expr)  \
     do { \
-        if (RT_UNLIKELY(!(expr))) \
+        if (RT_LIKELY(!!(expr))) \
+        { /* likely */ } \
+        else \
             for (;;) \
             { \
@@ -1924,5 +2031,7 @@
 #define AssertFatalMsg(expr, a)  \
     do { \
-        if (RT_UNLIKELY(!(expr))) \
+        if (RT_LIKELY(!!(expr))) \
+        { /* likely */ } \
+        else \
             for (;;) \
             { \
