![]() |
![]() |
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 */
}
No MISRA C:2012 Rules applicable to message 1261
See also:
![]() | ||
| 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 |