[previous] 0202 [next] [I] '-' character in '[]' conversion specification is implementation defined.
Implementation defined REFERENCE - ISO:C90-7.9.6.2 Formatted input/output functions

This format string contains the "[]" format conversion specifier which includes a "character range". The validity of this character range will depend on the character encoding which is in use and is therefore subject to implementation-defined behaviour.

For example:


/*PRQA S 336,602,1307,2017,3122,3200,3209,3227,3408,3602,3625 ++*/

#include <stdio.h>

extern void foo(char *cptr)
{
    scanf("Total %[a-z]", cptr);                /* Message 0202 */
}


MISRA C:2012 Rules applicable to message 0202:

Dir-1.1  (Required) Any implementation-defined behaviour on which the output of the program depends shall be documented and understood


See also:

QA·C Source Code Analyser 8.1
MISRA C:2012 Compliance Module 1.0
© 2012 Programming Research.
www.programmingresearch.com
Personality Groups | Glossary | Message Index | MISRA C:2012 Rule Index Contents