![]() |
![]() |
0572 | ![]() |
||||
![]() | |||||||
| Switch statements | |||||||
This message is issued whenever a switch controlling expression and a case constant expression have the same essential type category, but the controlling expression is of lower rank. Consider removing an 'L' suffix or using a cast to match the rank of both expressions. For example:
/*PRQA S 1-9999 ++*/
/*PRQA S 0572 --*/
/********************************
* OPTIONS: -ex LONGLONG
*******************************/
void f0572 (long a)
{
switch (a)
{
case 0LL: /* Message 0572 */
case (long long) 1: /* Message 0572 */
case 2: /* OK */
case 3L: /* OK */
break;
default:
break;
}
}
![]() | ||
| QA·C Source Code Analyser 8.1.2
© 2013 Programming Research. www.programmingresearch.com | Personality Groups | Glossary | Message Index | Contents |