Index: D:/UserData/SVN/Branch_WinINF/ulp/ipoib/kernel/ipoib_debug.h =================================================================== --- D:/UserData/SVN/Branch_WinINF/ulp/ipoib/kernel/ipoib_debug.h (revision 2820) +++ D:/UserData/SVN/Branch_WinINF/ulp/ipoib/kernel/ipoib_debug.h (revision 2821) @@ -124,12 +124,14 @@ // assignment of _level_ is need to to overcome warning C4127 #define IPOIB_PRINT(_level_,_flag_,_msg_) \ { \ + __pragma(warning(suppress:6326)) \ if( g_ipoib_dbg_level >= (_level_) ) \ CL_TRACE( _flag_, g_ipoib_dbg_flags, _msg_ ); \ } #define IPOIB_PRINT_EXIT(_level_,_flag_,_msg_) \ { \ + __pragma(warning(suppress:6326)) \ if( g_ipoib_dbg_level >= (_level_) ) \ CL_TRACE( _flag_, g_ipoib_dbg_flags, _msg_ );\ IPOIB_EXIT(_flag_);\ @@ -137,18 +139,21 @@ #define IPOIB_ENTER(_flag_) \ { \ + __pragma(warning(suppress:6326)) \ if( g_ipoib_dbg_level >= TRACE_LEVEL_VERBOSE ) \ CL_ENTER( _flag_, g_ipoib_dbg_flags ); \ } #define IPOIB_EXIT(_flag_)\ { \ + __pragma(warning(suppress:6326)) \ if( g_ipoib_dbg_level >= TRACE_LEVEL_VERBOSE ) \ CL_EXIT( _flag_, g_ipoib_dbg_flags ); \ } #define IPOIB_TRACE_BYTES( lvl, ptr, len ) \ { \ + __pragma(warning(suppress:6326)) \ if( g_ipoib_dbg_level >= (_level_) && \ (g_ipoib_dbg_flags & (_flag_)) ) \ { \ Index: D:/UserData/SVN/Branch_WinINF/core/al/al_debug.h =================================================================== --- D:/UserData/SVN/Branch_WinINF/core/al/al_debug.h (revision 2820) +++ D:/UserData/SVN/Branch_WinINF/core/al/al_debug.h (revision 2821) @@ -185,8 +185,15 @@ #if DBG // assignment of _level_ is need to to overcome warning C4127 + +// +// Code in DBG, has no impact on fre performance +// Hence the 6326 warning suppression +// + #define AL_PRINT( _level_,_flag_,_msg_) \ { \ + __pragma(warning(suppress:6326)) \ if( g_al_dbg_level >= (_level_) ) \ CL_TRACE( _flag_, g_al_dbg_flags, _msg_ ); \ } @@ -194,6 +201,7 @@ #define AL_PRINT_EXIT( _level_,_flag_,_msg_) \ { \ + __pragma(warning(suppress:6326)) \ if( g_al_dbg_level >= (_level_) ) \ CL_TRACE( _flag_, g_al_dbg_flags, _msg_ );\ AL_EXIT( _flag_ );\ @@ -201,12 +209,14 @@ #define AL_ENTER( _flag_) \ { \ + __pragma(warning(suppress:6326)) \ if( g_al_dbg_level >= TRACE_LEVEL_VERBOSE ) \ CL_ENTER( _flag_, g_al_dbg_flags ); \ } #define AL_EXIT( _flag_)\ { \ + __pragma(warning(suppress:6326)) \ if( g_al_dbg_level >= TRACE_LEVEL_VERBOSE ) \ CL_EXIT( _flag_, g_al_dbg_flags ); \ } Index: D:/UserData/SVN/Branch_WinINF/inc/kernel/complib/cl_types_osd.h =================================================================== --- D:/UserData/SVN/Branch_WinINF/inc/kernel/complib/cl_types_osd.h (revision 2820) +++ D:/UserData/SVN/Branch_WinINF/inc/kernel/complib/cl_types_osd.h (revision 2821) @@ -93,10 +93,20 @@ typedef _W64 unsigned __int3264 uintn_t; typedef volatile __int32 atomic32_t; +#ifdef _PREFAST_ +#define CONDITION_ASSUMED(X) __analysis_assume((X)) +#else +#define CONDITION_ASSUMED(X) +#endif // _PREFAST_ + #ifndef CL_ASSERT +#ifdef _DEBUG_ +#define CL_ASSERT(X) ASSERT(X);CONDITION_ASSUMED(X) +#else #define CL_ASSERT ASSERT #endif +#endif #define UNUSED_PARAM UNREFERENCED_PARAMETER Index: D:/UserData/SVN/Branch_WinINF/inc/complib/cl_debug.h =================================================================== --- D:/UserData/SVN/Branch_WinINF/inc/complib/cl_debug.h (revision 2820) +++ D:/UserData/SVN/Branch_WinINF/inc/complib/cl_debug.h (revision 2821) @@ -463,6 +463,7 @@ * Debug Output, Debug Levels, CL_PRINT, CL_ENTER, CL_EXIT, CL_TRACE_EXIT *********/ #define CL_TRACE( DBG_LVL, CHK_LVL, STRING ) \ +__pragma(warning(suppress:6326)) \ do{ \ switch( DBG_LVL & CL_DBG_ERROR ) \ { \ @@ -541,6 +542,7 @@ * Debug Output, Debug Levels, CL_PRINT, CL_ENTER, CL_EXIT, CL_TRACE *********/ #define CL_TRACE_EXIT( DBG_LVL, CHK_LVL, STRING ) \ + __pragma(warning(suppress:6326)) \ do{ \ CL_TRACE( DBG_LVL, CHK_LVL, STRING ); \ CL_EXIT( DBG_LVL, CHK_LVL ); \ Index: D:/UserData/SVN/Branch_WinINF/inc/user/complib/cl_types_osd.h =================================================================== --- D:/UserData/SVN/Branch_WinINF/inc/user/complib/cl_types_osd.h (revision 2820) +++ D:/UserData/SVN/Branch_WinINF/inc/user/complib/cl_types_osd.h (revision 2821) @@ -98,10 +98,15 @@ /* boolean_t must be intergral sized to avoid a bunch of warnings. */ typedef int boolean_t; +#ifdef _PREFAST_ +#define CONDITION_ASSUMED(X) __analysis_assume((X)) +#else +#define CONDITION_ASSUMED(X) +#endif // _PREFAST_ #ifndef CL_ASSERT #ifdef _DEBUG_ -#define CL_ASSERT( exp ) (void)(!(exp)?OutputDebugString("Assertion Failed:" #exp "\n"),DebugBreak(),FALSE:TRUE) +#define CL_ASSERT( exp ) (void)(!(exp)?OutputDebugString("Assertion Failed:" #exp "\n"),DebugBreak(),FALSE:TRUE);CONDITION_ASSUMED(exp) #else #define CL_ASSERT( exp ) #endif /* _DEBUG_ */ Index: D:/UserData/SVN/Branch_WinINF/hw/mthca/kernel/hca_debug.h =================================================================== --- D:/UserData/SVN/Branch_WinINF/hw/mthca/kernel/hca_debug.h (revision 2820) +++ D:/UserData/SVN/Branch_WinINF/hw/mthca/kernel/hca_debug.h (revision 2821) @@ -52,6 +52,7 @@ #define HCA_PRINT_TO_EVENT_LOG(_obj_,_level_,_flag_,_msg_) \ { \ NTSTATUS event_id; \ + __pragma(warning(suppress:6326)) \ switch (_level_) { \ case TRACE_LEVEL_FATAL: case TRACE_LEVEL_ERROR: event_id = EVENT_MTHCA_ANY_ERROR; break; \ case TRACE_LEVEL_WARNING: event_id = EVENT_MTHCA_ANY_WARN; break; \