![]() |
![]() |
0193 | ![]() |
||||
![]() | |||||||
| Explicitly undefined | REFERENCE - ISO:C90-7.9.6.2 Formatted input/output functions | ||||||
An unknown length modifier is being used in conjunction with a '%u' conversion specifier in a scanf format string. Valid length modifiers for this conversion specifier are "h" and "l" - indicating that the receiving object is of type unsigned short or unsigned long rather than unsigned int. 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)
{
unsigned short stot = 0;
unsigned int itot = 0;
unsigned long ltot = 0;
scanf("%u", &itot); /* */
scanf("%hu", &stot); /* h indicates "short" */
scanf("%lu", <ot); /* l indicates "long" */
scanf("%Lu", &itot); /* Message 0193 - L is unrecognised */
}
![]() | ||
| QA·C Source Code Analyser 8.1.2
© 2013 Programming Research. www.programmingresearch.com | Personality Groups | Glossary | Message Index | Contents |