PVS-StudioWarnings

PVS-Studio warning V532 for IPP Samples

Nov 12th, 2014
166
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.60 KB | None | 0 0
  1. static IppStatus mp2_HuffmanTableInitAlloc(Ipp32s *tbl, ...)
  2. {
  3.   ...
  4.   for (i = 0; i < num_tbl; i++) {
  5.     *tbl++;
  6.   }
  7.   ...
  8. }
  9.  
  10. Meaningless code. Currently it is equivalent to tbl += num_tbl.
  11.  
  12. This suspicious code was found in IPP Samples project by PVS-Studio static code analyzer.
  13. Warning message is:
  14. V532 Consider inspecting  the statement of '*pointer++' pattern. Probably meant: '(*pointer)++'. mpeg2_dec umc_mpeg2_dec.cpp 59
  15.  
  16. 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