PREfast Warning 66 (Windows CE 5.0)
66 - Format string mismatch.
Additional Information: Non-pointer passed as parameter <number> when pointer is required in call to <function>.
This warning indicates that the format string specifies that a pointer is required (that is, a %p or %n specification for printf or a %d for scanf) but a nonpointer is being passed.
This defect is likely to result in a crash or corruption of some form. It is also likely to cause a 64-bit porting problem.
This message is often reported because an integer was used for a %p format instead of a pointer. Using an integer in this instance is not portable to 64-bit machines.
This warning is often reported because of subtle errors in format strings, such as extra embedded spaces or unescaped percent signs. If the warning appears to be incorrect, verify your format string.
PREfast interprets format strings based on the implementations in the C run-time library that is included with Visual C++ .NET 2002.
Example
Defective Source
char buff[5];
sprintf(buff,
"%s %n %d",
"a",
1,
1);
Corrected Source
char buff[5];
int n;
sprintf(buff,
"%s %n %d",
"a",
&n,
1);
Send Feedback on this topic to the authors