Advertisement
PVS-StudioWarnings

PVS-Studio warning V601 for Micro-Manager

Nov 21st, 2014
166
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.70 KB | None | 0 0
  1. #define DEVICE_OK   0
  2. #define DEVICE_ERR  1 // generic, undefined error
  3. #define DEVICE_INVALID_PROPERTY  2
  4.  
  5. int MM::PropertyCollection::RegisterAction(
  6.   const char* pszName, MM::ActionFunctor* fpAct)
  7. {
  8.   MM::Property* pProp = Find(pszName);
  9.   if (!pProp)
  10.     return DEVICE_INVALID_PROPERTY;
  11.   pProp->RegisterAction(fpAct);
  12.   return true;
  13. }
  14.  
  15. This suspicious code was found in Micro-Manager project by PVS-Studio static code analyzer.
  16. Warning message is:
  17. V601 The 'true' value is implicitly casted to the integer type. Property.cpp 464
  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