[previous] 0496 [next] [C] Right operand of '%', '<<', '>>', '&', '^' or '|' must have integral type.
Constraint violations REFERENCE - ISO:C90-6.3.5, ISO:C90-6.3.7, ISO:C90-6.3.10, ISO:C90-6.3.11, ISO:C90-6.3.12

This is a constraint error

The right hand operand of the %,  <<,  >>,  &,  ^ and | operators must be of integral type.

For example:


/*PRQA S 1253,3120,3198,3199,3203,3227,3408 ++*/

void foo(unsigned int n, float t)
{
    n = n << t;       /* Message 0496 */
    n = n % t;        /* Message 0496 */
}

See also:

QA·C Source Code Analyser 8.1.2
© 2013 Programming Research.
www.programmingresearch.com
Personality Groups | Glossary | Message Index Contents