|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [win-pv-devel] [PATCH 3/3] Avoid evaluating assertion expressions in free builds
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@xxxxxxxxxx>
---
src/xenvif/assert.h | 16 +++++-----------
1 file changed, 5 insertions(+), 11 deletions(-)
diff --git a/src/xenvif/assert.h b/src/xenvif/assert.h
index 9d6c3d3..110f4ef 100644
--- a/src/xenvif/assert.h
+++ b/src/xenvif/assert.h
@@ -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) \
--
2.1.1
_______________________________________________
win-pv-devel mailing list
win-pv-devel@xxxxxxxxxxxxxxxxxxxx
http://lists.xenproject.org/cgi-bin/mailman/listinfo/win-pv-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |