PVS-StudioWarnings

PVS-Studio warning V537 for Miranda IM

Nov 13th, 2014
166
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.68 KB | None | 0 0
  1. static BOOL ske_DrawTextEffect(....)
  2. {
  3.   ...
  4.   minX=max(0,minX+mcLeftStart-2);
  5.   minY=max(0,minY+mcTopStart-2);
  6.   maxX=min((int)width,maxX+mcRightEnd-1);
  7.   maxY=min((int)height,maxX+mcBottomEnd-1);
  8.   ...
  9. }
  10.  
  11. Most likely this is what should be written here: maxY=min((int)height,maxY+mcBottomEnd-1);
  12.  
  13. This suspicious code was found in Miranda IM project by PVS-Studio static code analyzer.
  14. Warning message is:
  15. V537 Consider reviewing the correctness of 'maxX' item's usage. clist_modern modern_skinengine.cpp 2898
  16.  
  17. 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