[h323plus] Memory leak in gkserver.cxx

Mayank Jain mayank at niksun.com
Thu Aug 5 10:35:08 EDT 2010


  On 8/5/2010 10:12 AM, Jan Willamowius wrote:
> Hi Mayank,
>
> H323Plus is a library that provides applications with functions to use.
> In contrast to an application, the fact that some functions aren't used
> internally, is no indication that anything is wrong or that they should
> be removed.

You are right Jan. I should not use the --unused-function option. Attached are the updated files.

Regards,
Mayank Jain
> Regards,
> Jan
>
> Mayank Jain wrote:
>> Attached are some more issues that can be addressed with h323 and ptlib.
>>
>> Tool used is cppcheck
>>
>>    cppcheck --all -f -j 13 -q -s --unused-functions
>>
>> Regards,
>> Mayank Jain
>

-------------- next part --------------
[./src/h323pluginmgr.cxx:1261]: (style) The class 'H323CodecPluginCapabilityMapEntry' has no constructor
[./src/h323pluginmgr.cxx:1260]: (style) The class 'H323CodecPluginCapabilityMapEntry' has no constructor
-------------- next part --------------
[./samples/audio/audio.cxx:354]: (all) Memory leak: data
[./samples/ptimer/main.cxx:248]: (all) Memory leak: startIt
[./samples/ptimer/main.cxx:318]: (all) Memory leak: thread
[./samples/strtest/main.cxx:241]: (all) Memory leak: thrd
[./samples/vxmltest/main.cxx:141]: (all) Memory leak: thread1
[./samples/vxmltest/main.h:31]: (all) Memory leak: Vxmltest::vxml
[./samples/vxmltest/main.cxx:140]: (all) Memory leak: thread1
[./src/ptclib/speex_echo/misc.c:107]: (style) Warning - using char variable in bit operation
[./src/ptclib/speex_echo/misc.c:123]: (style) Warning - using char variable in bit operation
[./src/ptclib/speex_echo/paec.cxx:85]: (style) Redundant condition. It is safe to deallocate a NULL pointer
[./src/ptclib/speex_echo/paec.cxx:87]: (style) Redundant condition. It is safe to deallocate a NULL pointer
[./src/ptclib/speex_echo/paec.cxx:89]: (style) Redundant condition. It is safe to deallocate a NULL pointer
[./src/ptclib/speex_echo/paec.cxx:91]: (style) Redundant condition. It is safe to deallocate a NULL pointer
[./src/ptlib/common/contain.cxx:1237]: (style) Warning - using char variable in bit operation
[./src/ptlib/common/contain.cxx:1907]: (style) Warning - using char variable in bit operation
[./src/ptlib/common/osutils.cxx:1953]: (all) Memory leak: thread
[./src/ptlib/common/contain.cxx:339]: (all) Memory leak: newArray
[./src/ptlib/common/videoio.cxx:326]: (style) Redundant condition. It is safe to deallocate a NULL pointer
[./src/ptlib/msos/icmp.cxx:150]: (style) struct or union member 'icmp_echo_reply::DataSize' is never used
[./src/ptlib/msos/icmp.cxx:151]: (style) struct or union member 'icmp_echo_reply::Reserved' is never used
[./src/ptlib/msos/icmp.cxx:152]: (style) struct or union member 'icmp_echo_reply::Data' is never used
[./src/ptlib/msos/icmp.cxx:153]: (style) struct or union member 'icmp_echo_reply::Options' is never used
[./src/ptlib/msos/mail.cxx:391]: (all) Memory leak: CMC_message_reference_ptr::ref
[./src/ptlib/msos/ethsock.cxx:720]: (style) struct or union member 'DhcpInfo::index' is never used
[./src/ptlib/msos/ethsock.cxx:725]: (style) struct or union member 'DhcpInfo::unknown1' is never used
[./src/ptlib/msos/ethsock.cxx:726]: (style) struct or union member 'DhcpInfo::unknown2' is never used
[./src/ptlib/msos/ethsock.cxx:727]: (style) struct or union member 'DhcpInfo::unknown3' is never used
[./src/ptlib/msos/ethsock.cxx:728]: (style) struct or union member 'DhcpInfo::unknown4' is never used
[./src/ptlib/msos/ethsock.cxx:729]: (style) struct or union member 'DhcpInfo::unknown5' is never used
[./src/ptlib/msos/ethsock.cxx:730]: (style) struct or union member 'DhcpInfo::unknown6' is never used
[./src/ptlib/msos/ethsock.cxx:731]: (style) struct or union member 'DhcpInfo::unknown7' is never used
[./src/ptlib/msos/ethsock.cxx:719]: (style) struct or union member 'DhcpInfo::index' is never used
[./src/ptlib/msos/ethsock.cxx:724]: (style) struct or union member 'DhcpInfo::unknown1' is never used
[./src/ptlib/msos/ethsock.cxx:725]: (style) struct or union member 'DhcpInfo::unknown2' is never used
[./src/ptlib/msos/ethsock.cxx:726]: (style) struct or union member 'DhcpInfo::unknown3' is never used
[./src/ptlib/msos/ethsock.cxx:727]: (style) struct or union member 'DhcpInfo::unknown4' is never used
[./src/ptlib/msos/ethsock.cxx:728]: (style) struct or union member 'DhcpInfo::unknown5' is never used
[./src/ptlib/msos/ethsock.cxx:729]: (style) struct or union member 'DhcpInfo::unknown6' is never used
[./src/ptlib/msos/ethsock.cxx:730]: (style) struct or union member 'DhcpInfo::unknown7' is never used
[./src/ptlib/msos/svcproc.cxx:1207]: (error) Class ServiceManager which is inherited by class NT_ServiceManager does not have a virtual destructor
[./src/ptlib/msos/vidinput_directx.cxx:236]: (style) 'operator=' should return something
[./src/ptlib/msos/vfw.cxx:61]: (style) struct or union member 'videohdr_tag::dwTimeCaptured' is never used
[./src/ptlib/msos/vfw.cxx:62]: (style) struct or union member 'videohdr_tag::dwUser' is never used
[./src/ptlib/msos/vfw.cxx:64]: (style) struct or union member 'videohdr_tag::dwReserved' is never used
[./src/ptlib/msos/vfw.cxx:75]: (style) struct or union member 'tagCapDriverCaps::hVideoIn' is never used
[./src/ptlib/msos/vfw.cxx:76]: (style) struct or union member 'tagCapDriverCaps::hVideoOut' is never used
[./src/ptlib/msos/vfw.cxx:77]: (style) struct or union member 'tagCapDriverCaps::hVideoExtIn' is never used
[./src/ptlib/msos/vfw.cxx:78]: (style) struct or union member 'tagCapDriverCaps::hVideoExtOut' is never used
[./src/ptlib/msos/vfw.cxx:85]: (style) struct or union member 'tagCaptureParms::fYield' is never used
[./src/ptlib/msos/vfw.cxx:86]: (style) struct or union member 'tagCaptureParms::dwIndexSize' is never used
[./src/ptlib/msos/vfw.cxx:87]: (style) struct or union member 'tagCaptureParms::wChunkGranularity' is never used
[./src/ptlib/msos/vfw.cxx:88]: (style) struct or union member 'tagCaptureParms::fUsingDOSMemory' is never used
[./src/ptlib/msos/vfw.cxx:89]: (style) struct or union member 'tagCaptureParms::wNumVideoRequested' is never used
[./src/ptlib/msos/vfw.cxx:91]: (style) struct or union member 'tagCaptureParms::wNumAudioRequested' is never used
[./src/ptlib/msos/vfw.cxx:92]: (style) struct or union member 'tagCaptureParms::vKeyAbort' is never used
[./src/ptlib/msos/vfw.cxx:96]: (style) struct or union member 'tagCaptureParms::wTimeLimit' is never used
[./src/ptlib/msos/vfw.cxx:97]: (style) struct or union member 'tagCaptureParms::fMCIControl' is never used
[./src/ptlib/msos/vfw.cxx:98]: (style) struct or union member 'tagCaptureParms::fStepMCIDevice' is never used
[./src/ptlib/msos/vfw.cxx:99]: (style) struct or union member 'tagCaptureParms::dwMCIStartTime' is never used
[./src/ptlib/msos/vfw.cxx:100]: (style) struct or union member 'tagCaptureParms::dwMCIStopTime' is never used
[./src/ptlib/msos/vfw.cxx:101]: (style) struct or union member 'tagCaptureParms::fStepCaptureAt2x' is never used
[./src/ptlib/msos/vfw.cxx:102]: (style) struct or union member 'tagCaptureParms::wStepCaptureAverageFrames' is never used
[./src/ptlib/msos/vfw.cxx:103]: (style) struct or union member 'tagCaptureParms::dwAudioBufferSize' is never used
[./src/ptlib/msos/vfw.cxx:104]: (style) struct or union member 'tagCaptureParms::fDisableWriteCache' is never used
[./src/ptlib/msos/vfw.cxx:110]: (style) struct or union member 'tagCapStatus::fLiveWindow' is never used
[./src/ptlib/msos/vfw.cxx:111]: (style) struct or union member 'tagCapStatus::fOverlayWindow' is never used
[./src/ptlib/msos/vfw.cxx:112]: (style) struct or union member 'tagCapStatus::fScale' is never used
[./src/ptlib/msos/vfw.cxx:113]: (style) struct or union member 'tagCapStatus::ptScroll' is never used
[./src/ptlib/msos/vfw.cxx:114]: (style) struct or union member 'tagCapStatus::fUsingDefaultPalette' is never used
[./src/ptlib/msos/vfw.cxx:115]: (style) struct or union member 'tagCapStatus::fAudioHardware' is never used
[./src/ptlib/msos/vfw.cxx:116]: (style) struct or union member 'tagCapStatus::fCapFileExists' is never used
[./src/ptlib/msos/vfw.cxx:117]: (style) struct or union member 'tagCapStatus::dwCurrentVideoFrame' is never used
[./src/ptlib/msos/vfw.cxx:118]: (style) struct or union member 'tagCapStatus::dwCurrentVideoFramesDropped' is never used
[./src/ptlib/msos/vfw.cxx:119]: (style) struct or union member 'tagCapStatus::dwCurrentWaveSamples' is never used
[./src/ptlib/msos/vfw.cxx:120]: (style) struct or union member 'tagCapStatus::dwCurrentTimeElapsedMS' is never used
[./src/ptlib/msos/vfw.cxx:121]: (style) struct or union member 'tagCapStatus::hPalCurrent' is never used
[./src/ptlib/msos/vfw.cxx:123]: (style) struct or union member 'tagCapStatus::dwReturn' is never used
[./src/ptlib/msos/vfw.cxx:124]: (style) struct or union member 'tagCapStatus::wNumVideoAllocated' is never used
[./src/ptlib/msos/vfw.cxx:125]: (style) struct or union member 'tagCapStatus::wNumAudioAllocated' is never used
[./src/ptlib/msos/vidinput_directx.cxx:235]: (style) 'operator=' should return something
[./src/ptlib/msos/vfw.cxx:59]: (style) struct or union member 'videohdr_tag::dwTimeCaptured' is never used
[./src/ptlib/msos/vfw.cxx:60]: (style) struct or union member 'videohdr_tag::dwUser' is never used
[./src/ptlib/msos/vfw.cxx:62]: (style) struct or union member 'videohdr_tag::dwReserved' is never used
[./src/ptlib/msos/vfw.cxx:73]: (style) struct or union member 'tagCapDriverCaps::hVideoIn' is never used
[./src/ptlib/msos/vfw.cxx:74]: (style) struct or union member 'tagCapDriverCaps::hVideoOut' is never used
[./src/ptlib/msos/vfw.cxx:75]: (style) struct or union member 'tagCapDriverCaps::hVideoExtIn' is never used
[./src/ptlib/msos/vfw.cxx:76]: (style) struct or union member 'tagCapDriverCaps::hVideoExtOut' is never used
[./src/ptlib/msos/vfw.cxx:83]: (style) struct or union member 'tagCaptureParms::fYield' is never used
[./src/ptlib/msos/vfw.cxx:84]: (style) struct or union member 'tagCaptureParms::dwIndexSize' is never used
[./src/ptlib/msos/vfw.cxx:85]: (style) struct or union member 'tagCaptureParms::wChunkGranularity' is never used
[./src/ptlib/msos/vfw.cxx:86]: (style) struct or union member 'tagCaptureParms::fUsingDOSMemory' is never used
[./src/ptlib/msos/vfw.cxx:87]: (style) struct or union member 'tagCaptureParms::wNumVideoRequested' is never used
[./src/ptlib/msos/vfw.cxx:89]: (style) struct or union member 'tagCaptureParms::wNumAudioRequested' is never used
[./src/ptlib/msos/vfw.cxx:90]: (style) struct or union member 'tagCaptureParms::vKeyAbort' is never used
[./src/ptlib/msos/vfw.cxx:94]: (style) struct or union member 'tagCaptureParms::wTimeLimit' is never used
[./src/ptlib/msos/vfw.cxx:95]: (style) struct or union member 'tagCaptureParms::fMCIControl' is never used
[./src/ptlib/msos/vfw.cxx:96]: (style) struct or union member 'tagCaptureParms::fStepMCIDevice' is never used
[./src/ptlib/msos/vfw.cxx:97]: (style) struct or union member 'tagCaptureParms::dwMCIStartTime' is never used
[./src/ptlib/msos/vfw.cxx:98]: (style) struct or union member 'tagCaptureParms::dwMCIStopTime' is never used
[./src/ptlib/msos/vfw.cxx:99]: (style) struct or union member 'tagCaptureParms::fStepCaptureAt2x' is never used
[./src/ptlib/msos/vfw.cxx:100]: (style) struct or union member 'tagCaptureParms::wStepCaptureAverageFrames' is never used
[./src/ptlib/msos/vfw.cxx:101]: (style) struct or union member 'tagCaptureParms::dwAudioBufferSize' is never used
[./src/ptlib/msos/vfw.cxx:102]: (style) struct or union member 'tagCaptureParms::fDisableWriteCache' is never used
[./src/ptlib/msos/vfw.cxx:108]: (style) struct or union member 'tagCapStatus::fLiveWindow' is never used
[./src/ptlib/msos/vfw.cxx:109]: (style) struct or union member 'tagCapStatus::fOverlayWindow' is never used
[./src/ptlib/msos/vfw.cxx:110]: (style) struct or union member 'tagCapStatus::fScale' is never used
[./src/ptlib/msos/vfw.cxx:111]: (style) struct or union member 'tagCapStatus::ptScroll' is never used
[./src/ptlib/msos/vfw.cxx:112]: (style) struct or union member 'tagCapStatus::fUsingDefaultPalette' is never used
[./src/ptlib/msos/vfw.cxx:113]: (style) struct or union member 'tagCapStatus::fAudioHardware' is never used
[./src/ptlib/msos/vfw.cxx:114]: (style) struct or union member 'tagCapStatus::fCapFileExists' is never used
[./src/ptlib/msos/vfw.cxx:115]: (style) struct or union member 'tagCapStatus::dwCurrentVideoFrame' is never used
[./src/ptlib/msos/vfw.cxx:116]: (style) struct or union member 'tagCapStatus::dwCurrentVideoFramesDropped' is never used
[./src/ptlib/msos/vfw.cxx:117]: (style) struct or union member 'tagCapStatus::dwCurrentWaveSamples' is never used
[./src/ptlib/msos/vfw.cxx:118]: (style) struct or union member 'tagCapStatus::dwCurrentTimeElapsedMS' is never used
[./src/ptlib/msos/vfw.cxx:119]: (style) struct or union member 'tagCapStatus::hPalCurrent' is never used
[./src/ptlib/msos/vfw.cxx:121]: (style) struct or union member 'tagCapStatus::dwReturn' is never used
[./src/ptlib/msos/vfw.cxx:122]: (style) struct or union member 'tagCapStatus::wNumVideoAllocated' is never used
[./src/ptlib/msos/vfw.cxx:123]: (style) struct or union member 'tagCapStatus::wNumAudioAllocated' is never used
[./src/ptlib/msos/vidinput_directx.cxx:234]: (style) 'operator=' should return something
[./src/ptlib/unix/beaudio.cxx:488]: (all) Memory leak: pentry
[./src/ptlib/unix/beaudio.cxx:1759]: (all) Memory leak: pentry
[./src/ptlib/msos/vidinput_directx.cxx:233]: (style) 'operator=' should return something
[./src/ptlib/common/osutils.cxx:1887]: (style) struct or union member 'THREADNAME_INFO::dwType' is never used
[./src/ptlib/common/osutils.cxx:1888]: (style) struct or union member 'THREADNAME_INFO::szName' is never used
[./src/ptlib/common/osutils.cxx:1889]: (style) struct or union member 'THREADNAME_INFO::dwThreadID' is never used
[./src/ptlib/common/osutils.cxx:1890]: (style) struct or union member 'THREADNAME_INFO::dwFlags' is never used
[./src/ptlib/wince/ConsoleCE/ios.cpp:124]: (style) Redundant condition. It is safe to deallocate a NULL pointer
[./src/ptlib/wince/ConsoleCE/getdate_tab.cpp:146]: (style) struct or union member 'yyltype::timestamp' is never used
[./src/ptlib/wince/ConsoleCE/getdate_tab.cpp:147]: (style) struct or union member 'yyltype::first_line' is never used
[./src/ptlib/wince/ConsoleCE/getdate_tab.cpp:148]: (style) struct or union member 'yyltype::first_column' is never used
[./src/ptlib/wince/ConsoleCE/getdate_tab.cpp:149]: (style) struct or union member 'yyltype::last_line' is never used
[./src/ptlib/wince/ConsoleCE/getdate_tab.cpp:150]: (style) struct or union member 'yyltype::last_column' is never used
[./src/ptlib/wince/ConsoleCE/getdate_tab.cpp:151]: (style) struct or union member 'yyltype::text' is never used
[./src/ptlib/wince/ConsoleCE/getdate_tab.cpp:145]: (style) struct or union member 'yyltype::timestamp' is never used
[./src/ptlib/wince/ConsoleCE/getdate_tab.cpp:146]: (style) struct or union member 'yyltype::first_line' is never used
[./src/ptlib/wince/ConsoleCE/getdate_tab.cpp:147]: (style) struct or union member 'yyltype::first_column' is never used
[./src/ptlib/wince/ConsoleCE/getdate_tab.cpp:148]: (style) struct or union member 'yyltype::last_line' is never used
[./src/ptlib/wince/ConsoleCE/getdate_tab.cpp:149]: (style) struct or union member 'yyltype::last_column' is never used
[./src/ptlib/wince/ConsoleCE/getdate_tab.cpp:150]: (style) struct or union member 'yyltype::text' is never used
[./tools/configure/configure.cpp:736]: (style) Redundant code: Found a statement that begins with string constant
[./tools/configure/configure.cpp:656]: (error) After push_back or push_front, the iterator 'feature' may be invalid
[./tools/asnparser/main.h:186]: (error) Class ConstraintElementBase which is inherited by class SingleValueConstraintElement does not have a virtual destructor
[./tools/asnparser/main.h:186]: (error) Class ConstraintElementBase which is inherited by class ValueRangeConstraintElement does not have a virtual destructor
[./tools/asnparser/main.h:186]: (error) Class ConstraintElementBase which is inherited by class SubTypeConstraintElement does not have a virtual destructor
[./tools/asnparser/main.h:186]: (error) Class ConstraintElementBase which is inherited by class NestedConstraintConstraintElement does not have a virtual destructor
[./tools/asnparser/main.h:356]: (error) Class TypeBase which is inherited by class SelectionType does not have a virtual destructor
[./tools/asnparser/main.h:356]: (error) Class TypeBase which is inherited by class SequenceOfType does not have a virtual destructor


More information about the h323plus mailing list