Advertisement
PVS-StudioWarnings

PVS-Studio warning V519 for wxWidgets

Nov 21st, 2014
138
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.79 KB | None | 0 0
  1. bool m_isDirty;
  2. bool m_isShown;
  3.  
  4. bool wxGenericDragImage::BeginDrag(const wxPoint& hotspot,
  5.                                    wxWindow* window,
  6.                                    bool fullScreen,
  7.                                    wxRect* rect)
  8. {
  9.   ...
  10.   m_isDirty = false;
  11.   m_isDirty = false;
  12.   ...
  13. }
  14.  
  15. Most likely this is what should be written here: m_isShown = false;
  16.  
  17. This suspicious code was found in wxWidgets project by PVS-Studio static code analyzer.
  18. Warning message is:
  19. V519 The 'm_isDirty' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 249, 250. core dragimgg.cpp 250
  20.  
  21. 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