On Thu, 22 Mar 2012, Havard Eidnes wrote:
Modified Files:
        src/lib/libc/gen: modf_ieee754.c

Log Message:
Add a pair of casts to silence lint about conversion possibly losing bits.

-       v.dblu_dbl.dbl_fracl = frac & 0xffffffff;
-       v.dblu_dbl.dbl_frach = frac >> 32;
+       v.dblu_dbl.dbl_fracl = (u_int) (frac & 0xffffffffULL);
+       v.dblu_dbl.dbl_frach = (u_int) (frac >> 32);

This looks like another bogus lint warning. Because of the shifts and masks, the values are guaranteed to fit in 32 bits. Please could we stop adding casts to appease broken warnings.

--apb (Alan Barrett)

Reply via email to