PVS-StudioWarnings

PVS-Studio warning V547 for Chromium

Nov 12th, 2014
136
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.65 KB | None | 0 0
  1. WebRtc_Word32
  2. interpolator::SupportedVideoType(VideoType srcVideoType,
  3.                                  VideoType dstVideoType)
  4. {
  5.   ...
  6.   if ((srcVideoType != kI420) ||
  7.       (srcVideoType != kIYUV) ||
  8.       (srcVideoType != kYV12))
  9.   {
  10.       return -1;
  11.   }
  12.   ...
  13. }
  14.  
  15. This suspicious code was found in Chromium project by PVS-Studio static code analyzer.
  16. Warning message is:
  17. V547 Expression is always true. Probably the '&&' operator should be used here. webrtc_vplib interpolator.cc 119
  18.  
  19. 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