Re: Sept 11 with tools and tests removed

2009-09-13 Thread Alexandre Julliard
Mike Kaplinskiy writes: > As for the context note, it is perfectly valid code (segfault-less, > that is) as it stands, but we should either remove the null check on > the next line or assign the value later. No, the code is fine as it is. The bug is in cppcheck. -- Alexandre Julliard julli...@

Re: Sept 11 with tools and tests removed

2009-09-13 Thread Ben Klein
2009/9/13 Henri Verbeet : > 2009/9/13 Mike Kaplinskiy : >> Actually it does dereference something, if you think of dmFormName >> being an int (not a pointer), then you would be subtracting an address >> from a random value. > > If it were an int, sure, but "dmFormName" is a WCHAR array. > My point

Re: Sept 11 with tools and tests removed

2009-09-13 Thread Henri Verbeet
2009/9/13 Mike Kaplinskiy : > Actually it does dereference something, if you think of dmFormName > being an int (not a pointer), then you would be subtracting an address > from a random value. If it were an int, sure, but "dmFormName" is a WCHAR array.

Re: Sept 11 with tools and tests removed

2009-09-13 Thread Ben Klein
2009/9/13 Mike Kaplinskiy : > But as Ben noted, the cleaner way would be to use FIELD_OFFSET, which > does exactly the above. As much as I'd love to take the credit for suggesting FIELD_OFFSET, it was Henri :)

Re: Sept 11 with tools and tests removed

2009-09-12 Thread Mike Kaplinskiy
On Sat, Sep 12, 2009 at 7:08 PM, Henri Verbeet wrote: > 2009/9/13 Ben Klein : >> 2009/9/13 Nicolas Le Cam : >>> Last one is also a false positive, it's just two pointers being >>> subtracted to retrieve an offset. >> >> That's not the reason why it's a false positive. Without context that >> line

Re: Sept 11 with tools and tests removed

2009-09-12 Thread Henri Verbeet
2009/9/13 Ben Klein : > 2009/9/13 Nicolas Le Cam : >> Last one is also a false positive, it's just two pointers being >> subtracted to retrieve an offset. > > That's not the reason why it's a false positive. Without context that > line does look like a NULL-dereference (dmW is dereferenced to get t

Re: Sept 11 with tools and tests removed

2009-09-12 Thread Ben Klein
2009/9/13 Nicolas Le Cam : > Last one is also a false positive, it's just two pointers being > subtracted to retrieve an offset. That's not the reason why it's a false positive. Without context that line does look like a NULL-dereference (dmW is dereferenced to get the first pointer before any NUL

Re: Sept 11 with tools and tests removed

2009-09-12 Thread Nicolas Le Cam
2009/9/12 Mike Kaplinskiy : > On Sat, Sep 12, 2009 at 11:24 AM, Mike Kaplinskiy > wrote: >> On Sat, Sep 12, 2009 at 11:19 AM, Nicolas Le Cam >> wrote: >>> 2009/9/12 chris ahrendt : Here is the run for Friday Sept. 11 with the tools and the tests directory results removed. >>>

Re: Sept 11 with tools and tests removed

2009-09-12 Thread Mike Kaplinskiy
On Sat, Sep 12, 2009 at 11:24 AM, Mike Kaplinskiy wrote: > On Sat, Sep 12, 2009 at 11:19 AM, Nicolas Le Cam wrote: >> 2009/9/12 chris ahrendt : >>> >>> Here is the run for Friday Sept. 11 with the tools and the tests >>> directory results removed. >>> >>> >>> [/home/cahrendt/wine-git/dlls/ntdll/s

Re: Sept 11 with tools and tests removed

2009-09-12 Thread Mike Kaplinskiy
On Sat, Sep 12, 2009 at 11:19 AM, Nicolas Le Cam wrote: > 2009/9/12 chris ahrendt : >> >> Here is the run for Friday Sept. 11 with the tools and the tests >> directory results removed. >> >> >> [/home/cahrendt/wine-git/dlls/ntdll/server.c:802]: (error) Resource leak: fd >> [/home/cahrendt/wine-git

Re: Sept 11 with tools and tests removed

2009-09-12 Thread Nicolas Le Cam
2009/9/12 chris ahrendt : > > Here is the run for Friday Sept. 11 with the tools and the tests > directory results removed. > > > [/home/cahrendt/wine-git/dlls/ntdll/server.c:802]: (error) Resource leak: fd > [/home/cahrendt/wine-git/dlls/ntdll/server.c:882]: (error) Resource > leak: fd_cwd > [/hom

Sept 11 with tools and tests removed

2009-09-12 Thread chris ahrendt
Here is the run for Friday Sept. 11 with the tools and the tests directory results removed. [/home/cahrendt/wine-git/dlls/ntdll/server.c:802]: (error) Resource leak: fd [/home/cahrendt/wine-git/dlls/ntdll/server.c:882]: (error) Resource leak: fd_cwd [/home/cahrendt/wine-git/dlls/wineps.drv/ini