Source-Changes-D archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: CVS commit: src/lib/libc/arch/alpha/gen
On Wed, 21 Mar 2012, Havard Eidnes wrote:
Modified Files:
src/lib/libc/arch/alpha/gen: fpgetround.c fpsetround.c
Log Message:
Add some casts to get rid of "bitwise op on signed value is non-portable"
warning from lint.
I see no bitwise ops on signed values here.
- return ((fpcrval.u64 >> 58) & 0x3);
+ return ((fp_rnd)(fpcrval.u64 >> 58) & 0x3);
fpcrval.u64 is uint64_t. After the "integer promotions",
it's still uint64_t (unless that's smaller than int, which is not
the case for any existing NetBSD port). After >>58, it's still
uint64_t. 0x3 is a signed int, but the "usual arithmetic conversions"
should convert it to uint64_t.
--apb (Alan Barrett)
Home |
Main Index |
Thread Index |
Old Index