PVS-StudioWarnings

PVS-Studio warning V614 for Scilab

Nov 10th, 2014
158
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.56 KB | None | 0 0
  1. typedef void (*voidf)();
  2.  
  3. voidf GetFunctionByName (char *name, int *rep, FTAB *table)
  4. {
  5.   void (*loc)();
  6.   if (name)
  7.   {
  8.     ....
  9.     loc = Emptyfunc;
  10.     ....
  11.   }
  12.   else
  13.   {
  14.     ....
  15.   }
  16.   return(loc);
  17. }
  18.  
  19. This suspicious code was found in Scilab project by PVS-Studio static code analyzer.
  20. Warning message is:
  21. V614 Potentially uninitialized pointer 'loc' used. getfunctionbyname.c 61
  22.  
  23. 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