[ofw] FW: [PATCH]: ALL: Reducing Prefast false alarms

Tzachi Dar tzachid at mellanox.co.il
Mon Jul 21 23:57:48 PDT 2008


Applied on 1431.
 
Thanks
Tzachi


________________________________

	From: ofw-bounces at lists.openfabrics.org
[mailto:ofw-bounces at lists.openfabrics.org] On Behalf Of Tzachi Dar
	Sent: Monday, July 21, 2008 5:38 PM
	To: ofw at lists.openfabrics.org
	Subject: [ofw] FW: [PATCH]: ALL: Reducing Prefast false alarms
	
	
	 

________________________________

	From: Doron Tsur 
	Sent: Monday, July 21, 2008 5:32 PM
	To: anh.duong at qlogic.com; eleanor.witiak at qlogic.com;
stan.smith at intel.com; Tzachi Dar; Leonid Keller
	Cc: Doron Tsur; ofw at lists.openfabrics.org
	Subject: [PATCH]: ALL: Reducing Prefast false alarms
	
	
	I have started to apply Prefast on WinOF code.  
	 
	Proposed SVN Commit log:
	 
	
	
------------------------------------------------------------------------
------------------------------------------------------------------------
---------------------------------------------------------- 
	 
	 
	Prefast is a static tool from Microsoft  , designated for driver
developers over Windows platform to help find bugs.
	Prefast provides both Microsoft specific issues and general
issues (as NULL pointers). 
	 
	However,  Prefast often has false alarms  . 
	There are ways to remove these false alarms by :
	 

	1.	When Using ASSERT in a non-memory allocation pointer,
Prefast is not aware of the check ASSERT performs. 
	2.	Suppress the Prefast warning if the developer if there
is an issue with no impact (For example, comparing constants in a code
protected by #ifdef _DEBUG_ has no impact on fre built code.

	In this patch I remove some of Prefast false alarms :
	 
	Removing false Prefast alarms by:

	1.	
		Adding __analysis_assume() to ASSERT when DBG and
_PREFAST_ are used for use in all the WinOF tree.
		

		1.	/trunk/inc/kernel/complib/cl_types_osd.h 
		2.	/trunk/inc/user/complib/cl_types_osd.h

	2.	
		Adding __pragma(warning(suppress:6326)) to suppress
constants compare warning (performance decrease is acceptable since this
is chked code/ heavy windows event logging:

		1.	Adding __pragma(warning(suppress:6326)) in debug
MACROs: 

			1.	/trunk/core/al/al_debug.h 
			2.	/trunk/inc/complib/cl_debug.h 
			3.	
				/trunk/ulp/ipoib/kernel/ipoib_debug.h

		2.	Adding __pragma(warning(suppress:6326)) in
Events logging: 

			1.	/trunk/hw/mthca/kernel/hca_debug.h

	
	
------------------------------------------------------------------------
------------------------------------------------------------------------
----------------------------------------------------------
	 
	 
	Tests (On WinOF tree):
	 

	1.	Build for chk, fre, x86 and AMD64 for 2003 and 2008
servers (8 builds). (After SVN update, and on  WinOF tree )  ,  using
6001.18001 DDK.   
	2.	Run 6001.18001 DDK Prefast

	 
	Tested SVN Version of WinOF:
	1425 
	 
	Modified files: 
	
	/trunk/core/al/al_debug.h
	/trunk/hw/mthca/kernel/hca_debug.h
	/trunk/inc/complib/cl_debug.h
	/trunk/inc/kernel/complib/cl_types_osd.h
	/trunk/inc/user/complib/cl_types_osd.h
	/trunk/ulp/ipoib/kernel/ipoib_debug.h
	 
	Diff:
	 
	See attached file of unified diff.
	 
	Doron Tsur  < doront at mellanox.co.il
<mailto:doront at mellanox.co.il>  > 
	 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openfabrics.org/pipermail/ofw/attachments/20080722/c2a5df27/attachment.html>


More information about the ofw mailing list