PVS-StudioWarnings

PVS-Studio warning V570 for OpenCV

Nov 12th, 2014
169
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.62 KB | None | 0 0
  1. typedef struct CvStereoCamera
  2. {
  3.  ....
  4.  float fundMatr[9]; /* fundamental matrix */
  5.  ....
  6. };
  7.  
  8. CvStereoCamera stereo;
  9.  
  10. void CvCalibFilter::Stop( bool calibrate )
  11. {
  12.   ....
  13.   for( i = 0; i < 9; i++ )
  14.   {
  15.     stereo.fundMatr[i] = stereo.fundMatr[i];
  16.   }
  17.   ....
  18. }
  19.  
  20. This suspicious code was found in OpenCV project by PVS-Studio static code analyzer.
  21. Warning message is:
  22. V570 The 'stereo.fundMatr[i]' variable is assigned to itself. calibfilter.cpp 339
  23.  
  24. 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