PVS-StudioWarnings

PVS-Studio warning V523 for IPP Samples

Nov 19th, 2014
176
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.77 KB | None | 0 0
  1. void H264SegmentDecoder::ResetDeblockingVariablesMBAFF()
  2. {
  3.   ...
  4.   if (GetMBFieldDecodingFlag(....))
  5.     m_deblockingParams.nNeighbour[HORIZONTAL_DEBLOCKING] =
  6.       m_CurMBAddr - mb_width * 2;
  7.   else
  8.     m_deblockingParams.nNeighbour[HORIZONTAL_DEBLOCKING] =
  9.       m_CurMBAddr - mb_width * 2;
  10.   ...
  11. }
  12.  
  13. Most likely this is what should be written at end: mb_width * 2 + 1;
  14.  
  15.  
  16. This suspicious code was found in IPP Samples project by PVS-Studio static code analyzer.
  17. Warning message is:
  18. V523 The 'then' statement is equivalent to the 'else' statement. h264_dec umc_h264_segment_decoder_deblocking_mbaff.cpp 340
  19.  
  20. 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