![]() |
![]() |
1261 | ![]() |
||||
![]() | |||||||
| Arithmetic type - Balancing | |||||||
A constant of type float is being implicitly converted to type double or long double in a balancing operation. Perhaps the constant should be rewritten with a different suffix ? The suffixes for floating constants are: F for float and L for long double; an unsuffixed constant is of type double. For example:
/*PRQA S 2017,3112,3121,3198,3408,3447 ++*/
extern double dba;
extern long double lda;
extern void foo(void)
{
dba + 5.0F; /* Message 1261 */
lda + 5.0F; /* Message 1261 */
lda + 5.0 ; /* Message 1262 */
}
See also:
![]() | ||
| QA·C Source Code Analyser 8.1.2
© 2013 Programming Research. www.programmingresearch.com | Personality Groups | Glossary | Message Index | Contents |