Advertisement
PVS-StudioWarnings

PVS-Studio warning V513 for TPP

Nov 24th, 2014
162
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.65 KB | None | 0 0
  1. double InterProphet::getNSPCounts() {
  2.   ....
  3. #ifdef MSVC
  4.   pHandle[a] = CreateThread(NULL,0,NSPThread,
  5.                             (void*) &data[a],0, NULL);
  6. #else
  7.   pthread_create(&pThreads[a],NULL,NSPThread,
  8.                  (void*) &data[a]);
  9. #endif
  10.   ....
  11. }
  12.  
  13. This suspicious code was found in TPP project by PVS-Studio static code analyzer.
  14. Warning message is:
  15. V513 Use _beginthreadex/_endthreadex functions instead of CreateThread/ExitThread functions. interprophet.cxx 2479
  16.  
  17. 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
Advertisement