Re: Weekly cppcheck run against Aug 27 Git Tree

2009-08-29 Thread James McKenzie
Juan Lang wrote: >>> Changing these to single constant values would make it >>> much harder for the casual observer to read. >>> >> That's what comments are for. >> > > Actually, comments are for code that's not understandable without > them. The code is more readable as it is, IMHO, t

Re: Weekly cppcheck run against Aug 27 Git Tree

2009-08-28 Thread Mike Kaplinskiy
On Fri, Aug 28, 2009 at 5:22 PM, Marcus Meissner wrote: > On Fri, Aug 28, 2009 at 02:16:40PM -0700, chris ahrendt wrote: >> Ok CPPCheck guys have repired the false positive but now get this: >> >> $ ./cppcheck -q -a ../wine/wine/dlls/wineoss.drv/mixer.c >> ../wine/wine/dlls/wineoss.drv/mixer.c:576:

Re: Weekly cppcheck run against Aug 27 Git Tree

2009-08-28 Thread Marcus Meissner
On Fri, Aug 28, 2009 at 02:16:40PM -0700, chris ahrendt wrote: > Ok CPPCheck guys have repired the false positive but now get this: > > $ ./cppcheck -q -a ../wine/wine/dlls/wineoss.drv/mixer.c > ../wine/wine/dlls/wineoss.drv/mixer.c:576: (error) Resource leak: mixer > ../wine/wine/dlls/wineoss.dr

Re: Weekly cppcheck run against Aug 27 Git Tree

2009-08-28 Thread chris ahrendt
Ok CPPCheck guys have repired the false positive but now get this: $ ./cppcheck -q -a ../wine/wine/dlls/wineoss.drv/mixer.c ../wine/wine/dlls/wineoss.drv/mixer.c:576: (error) Resource leak: mixer ../wine/wine/dlls/wineoss.drv/mixer.c:600: (error) Resource leak: mixer ../wine/wine/dlls/wineoss.drv

Re: Weekly cppcheck run against Aug 27 Git Tree

2009-08-28 Thread Juan Lang
>> Changing these to single constant values would make it >> much harder for the casual observer to read. > > That's what comments are for. Actually, comments are for code that's not understandable without them. The code is more readable as it is, IMHO, than it would be by replacing the expressio

Re: Weekly cppcheck run against Aug 27 Git Tree

2009-08-28 Thread Austin English
On Fri, Aug 28, 2009 at 4:06 AM, Ben Klein wrote: > Changing these to single constant values would make it > much harder for the casual observer to read. That's what comments are for. -- -Austin

Re: Weekly cppcheck run against Aug 27 Git Tree

2009-08-28 Thread Ben Klein
2009/8/28 Dmitry Timoshkov : > "James McKenzie" wrote: > >>> False positive, apparently the numbers are hardcoded as: >>> 72     char        msg[128]; >>> 88         msg[10 + 3 * 16] = ' '; // = 58<127 >>> >> >> Why not just say 58 instead of the complex math? >>> >>> 89         msg[10 + 3 * 16 +

Re: Weekly cppcheck run against Aug 27 Git Tree

2009-08-28 Thread Dmitry Timoshkov
"James McKenzie" wrote: False positive, apparently the numbers are hardcoded as: 72 charmsg[128]; 88 msg[10 + 3 * 16] = ' '; // = 58<127 Why not just say 58 instead of the complex math? 89 msg[10 + 3 * 16 + 1 + 16] = '\0'; // = 75<127 Same here. Why not 7

Re: Weekly cppcheck run against Aug 27 Git Tree

2009-08-27 Thread chris ahrendt
James McKenzie wrote: > chris ahrendt wrote: > >> - Original Message >> From: Ben Klein >> To: chris ahrendt >> Cc: wine-devel@winehq.org >> Sent: Thursday, August 27, 2009 10:06:56 PM >> Subject: Re: Weekly cppcheck run against Aug

Re: Weekly cppcheck run against Aug 27 Git Tree

2009-08-27 Thread James McKenzie
chris ahrendt wrote: > > > - Original Message > From: Ben Klein > To: chris ahrendt > Cc: wine-devel@winehq.org > Sent: Thursday, August 27, 2009 10:06:56 PM > Subject: Re: Weekly cppcheck run against Aug 27 Git Tree > > 2009/8/28 chris ahrendt :

Re: Weekly cppcheck run against Aug 27 Git Tree

2009-08-27 Thread James McKenzie
Mike Kaplinskiy wrote: > On Thu, Aug 27, 2009 at 3:52 PM, chris ahrendt wrote: > >> This is the result of running cppcheck 1.35 with the --all parm against >> the august 27th Git tree: >> >> [../wine-git/dlls/dbghelp/msc.c:88]: (possible error) Array index out of >> bounds >> [../wine-git/dlls/d

Re: Weekly cppcheck run against Aug 27 Git Tree

2009-08-27 Thread chris ahrendt
- Original Message From: Ben Klein To: chris ahrendt Cc: wine-devel@winehq.org Sent: Thursday, August 27, 2009 10:06:56 PM Subject: Re: Weekly cppcheck run against Aug 27 Git Tree 2009/8/28 chris ahrendt : > Mike Kaplinskiy wrote: >> On Thu, Aug 27, 2009 at 3:52 PM, chri

Re: Weekly cppcheck run against Aug 27 Git Tree

2009-08-27 Thread Ben Klein
2009/8/28 chris ahrendt : > Mike Kaplinskiy wrote: >> On Thu, Aug 27, 2009 at 3:52 PM, chris ahrendt wrote: >> >>> This is the result of running cppcheck 1.35 with the --all parm against >>> the august 27th Git tree: >>> >>> [../wine-git/dlls/dbghelp/msc.c:88]: (possible error) Array index out of >

Re: Weekly cppcheck run against Aug 27 Git Tree

2009-08-27 Thread chris ahrendt
Mike Kaplinskiy wrote: > On Thu, Aug 27, 2009 at 3:52 PM, chris ahrendt wrote: > >> This is the result of running cppcheck 1.35 with the --all parm against >> the august 27th Git tree: >> >> [../wine-git/dlls/dbghelp/msc.c:88]: (possible error) Array index out of >> bounds >> [../wine-git/dlls/d

Re: Weekly cppcheck run against Aug 27 Git Tree

2009-08-27 Thread chris ahrendt
Mike Kaplinskiy wrote: > On Thu, Aug 27, 2009 at 3:52 PM, chris ahrendt wrote: > >> This is the result of running cppcheck 1.35 with the --all parm against >> the august 27th Git tree: >> >> [../wine-git/dlls/dbghelp/msc.c:88]: (possible error) Array index out of >> bounds >> [../wine-git/dlls/d

Re: Weekly cppcheck run against Aug 27 Git Tree

2009-08-27 Thread Mike Kaplinskiy
On Thu, Aug 27, 2009 at 3:52 PM, chris ahrendt wrote: > This is the result of running cppcheck 1.35 with the --all parm against > the august 27th Git tree: > > [../wine-git/dlls/dbghelp/msc.c:88]: (possible error) Array index out of > bounds > [../wine-git/dlls/dbghelp/msc.c:89]: (possible error) A

Weekly cppcheck run against Aug 27 Git Tree

2009-08-27 Thread chris ahrendt
This is the result of running cppcheck 1.35 with the --all parm against the august 27th Git tree: [../wine-git/dlls/dbghelp/msc.c:88]: (possible error) Array index out of bounds [../wine-git/dlls/dbghelp/msc.c:89]: (possible error) Array index out of bounds [../wine-git/dlls/msvcrt/tests/file.c