Advertisement
PVS-StudioWarnings

PVS-Studio warning V595 for ACE

Nov 25th, 2014
172
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.80 KB | None | 0 0
  1. ACE_Reactor *
  2. ACE_Event_Handler::reactor (void) const
  3. {
  4.   ACE_TRACE ("ACE_Event_Handler::reactor");
  5.   return this->reactor_;
  6. }
  7.  
  8. template <class SVC_HANDLER, ACE_PEER_ACCEPTOR_1> int
  9. ACE_Oneshot_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::
  10.   handle_input (ACE_HANDLE)
  11. {
  12.   ...
  13.   bool const reset_new_handle =
  14.     this->reactor ()->uses_event_associations ();
  15.  
  16.   if (this->reactor ())
  17.   ...
  18. }
  19.  
  20. This suspicious code was found in ACE project by PVS-Studio static code analyzer.
  21. Warning message is:
  22. V595 The 'this->reactor()' pointer was utilized before it was verified against nullptr. Check lines: 1139, 1145. Gateway acceptor.cpp 1139
  23.  
  24. 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