[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: CVS commit: src/usr.sbin/videomode
On Thu, Jan 15, 2009 at 07:31:54PM +0200, Alan Barrett wrote:
> > Add a cast to make this build again (no sense in doing PRIu64 when we
> > & with 7 right after).
> I think that you are invoking undefined behaviour, casting a value to
> (int) when the value might conceivably be larger than INT_MAX. If you
> cast to (unsigned int) instead, then all should be well.
It's missing parens; it should be (int)(minor(stb.st_rdev) & 0x7)
instead of (int)minor(stb.st_rdev) & 0x7.
David A. Holland
Main Index |
Thread Index |