Advertisement
PVS-StudioWarnings

PVS-Studio warning V596 for OpenMW

Nov 26th, 2014
178
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.65 KB | None | 0 0
  1. void ExprParser::replaceBinaryOperands()
  2. {
  3.   ....
  4.   if (t1==t2)
  5.     mOperands.push_back (t1);
  6.   else if (t1=='f' || t2=='f')
  7.     mOperands.push_back ('f');
  8.   else
  9.     std::logic_error ("failed to determine result operand type");
  10. }
  11.  
  12. This suspicious code was found in OpenMW project by PVS-Studio static code analyzer.
  13. Warning message is:
  14. V596 The object was created but it is not being used. The 'throw' keyword could be missing: throw logic_error(FOO); components exprparser.cpp 101
  15.  
  16. 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