PVS-StudioWarnings

PVS-Studio warning V617 for WebRTC

Nov 17th, 2014
177
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.65 KB | None | 0 0
  1. static const uint8_t MAYBE_LOCAL_SSRC = 1;
  2.  
  3. bool MediaPipelineFilter::CheckRtcpSsrc(
  4.   const unsigned char* data,
  5.   size_t len,
  6.   size_t ssrc_offset,
  7.   uint8_t flags) const
  8. {
  9.   ....
  10.   if (flags | MAYBE_LOCAL_SSRC) {
  11.   ....
  12. }
  13.  
  14. This suspicious code was found in WebRTC project by PVS-Studio static code analyzer.
  15. Warning message is:
  16. V617 Consider inspecting the condition. The 'MAYBE_LOCAL_SSRC' argument of the '|' bitwise operation contains a non-zero value. mediapipelinefilter.cpp 118
  17.  
  18. 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