[previous] 1269 [next] Floating constant cast to integral type.
Arithmetic type - Casts

A constant of floating type is being cast to an integral type.

For example:


/*PRQA S 2017,3121,3198,3408,3447 ++*/

extern int sia;

extern void foo(void)
{
    sia   = (int)5.0F;      /* Message 1269 */
    sia   = (int)5.0;       /* Message 1269 */
    sia   = (int)5.0L;      /* Message 1269 */
}

See also:

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