Synopsis: | Only standard input specifiers and standard flags shall be used in input format specifications. |
Language: | C |
Severity Level: | 2 |
Category: | Library |
Description: |
Justification The use of non-standard input specifiers or non-standard flags is not portable. Example scanf("%a", &i); /* WRONG */ scanf("%Li", &i); /* WRONG */ scanf("%Lo", &i); /* WRONG */ scanf("%Lu", &i); /* WRONG */ scanf("%Lx", &i); /* WRONG */ scanf("%he", &f); /* WRONG */ scanf("%hs", p); /* WRONG */ scanf("%hp", &v); /* WRONG */ scanf("%L%)"); /* WRONG */ scanf("%L[a]", p); /* WRONG */ scanf("%hc", &c); /* WRONG */ scanf("% i", &i); /* WRONG */ scanf("%[0-9]s", p); /* WRONG */ scanf("%[9-0]s", p); /* WRONG */ scanf("%.510%e", &d); /* WRONG */ |