[previous] 0208 [next] [U] Same character occurs in scanset more than once.
Explicitly undefined REFERENCE - ISO:C90-7.9.6.2 Formatted input/output functions

This '%[]' conversion specifier is incorrect.

The brackets contain a scanset - a set of characters. Characters from the input stream are written to the receiving character buffer until a character is encountered which is not in the scanset. In the range specified here, a character has been repeated.

For example:


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

#include <stdio.h>

extern void foo(void)
{
    char hb[20];

    scanf("%[ABCDEFG]", hb);    /*              */

    scanf("%[ABCDEFA]", hb);    /* Message 0208 */
}

QA·C Source Code Analyser 8.1.2
© 2013 Programming Research.
www.programmingresearch.com
Personality Groups | Glossary | Message Index Contents