![]() |
![]() |
1263 | ![]() |
||||
![]() | |||||||
| Arithmetic type - Balancing | |||||||
An operand of integral type is being implicitly converted to a floating type because the other operand of this balancing operation is a constant of floating type. Perhaps a cast should be introduced ? For example:
/*PRQA S 2017,3112,3121,3408,3447 ++*/
extern int sia;
extern void foo(void)
{
sia + 1.23F; /* Message 1263 + 3763 - Implicit conversion: int to float */
(float)sia + 1.23F;
sia + 1.23 ; /* Message 1263 + 3764 - Implicit conversion: int to double */
(double)sia + 1.23 ;
sia + 1.23L; /* Message 1263 + 3765 - Implicit conversion: int to long double */
(long double)sia + 1.23L;
}
![]() | ||
| QA·C Source Code Analyser 8.1.2
© 2013 Programming Research. www.programmingresearch.com | Personality Groups | Glossary | Message Index | Contents |