Source-Changes-D archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: CVS commit: src/lib/libc/stdio
On Sun, Oct 25, 2009 at 05:42:20PM +0000, Christos Zoulas wrote:
>
> Can we just revert the past 2 commits? Changing:
>
> (size_t)x -> x + 0u
>
> does not look like an improvement to me. At least the first shows the intent,
> the second is just confusing, specially when size_t is unsigned long.
Actually, IMHO, lint is just being too picky here.
Having to add a cast whenever an 'int' variable is passed to a function
that has a 'size_t' parameter really is just polluting the code with
pointless casts.
I have a deep dislike for casts, and especially ones between integer
types. Probably because I've been caught out once too often by an
unexpected cast converting beteen pointers and integers.
Some of these lint checks really should have been killed once
ANSI function prototypes were invernted.
David
--
David Laight: david%l8s.co.uk@localhost
Home |
Main Index |
Thread Index |
Old Index