PVS-StudioWarnings

PVS-Studio warning V573 for Firebird

Nov 19th, 2014
194
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.66 KB | None | 0 0
  1. void realign(....)
  2. {
  3.   for (....)
  4.   {
  5.     UCHAR* p = buffer + field->fld_offset;
  6.     ....
  7.     for (const burp_fld* field = relation->rel_fields;
  8.          field; field = field->fld_next)
  9.     {
  10.       ....
  11.       UCHAR* p = buffer + FB_ALIGN(p - buffer, sizeof(SSHORT));
  12.   ........
  13. }
  14.  
  15. This suspicious code was found in Firebird project by PVS-Studio static code analyzer.
  16. Warning message is:
  17. V573 Uninitialized variable 'p' was used. The variable was used to initialize itself. restore.cpp 17535
  18.  
  19. 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