![]() |
![]() |
0570 | ![]() |
||||
![]() | |||||||
| Switch statements | |||||||
This message is issued whenever a switch controlling expression and a case constant expression have different essential type categories. Consider using a cast or review use of a 'U' suffix (if applicable) to match the essential type of both expressions. For example:
/*PRQA S 1-9999 ++*/
/*PRQA S 0570 --*/
void f0570 (int a)
{
switch (a)
{
case '0': /* Message 0570 */
case '0' + 1: /* Message 0570 */
case 2U: /* Message 0570 */
break;
default:
break;
}
}
![]() | ||
| QA·C Source Code Analyser 8.1.2
© 2013 Programming Research. www.programmingresearch.com | Personality Groups | Glossary | Message Index | Contents |