Share via


PREfast for Drivers Examples

This section provides several examples of the operation of PREfast for Drivers (PFD) and demonstrates strategies for verifying the result, distinguishing actual from false-positive results, and correcting the errors that PFD detects. .The examples here show the standalone version of PFD, but the analysis applies whether OACR or standalone PFD is involved.

Several of these examples use the sample code files that are included in PREfast for Drivers in the \tools\pfd\samples subdirectory of the WDK.

includes:

Building the Samples

Example 1: Uninitialized Variables and NULL Pointers

Example 2: Implicit Order of Evaluation

Example 3: Calling a Function at Incorrect IRQL

Example 4: Valid Error Reported in the Wrong Place

Example 5: Inferred Purpose Based on Function Characteristics

Example 6: Incorrect Enumerated Type

 

 

Send comments about this topic to Microsoft

Build date: 5/3/2011