From: Paul Durrant Date: Fri, 22 Jan 2016 16:05:40 +0000 (+0000) Subject: Avoid evaluating assertion expressions in free builds X-Git-Tag: 8.2.0-rc1~32 X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=60e6f7fc380032b18903cdc8718a0b548cc0f2a9;p=pvdrivers%2Fwin%2Fxennet.git 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 --- diff --git a/src/xennet/assert.h b/src/xennet/assert.h index 93334ea..f090461 100644 --- a/src/xennet/assert.h +++ b/src/xennet/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) \