![]() |
![]() |
0191 | ![]() |
||||
![]() | |||||||
| Explicitly undefined | REFERENCE - ISO:C90-7.9.6.2 Formatted input/output functions | ||||||
An unknown length modifier is being used in conjunction with a '%i', '%d' or '%n' conversion specifier in a scanf format string. Valid length modifiers for these conversion specifiers are "h" and "l" - indicating that the receiving object is of type short or long. In the code example below "L" has been used; but "L" is only valid with %e, %f or %g - to indicate a receiving object of type long double.
/*PRQA S 336,602,1302,1307,2017,3122,3200,3209,3335,3408,3602,3625 ++*/
#include <stdio.h>
extern void foo(void)
{
short stot = 0;
int itot = 0;
long ltot = 0;
scanf("%d", &itot); /* */
scanf("%hd", &stot); /* h indicates "short" */
scanf("%ld", <ot); /* l indicates "long" */
scanf("%Ld", &itot); /* Message 0191 - L is unrecognised */
}
![]() | ||
| QA·C Source Code Analyser 8.1.2
© 2013 Programming Research. www.programmingresearch.com | Personality Groups | Glossary | Message Index | Contents |