Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void SVSync::StartThread(void *(*func)(void*), void* arg) {
- #ifdef _WIN32
- LPTHREAD_START_ROUTINE f = (LPTHREAD_START_ROUTINE) func;
- DWORD threadid;
- HANDLE newthread = CreateThread(
- NULL, // default security attributes
- 0, // use default stack size
- f, // thread function
- arg, // argument to thread function
- 0, // use default creation flags
- &threadid); // returns the thread identifier
- #else
- pthread_t helper;
- pthread_create(&helper, NULL, func, arg);
- #endif
- }
- This suspicious code was found in tesseract-ocr project by PVS-Studio static code analyzer.
- Warning message is:
- V513 Use _beginthreadex/_endthreadex functions instead of CreateThread/ExitThread functions. libtesseract303 svutil.cpp 191
- 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