Advertisement
PVS-StudioWarnings

PVS-Studio warning V614 for Word11a

Nov 10th, 2014
166
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.67 KB | None | 0 0
  1. main(argc, argv)
  2. int argc;
  3. char * argv [];
  4. {
  5.   FILE * pfl;
  6.   ....
  7.   for (argi = 1; argi < argc; ++argi)
  8.   {
  9.     if (FWild(argv[argi]))
  10.     {
  11.       FEnumWild(argv[argi], FEWild, 0);
  12.     }
  13.     else
  14.     {
  15.       FEWild(argv[argi], 0);
  16.     }
  17.  
  18.     fclose(pfl);
  19.   }
  20.   ....
  21. }
  22.  
  23. This suspicious code was found in Word11a project by PVS-Studio static code analyzer.
  24. Warning message is:
  25. V614 Uninitialized pointer 'pfl' used. Consider checking the first actual argument of the 'fclose' function. eldes.c 87
  26.  
  27. 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