[previous] 1813 [next] An operand of 'essentially character' type is being balanced with an operand of 'essentially floating' type in this arithmetic operation.
Arithmetic type - Balancing

This message is issued whenever an expression of essentially character type undergoes a usual arithmetic conversion to a floating type.

For example:


/*PRQA S 1-9999 ++*/
/*PRQA S 1813 --*/

float f1813 (float a, char b)
{
  a = a + b;                /* 1813 */
  return a - b;             /* 1813 */
}


MISRA C:2012 Rules applicable to message 1813:

Rule-10.2  (Required) Expressions of essentially character type shall not be used inappropriately in addition and subtraction operations


QA·C Source Code Analyser 8.1
MISRA C:2012 Compliance Module 1.0
© 2012 Programming Research.
www.programmingresearch.com
Personality Groups | Glossary | Message Index | MISRA C:2012 Rule Index Contents