Re: Improve handling of invalid input in dlls/comctl32/datetime.c

2011-01-19 Thread Gerald Pfeifer
For the record, this is how this has been addressed a few months after this discussion. That's another way of doing it. :-) Gerald commit 1af17844301c4924dd8324cbf2f9c3c1ef0394b2 Author: Huw Davies h...@codeweavers.com Date: Tue May 4 14:05:13 2010 +0100 comctl32: Silence a few

Re: Improve handling of invalid input in dlls/comctl32/datetime.c

2009-12-25 Thread Nikolay Sivov
On 12/25/2009 14:18, Gerald Pfeifer wrote: Otherwise max_count will be undefined in the following loop may do interesting things it seems. (Does Coverity diagnose similar items?) Gerald ChangeLog: Improve handling of invalid input in DATETIME_ReturnFieldWidth. diff --git

Re: Improve handling of invalid input in dlls/comctl32/datetime.c

2009-12-25 Thread James McKenzie
Nikolay Sivov wrote: On 12/25/2009 14:18, Gerald Pfeifer wrote: Otherwise max_count will be undefined in the following loop may do interesting things it seems. (Does Coverity diagnose similar items?) Gerald ChangeLog: Improve handling of invalid input in DATETIME_ReturnFieldWidth. diff

Re: Improve handling of invalid input in dlls/comctl32/datetime.c

2009-12-25 Thread Nikolay Sivov
On 12/26/2009 00:04, James McKenzie wrote: Nikolay Sivov wrote: On 12/25/2009 14:18, Gerald Pfeifer wrote: Otherwise max_count will be undefined in the following loop may do interesting things it seems. (Does Coverity diagnose similar items?) Gerald ChangeLog: Improve handling of

Re: Improve handling of invalid input in dlls/comctl32/datetime.c

2009-12-25 Thread James McKenzie
Nikolay Sivov wrote: On 12/26/2009 00:04, James McKenzie wrote: Nikolay Sivov wrote: On 12/25/2009 14:18, Gerald Pfeifer wrote: Otherwise max_count will be undefined in the following loop may do interesting things it seems. (Does Coverity diagnose similar items?) Gerald

Re: Improve handling of invalid input in dlls/comctl32/datetime.c

2009-12-25 Thread Nikolay Sivov
On 12/26/2009 00:47, James McKenzie wrote: Nikolay Sivov wrote: Why? There's no default case, treat is as 'if () {} else if () {} etc.'. It's the same thing to have explicit initializers for all local variables even if I don't use it before set some value. It's a pollution, especially if

Re: Improve handling of invalid input in dlls/comctl32/datetime.c

2009-12-25 Thread James McKenzie
Nikolay Sivov wrote: On 12/26/2009 00:47, James McKenzie wrote: Nikolay Sivov wrote: Why? There's no default case, treat is as 'if () {} else if () {} etc.'. It's the same thing to have explicit initializers for all local variables even if I don't use it before set some value. It's a