PVS-StudioWarnings

PVS-Studio warning V560 for OpenMW

Nov 12th, 2014
141
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.67 KB | None | 0 0
  1. enum UpperBodyCharacterState
  2. {
  3.   UpperCharState_Nothing,
  4.   UpperCharState_EquipingWeap,
  5.   UpperCharState_UnEquipingWeap,
  6.   ....
  7. };
  8.  
  9. bool CharacterController::updateWeaponState()
  10. {
  11.   ....
  12.   if((weaptype != WeapType_None ||
  13.       UpperCharState_UnEquipingWeap) && animPlaying)
  14.   ....
  15. }
  16.  
  17. This suspicious code was found in OpenMW project by PVS-Studio static code analyzer.
  18. Warning message is:
  19. V560 A part of conditional expression is always true: UpperCharState_UnEquipingWeap. openmw character.cpp 949
  20.  
  21. 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