Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const unsigned char stopSgn[2] = {0x04, 0x66};
- int MotorStage::Stop()
- {
- ....
- if (memcmp(stopSgn, answer, sizeof(stopSgn) != 0))
- return ERR_UNRECOGNIZED_ANSWER;
- ....
- }
- This suspicious code was found in Micro-Manager project by PVS-Studio static code analyzer.
- Warning message is:
- V526 The 'memcmp' function returns 0 if corresponding buffers are equal. Consider examining the condition for mistakes. MotorStage.cpp 385
- 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