Advertisement
PVS-StudioWarnings

PVS-Studio warning V573 for Word11a

Nov 27th, 2014
167
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.66 KB | None | 0 0
  1. FPrintSummaryInfo(doc, cpFirst, cpLim)
  2. int doc;
  3. CP cpFirst, cpLim;
  4. {
  5.   int fRet = fFalse;
  6.   int pgnFirst = vpgnFirst;
  7.   int pgnLast = vpgnLast;
  8.   int sectFirst = vsectFirst;
  9.   int sectLast = sectLast;
  10.   ....
  11. }
  12.  
  13. This is what should have been written here: int sectLast = vsectLast;
  14.  
  15.  
  16. This suspicious code was found in Word11a project by PVS-Studio static code analyzer.
  17. Warning message is:
  18. V573 Uninitialized variable 'sectLast' was used. The variable was used to initialize itself. print2.c 599
  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