]> xenbits.xensource.com Git - pvdrivers/win/xenbus.git/commitdiff
Avoid evaluating assertion expressions in free builds staging-8.1 8.1.0 8.1.0-rc10
authorPaul Durrant <paul.durrant@citrix.com>
Fri, 22 Jan 2016 16:06:59 +0000 (16:06 +0000)
committerPaul Durrant <paul.durrant@citrix.com>
Fri, 22 Jan 2016 16:09:22 +0000 (16:09 +0000)
The evaluations are pointless and the warnings generated by not evaluating
can be squashed with a couple of #pragmas.

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
src/common/assert.h

index 1ecf7a620bdc06411bff1c8644948ed8d4aa944c..ad186dfb49bcd0b23180612dcb0219048a3064f2 100644 (file)
@@ -126,18 +126,12 @@ __Bug(
 
 #else   // DBG
 
-static FORCEINLINE VOID
-_IgnoreAssertion(
-    IN  BOOLEAN Value
-    )
-{
-    UNREFERENCED_PARAMETER(Value);
-}
+#pragma warning(disable:4100)
+#pragma warning(disable:4189)
 
-#define ASSERT(_EXP)                        \
-        do {                                \
-            _IgnoreAssertion(_EXP);         \
-            __analysis_assume(_EXP);        \
+#define ASSERT(_EXP)                    \
+        do {                            \
+            __analysis_assume(_EXP);    \
         } while (FALSE)
 
 #define ASSERT3U(_X, _OP, _Y)           \