[splint-discuss] Detecting lossy int conversions.

John Carter john.carter at tait.co.nz
Wed Sep 10 23:25:57 EDT 2003


How do you convince splint to detect only lossy implicit int conversions?

For example....

int i32 = 70000;
short i16 = i32; // Danger! Lossy conversion splint please flag me!
int j32 = i16;   // Different type, but that's OK. C copes just fine with
                 // the widening conversion.

Thanks,


John Carter                             Phone : (64)(3) 358 6639
Tait Electronics                        Fax   : (64)(3) 359 4632
PO Box 1645 Christchurch                Email : john.carter at tait.co.nz
New Zealand

A Million Monkeys can inflict worse things than just Shakespeare on
your system.



More information about the splint-discuss mailing list