PVS-StudioWarnings

PVS-Studio warning V601 for Micro-Manager

Nov 20th, 2014
157
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.66 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::CreateProperty(....)
  6. {
  7.   if (Find(pszName))
  8.     return DEVICE_DUPLICATE_PROPERTY;
  9.   ....
  10.   if (!pProp->Set(pszValue))
  11.     return false;
  12.   ....
  13.   return DEVICE_OK;
  14. }
  15.  
  16. This suspicious code was found in Micro-Manager project by PVS-Studio static code analyzer.
  17. Warning message is:
  18. V601 The 'false' value is implicitly casted to the integer type. Property.cpp 364
  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