![]() |
![]() |
1272 | ![]() |
||||
![]() | |||||||
| Constants | |||||||
This octal or hex constant has leading zeroes which seem to be unnecessary. Message 1272 is intended to identify situations where there may be a typing error or confusion over the intended type of the constant.
/*PRQA S 339,1277,2017,3120,3198,3408,3447,3625 ++*/
/****************************************
* OPTIONS:
* 1: -s int=16
* 2: -s int=32
***************************************/
extern unsigned int a;
extern void foo(void)
{
/*************************/
/* -s int=16 * -s int=32 */
/*************************/
/* OCTAL CONSTANTS */
a = 015; /* * */
a = 0015; /* 1272 * 1272 */
a = 00015; /* 1272 * 1272 */
/* HEX CONSTANTS */
a = 0x0777; /* * */
a = 0x00777; /* 1272 * */
a = 0x000777; /* 1272 * */
a = 0x0000777; /* 1272 * */
a = 0x00000777; /* 1272 * */
a = 0x000000777; /* 1272 * 1272 */
a = 0x0000000777; /* 1272 * 1272 */
}
![]() | ||
| QA·C Source Code Analyser 8.1.2
© 2013 Programming Research. www.programmingresearch.com | Personality Groups | Glossary | Message Index | Contents |