Advertisement
PVS-StudioWarnings

PVS-Studio warning V501 for Firefox

Nov 27th, 2014
191
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.76 KB | None | 0 0
  1. nsresult
  2. SVGOrientSMILType::Interpolate(....)
  3. {
  4.   ...
  5.   if (aStartVal.mU.mOrient.mOrientType !=
  6.       nsIDOMSVGMarkerElement::SVG_MARKER_ORIENT_ANGLE ||
  7.       aStartVal.mU.mOrient.mOrientType !=
  8.       nsIDOMSVGMarkerElement::SVG_MARKER_ORIENT_ANGLE)
  9.   {
  10.     // TODO: it would be nice to be able
  11.     // to handle auto angles too.
  12.     return NS_ERROR_FAILURE;
  13.   }
  14.   ...
  15. }
  16.  
  17. This suspicious code was found in Firefox project by PVS-Studio static code analyzer.
  18. Warning message is:
  19. V501 There are identical sub-expressions to the left and to the right of the '||' operator. svgorientsmiltype.cpp 161
  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
Advertisement