Advertisement
PVS-StudioWarnings

PVS-Studio warning V614 for Firebird

Nov 26th, 2014
156
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.63 KB | None | 0 0
  1. static const UCHAR* compile(const UCHAR* sdl, sdl_arg* arg)
  2. {
  3.   SLONG n, count, variable, value, sdl_operator;
  4.   ....
  5.   switch (op)
  6.   {
  7.     ....
  8.     case isc_sdl_add:
  9.       sdl_operator = op_add;
  10.     case isc_sdl_subtract:
  11.       if (!sdl_operator)
  12.         sdl_operator = op_subtract;
  13.   ......
  14. }
  15.  
  16. This suspicious code was found in Firebird project by PVS-Studio static code analyzer.
  17. Warning message is:
  18. V614 Uninitialized variable 'sdl_operator' used. sdl.cpp 404
  19.  
  20. 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