PVS-StudioWarnings

PVS-Studio warning V536 for Micro-Manager

Nov 17th, 2014
181
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.75 KB | None | 0 0
  1. int LeicaDMSTCHub::StopXY(MM::Device& device, MM::Core& core)
  2. {
  3.   int ret = SetCommand(device, core, xyStage_, 010);
  4.  
  5.   if (ret != DEVICE_OK)
  6.     return ret;
  7.   return DEVICE_OK;
  8. }
  9.  
  10. I have considerable reasons to suspect that there should be the decimal number 10 instead of octal number 010. Elsewhere: int ret = SetCommand(device, core, xyStage_, 35, ack);
  11.  
  12. This suspicious code was found in Micro-Manager project by PVS-Studio static code analyzer.
  13. Warning message is:
  14. V536 Be advised that the utilized constant value is represented by an octal form. Oct: 010, Dec: 8. LeicaDMSTCHub.cpp 142
  15.  
  16. 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