Source-Changes-D archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: CVS commit: src/lib/libc/string



On Fri, Nov 25, 2011 at 01:18:19PM +0000, David Holland wrote:
> On Fri, Nov 25, 2011 at 02:15:12PM +0100, Joerg Sonnenberger wrote:
>  > > Sure it does. You should just have written the code using (size_t)1,
>  > > or even just 1UL, instead of 1ULL. There is no port where size_t is
>  > > unsigned long long.
>  > > 
>  > > ... Unless what you meant was "get rid of all 32-bit ports" :-)
>  > 
>  > Well, there is Win64 and this is essentially portable code...
> 
> so use (size_t)1 then.

Point remains that the original code is correct and no overflow can
happen. As such lint's behavior is just bogus.

Joerg


Home | Main Index | Thread Index | Old Index