PVS-StudioWarnings

PVS-Studio warning V523 for MAME

Nov 26th, 2014
184
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.78 KB | None | 0 0
  1. static DEVICE_START( deco16ic )
  2. {
  3.   ...
  4.   if (intf->split)
  5.     deco16ic->pf2_tilemap_16x16 =
  6.       tilemap_create_device(device, get_pf2_tile_info,
  7.         deco16_scan_rows, 16, 16, fullwidth ?
  8.           64 : 32, fullheight ? 64 : 32);
  9.   else
  10.     deco16ic->pf2_tilemap_16x16 =
  11.       tilemap_create_device(device, get_pf2_tile_info,
  12.         deco16_scan_rows, 16, 16, fullwidth ?
  13.           64 : 32, fullheight ? 64 : 32);
  14.   ...
  15. }
  16.  
  17. This suspicious code was found in MAME project by PVS-Studio static code analyzer.
  18. Warning message is:
  19. V523 The 'then' statement is equivalent to the 'else' statement.  deco16ic.c 943
  20.  
  21. 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