I ran CPP check against the monday git tree using the latest CPP check off their git tree.
here is the result :
[/home/cahrendt/wine-git/dlls/ddraw/tests/d3d.c:320]: (error) Division by zero [/home/cahrendt/wine-git/dlls/ddraw/tests/d3d.c:336]: (error) Division by zero [/home/cahrendt/wine-git/dlls/ddraw/tests/d3d.c:340]: (error) Division by zero [/home/cahrendt/wine-git/dlls/msvcrt/tests/file.c:982]: (error) Deallocating a deallocated pointer: stream2 [/home/cahrendt/wine-git/dlls/msvcrt/tests/file.c:966]: (error) Resource leak: stream3 [/home/cahrendt/wine-git/dlls/msvcrt/tests/file.c:973]: (error) Resource leak: stream4 [/home/cahrendt/wine-git/dlls/msvcrt/tests/heap.c:433]: (possible error) Memory leak: mem [/home/cahrendt/wine-git/dlls/ntdll/directory.c:2339]: (error) Resource leak: old_cwd [/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/rpcrt4/tests/server.c:1189]: (possible error) Array index out of bounds [/home/cahrendt/wine-git/dlls/sane.ds/ui.c:842]: (error) Division by zero [/home/cahrendt/wine-git/dlls/sane.ds/ui.c:843]: (error) Division by zero [/home/cahrendt/wine-git/dlls/sane.ds/ui.c:863]: (error) Division by zero [/home/cahrendt/wine-git/dlls/windowscodecs/bmpencode.c:336]: (error) Division by zero [/home/cahrendt/wine-git/dlls/windowscodecs/bmpencode.c:337]: (error) Division by zero [/home/cahrendt/wine-git/dlls/wined3d/wined3d_private.h:218]: (error) Division by zero [/home/cahrendt/wine-git/dlls/wined3d/wined3d_private.h:219]: (error) Division by zero [/home/cahrendt/wine-git/dlls/wined3d/wined3d_private.h:240]: (error) Division by zero [/home/cahrendt/wine-git/dlls/wined3d/wined3d_private.h:241]: (error) Division by zero [/home/cahrendt/wine-git/dlls/wineoss.drv/mmaux.c:150]: (error) Resource leak: mixer [/home/cahrendt/wine-git/dlls/wineoss.drv/mmaux.c:211]: (error) Resource leak: mixer [/home/cahrendt/wine-git/dlls/wineps.drv/init.c:270]: (error) Possible null pointer dereference: dmW - otherwise it is redundant to check if dmW is null at line 272 [/home/cahrendt/wine-git/programs/oleview/pane.c:152]: (error) Possible null pointer dereference: hWndCreated [/home/cahrendt/wine-git/tools/fnt2bdf.c:779]: (error) Resource leak: fd [/home/cahrendt/wine-git/tools/fnt2fon.c:387]: (error) Memory leak: file_lens [/home/cahrendt/wine-git/tools/makedep.c:953]: (error) Resource leak: file [/home/cahrendt/wine-git/tools/sfnt2fnt.c:877]: (error) Resource leak: ofp [/home/cahrendt/wine-git/tools/widl/write_msft.c:2536]: (error) Resource leak: fd [/home/cahrendt/wine-git/tools/winedump/msmangle.c:164]: (possible error) Memory leak: function_name [/home/cahrendt/wine-git/tools/winedump/pe.c:1549]: (possible error) Memory leak: map
chris
2009/9/1 chris ahrendt celticht32@yahoo.com:
[/home/cahrendt/wine-git/dlls/ddraw/tests/d3d.c:320]: (error) Division by zero [/home/cahrendt/wine-git/dlls/ddraw/tests/d3d.c:336]: (error) Division by zero [/home/cahrendt/wine-git/dlls/ddraw/tests/d3d.c:340]: (error) Division by zero
...
Division by zero [/home/cahrendt/wine-git/dlls/wined3d/wined3d_private.h:219]: (error) Division by zero [/home/cahrendt/wine-git/dlls/wined3d/wined3d_private.h:240]: (error) Division by zero [/home/cahrendt/wine-git/dlls/wined3d/wined3d_private.h:241]: (error) Division by zero
Although that's not a particularly nice way to generate floating point specials, they're only errors if the relevant exceptions are unmasked. I think it should be safe to assume they aren't in the ddraw tests, and in case of wined3d it won't generate them unless the input data already contained them.
Division by zero [/home/cahrendt/wine-git/dlls/windowscodecs/bmpencode.c:337]: (error) Division by zero
http://source.winehq.org/git/wine.git/?a=blob;f=dlls/windowscodecs/bmpencode...
I'm going to need someone to explain to me how a division by a literal 0.0254 can be a "Division by zero".
ok will report a false positive thanks
chris
----- Original Message ---- From: Vincent Povirk madewokherd+8cd9@gmail.com To: chris ahrendt celticht32@yahoo.com Cc: wine-devel@winehq.org Sent: Tuesday, September 1, 2009 9:30:46 AM Subject: Re: cpp check run monday Aug 31
Division by zero [/home/cahrendt/wine-git/dlls/windowscodecs/bmpencode.c:337]: (error) Division by zero
http://source.winehq.org/git/wine.git/?a=blob;f=dlls/windowscodecs/bmpencode...
I'm going to need someone to explain to me how a division by a literal 0.0254 can be a "Division by zero".