다음을 통해 공유


PREfast Warning 271 (Windows CE 5.0)

Send Feedback

271 - Format string mismatch.
Additional Information: Extra argument to <function>.
Consequence: Parameter <number> is not used by the format string

This warning indicates that extra arguments are being provided beyond those specified by the format string.

By itself, this defect does not have a visible effect but it can indicate other problems.

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, double-check 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,
        "%d",
        1,
        2);

Corrected Source

char buff[5];

sprintf(buff,
        "%d, %d",
        1,
        2);

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.