Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void Socket_Impl::
- send_ (void const* buf, size_t s)
- {
- ....
- while (queue_.is_empty ())
- {
- if (timeout)
- {
- if (cond_.wait (&abs_time) != -1)
- break;
- }
- else
- {
- if (cond_.wait () != -1)
- break;
- }
- return -1; // errno is already set
- }
- ....
- }
- This suspicious code was found in OpenDDS project by PVS-Studio static code analyzer.
- Warning message is:
- V612 An unconditional 'return' within a loop. socket.cpp 187
- 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