Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- WRITE16_HANDLER( deco16_104_prot_w )
- {
- ...
- if (offset != (0x150 >> 1) &&
- offset != (0x0 >> 1) &&
- offset != (0x110 >> 1) &&
- offset != (0x280 >> 1) &&
- offset != (0x290 >> 1) &&
- offset != (0x2b0 >> 1) &&
- offset != (0x370 >> 1) && <<<---
- offset != (0x3c0 >> 1) && <<<===
- offset != (0x370 >> 1) && <<<---
- offset != (0x3c0 >> 1) && <<<===
- offset != (0x430 >> 1) &&
- offset != (0x460 >> 1) &&
- offset != (0x5a0 >> 1) &&
- offset != (0x5b0 >> 1) &&
- offset != (0x6e0 >> 1) &&
- offset != (0x7d0 >> 1)
- )
- ...
- }
- This suspicious code was found in MAME project by PVS-Studio static code analyzer.
- Warning message is:
- V501 There are identical sub-expressions 'offset != (0x370 >> 1)' to the left and to the right of the '&&' operator. decoprot.c 118
- 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