Advertisement
PVS-StudioWarnings

PVS-Studio warning V570 for OpenCV

Nov 25th, 2014
127
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.56 KB | None | 0 0
  1. void CV_Resize_Test::resize_1d(....)
  2. {
  3.   ....
  4.   for (int r = 0; r < cn; ++r)
  5.   {
  6.     xyD[r] = 0;
  7.     for (int k = 0; k < ksize; ++k)
  8.       xyD[r] += w[k] * xyS[k * cn + r];
  9.     xyD[r] = xyD[r];
  10.   }
  11.   ....
  12. }
  13.  
  14. This suspicious code was found in OpenCV project by PVS-Studio static code analyzer.
  15. Warning message is:
  16. V570 The 'xyD[r]' variable is assigned to itself. test_imgwarp_strict.cpp 560
  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
Advertisement