Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- VTK_THREAD_RETURN_TYPE vtkTestCondVarThread( void* arg )
- {
- ...
- if ( td ) <<<---
- {
- ...
- }
- else
- {
- cout << "No thread data!\n";
- cout << " Thread " << ( threadId + 1 )
- << " of " << threadCount << " exiting.\n";
- -- td->NumberOfWorkers; <<<---
- cout.flush();
- }
- ...
- }
- This suspicious code was found in VTK project by PVS-Studio static code analyzer.
- Warning message is:
- V522 Dereferencing of the null pointer 'td' might take place. CommonCxxTests testconditionvariable.cxx 96
- PVS-Studio is a static analyzer for detecting bugs in the source code of applications written in C, C++, C++11, C++/CX. Site: http://www.viva64.com/en/pvs-studio/
Advertisement
Add Comment
Please, Sign In to add comment