PVS-StudioWarnings

PVS-Studio warning V501 for QT

Nov 18th, 2014
154
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.75 KB | None | 0 0
  1. bool QWindowsUser32DLL::initTouch()
  2. {
  3.   QSystemLibrary library(QStringLiteral("user32"));
  4.  
  5.   registerTouchWindow   = ....;
  6.   unregisterTouchWindow = ....;
  7.   getTouchInputInfo     = ....;
  8.   closeTouchInputHandle = ....;
  9.  
  10.   return registerTouchWindow &&
  11.          unregisterTouchWindow &&
  12.          getTouchInputInfo &&
  13.          getTouchInputInfo;
  14. }
  15.  
  16. This suspicious code was found in QT project by PVS-Studio static code analyzer.
  17. Warning message is:
  18. V501 There are identical sub-expressions 'getTouchInputInfo' to the left and to the right of the '&&' operator. qwindowscontext.cpp 216
  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