Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class device_disasm_interface : public device_interface
- {
- ...
- public:
- UINT32 min_opcode_bytes() const
- { return disasm_min_opcode_bytes(); }
- UINT32 max_opcode_bytes() const
- { return disasm_max_opcode_bytes(); }
- ...
- }
- class device_debug
- {
- device_disasm_interface *m_disasm;
- ...
- int min_opcode_bytes() const
- {
- return (m_disasm != NULL) ?
- m_disasm->max_opcode_bytes() : 1;
- }
- int max_opcode_bytes() const
- {
- return (m_disasm != NULL) ?
- m_disasm->max_opcode_bytes() : 1;
- }
- }
- This suspicious code was found in MAME project by PVS-Studio static code analyzer.
- Warning message is:
- V524 It is odd that the body of 'max_opcode_bytes' function is fully equivalent to the body of 'min_opcode_bytes' function (debugcpu.h, line 150). debugcpu.h 151
- 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