WIN 7 WDK OACR - bugs?

I’m painfully converting a rather huge build system to use the WIN 7
WDK tools for windows kernel components. We already run a prefast
clean build process, so adding OACR is fine with me (although there
are customization issues.)

However not fine is that I get the following errors generated from prefast:

  1. 20051 for crtdefs.h

457 typedef unsigned __int64 size_t;

crtdefs.h(457) : warning 20051: PREfast - Error processing
‘comsup.cpp’ : error C2371: ‘size_t’ : redefinition; different basic
types (try ’ oacr log WDKSamples:amd64chk ’ for details)
457

Note that this error is from a toaster source file. The WDK docs
basically say “ignore this error at your peril”. Applying the
drivers_recommended filter does get rid of it, but OACR is beet red
yelling at me. Why is that?

  1. toaster is not prefast clean?

320 Bus_KdPrint (commonData, BUS_DBG_PNP_TRACE,

pnp.c(320) : warning 6291: Bitwise operation on logical
result: ! has higher precedence than |. Use || or (!(x | y)) instead
Found in function ‘Bus_PnP’
320

This is immune to the drivers_recommended filter.

If toaster or any other WDK sample isn’t prefast clean then why should
we out here bother?

In addition I have the following major gripes:

  1. I am unhappy that I have to modify ini files inside the WDK to
    adjust OACR settings, but I am willing to do that once, archive it and
    then distribute the result read only within a development team,
    however there is almost no useful documentation, including the
    existing ini file(s) (and I am just thrilled that it is one per
    processor family so I have to modify at least two ini files) . Where
    is the documentation for what these ini files do, how they do it, and
    what the contents of a project.mk file can possibly be other than
    PROJECT=myExamples”?

  2. What is the relationship between the predefined filters, such as
    drivers_recommended and the analysis mode annotations such as
    __kernel_driver ?

  3. Why don’t the default project settings for drivers set the prefast
    filters to drivers_recommended?

Mark Roddy