Compartilhar via


PREfast Warning 303 (Windows CE 5.0)

Send Feedback

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

This warning indicates that the format string specifies that a character string is required but a wide character string is being passed.

This defect can result in a crash or corruption of some form.

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

wchar_t buff[5] = L"hi";
printf("%s", buff);

Corrected Source

wchar_t buff[5];
printf("%ls", buff);

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.