swordlegend / recastnavigation

Automatically exported from code.google.com/p/recastnavigation
zlib License
0 stars 0 forks source link

Fairly minor bugs picked up by static analysis tool #56

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
I found an Open Source C++ checking tool called cppcheck
(http://sourceforge.net/projects/cppcheck/) and ran it on Recast to see if
it worked.

Here's what it found:

[RecastDemo/Source/Sample_SoloMeshTiled.cpp:53]: (style) Member variable
not initialized in the constructor 'TileHighlightTool::m_hitPos'
[RecastDemo/Source/Sample_TileMesh.cpp:77]: (style) Member variable not
initialized in the constructor 'NavMeshTileTool::m_hitPos'
[RecastDemo/Source/main.cpp:50]: (style) Member variable not initialized in
the constructor 'FileList::files'
[RecastDemo/Source/imguiRenderGL.cpp:262]: (style) Redundant condition. It
is safe to deallocate a NULL pointer
[RecastDemo/Source/imguiRenderGL.cpp:264]: (style) Redundant condition. It
is safe to deallocate a NULL pointer
[Recast/Source/RecastMeshDetail.cpp:723]: (style) Variable 'pcy' is
assigned a value that is never used
[Recast/Source/RecastMeshDetail.cpp:34]: (style) Member variable not
initialized in the constructor 'rcHeightPatch::height'
[Recast/Source/RecastMeshDetail.cpp:34]: (style) Member variable not
initialized in the constructor 'rcHeightPatch::width'
[Recast/Source/RecastMeshDetail.cpp:34]: (style) Member variable not
initialized in the constructor 'rcHeightPatch::ymin'
[Recast/Source/RecastMeshDetail.cpp:34]: (style) Member variable not
initialized in the constructor 'rcHeightPatch::xmin'
[DebugUtils/Source/RecastDump.cpp:141]: (error) Uninitialized variable: tmp
[Detour/Source/DetourNavMeshBuilder.cpp:351]: (error) Memory leak:
offMeshConClass

Most of them are stylistic issues, the errors are fairly minor in that they
are unlikely to affect anyone in normal use of Recast but they are
legitimate errors.

There's more info on what cppcheck looks for at
http://sourceforge.net/apps/mediawiki/cppcheck/index.php?title=Main_Page

Original issue reported on code.google.com by cameron....@gmail.com on 16 Mar 2010 at 8:57

GoogleCodeExporter commented 9 years ago
Thanks for the report. These are fixed in R145.

Original comment by memono...@gmail.com on 18 Mar 2010 at 8:57