[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [win-pv-devel] [PATCH] 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/common/assert.h | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/src/common/assert.h b/src/common/assert.h index 1ecf7a6..ad186df 100644 --- a/src/common/assert.h +++ b/src/common/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 |