Advertisement
PVS-StudioWarnings

PVS-Studio warning V537 for ReactOS

Nov 21st, 2014
156
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.65 KB | None | 0 0
  1. GpStatus WINGDIPAPI GdipGetRegionBoundsI()
  2. {
  3.   ...
  4.   if(status == Ok){
  5.     rect->X = roundr(rectf.X);
  6.     rect->Y = roundr(rectf.X);
  7.     rect->Width  = roundr(rectf.Width);
  8.     rect->Height = roundr(rectf.Height);
  9.   }
  10.   ...
  11. }
  12.  
  13. This is what should have been written here: rect->Y = roundr(rectf.Y);
  14.  
  15. This suspicious code was found in ReactOS project by PVS-Studio static code analyzer.
  16. Warning message is:
  17. V537 Consider reviewing the correctness of 'X' item's usage. gdiplus region.c 715
  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
Advertisement