PVS-StudioWarnings

PVS-Studio warning V614 for OpenCOLLADA

Nov 17th, 2014
215
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.60 KB | None | 0 0
  1. void write(FILE* file) const
  2. {
  3.   fprintf(file,"%i %i %i %i ",
  4.     sDivisionCount, tDivisionCount, uDivisionCount, pointCount);
  5.   size_t size = pointCount*3;
  6.   for(size_t i; i<size; ++i)
  7.   {
  8.     fprintf(file, "%f", points[i]);
  9.     if(i+1<size) fprintf(file, " ");
  10.   }
  11. }
  12.  
  13. This suspicious code was found in OpenCOLLADA project by PVS-Studio static code analyzer.
  14. Warning message is:
  15. V614 Uninitialized variable 'i' used. mayadmtypes.h 1728
  16.  
  17. 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