Compartilhar via


PREfast Warning 67 (Windows CE 5.0)

Send Feedback

67 - Format string mismatch.
Additional Information: Non-string passed as parameter <number> when string is required in call to <function>.

This warning indicates that the format string specifies that a string is required (a %s specification for printf or scanf) but a nonstring (that is, an integer or float) is being passed.

This defect is likely to result in a crash or a corruption of some form.

This warning is often reported because of subtle errors contained 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 %s",
        "a",
        1);

Corrected Source

char buff[5];

sprintf(buff,
        "%s %d",
        "a",
        1);

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.