mirror of
https://github.com/holub/mame
synced 2025-05-22 21:58:57 +03:00
fixed some "comparison is always true/false" warnings reported by clang by Firewave
in timer.c I have commented not removed lines that are always false
This commit is contained in:
parent
32dc4f4d53
commit
932910a75e
@ -753,7 +753,7 @@ static UINT32 opINW(v60_state *cpustate)
|
||||
static UINT32 opLDPR(v60_state *cpustate)
|
||||
{
|
||||
F12DecodeOperands(cpustate, ReadAMAddress, 2,ReadAM, 2);
|
||||
if (cpustate->op2 >= 0 && cpustate->op2 <= 28)
|
||||
if (cpustate->op2 <= 28)
|
||||
{
|
||||
if (cpustate->flag1 &&(!(OpRead8(cpustate, cpustate->PC + 1)&0x80 && OpRead8(cpustate, cpustate->PC + 2) == 0xf4 ) ))
|
||||
cpustate->reg[cpustate->op2 + 36] = cpustate->reg[cpustate->op1];
|
||||
@ -2096,7 +2096,7 @@ static UINT32 opSHLW(v60_state *cpustate) /* TRUSTED */
|
||||
static UINT32 opSTPR(v60_state *cpustate)
|
||||
{
|
||||
F12DecodeFirstOperand(cpustate, ReadAM, 2);
|
||||
if (cpustate->op1 >= 0 && cpustate->op1 <= 28)
|
||||
if (cpustate->op1 <= 28)
|
||||
cpustate->modwritevalw = cpustate->reg[cpustate->op1 + 36];
|
||||
else
|
||||
{
|
||||
|
@ -1746,7 +1746,7 @@ READ32_DEVICE_HANDLER( ide_controller32_pcmcia_r )
|
||||
offset *= 4;
|
||||
size = convert_to_offset_and_size32(&offset, mem_mask);
|
||||
|
||||
if (offset >= 0x000 && offset < 0x008)
|
||||
if (offset < 0x008)
|
||||
res = ide_controller_read(device, 0, offset & 7, size);
|
||||
if (offset >= 0x008 && offset < 0x010)
|
||||
res = ide_controller_read(device, 1, offset & 7, size);
|
||||
@ -1763,7 +1763,7 @@ WRITE32_DEVICE_HANDLER( ide_controller32_pcmcia_w )
|
||||
size = convert_to_offset_and_size32(&offset, mem_mask);
|
||||
data = data >> ((offset & 3) * 8);
|
||||
|
||||
if (offset >= 0x000 && offset < 0x008)
|
||||
if (offset < 0x008)
|
||||
ide_controller_write(device, 0, offset & 7, size, data);
|
||||
if (offset >= 0x008 && offset < 0x010)
|
||||
ide_controller_write(device, 1, offset & 7, size, data);
|
||||
|
@ -199,10 +199,10 @@ void timer_device::device_validity_check(validity_checker &valid) const
|
||||
mame_printf_warning("Scanline timer specified parameters for a periodic timer\n");
|
||||
if (m_param != 0)
|
||||
mame_printf_warning("Scanline timer specified parameter which is ignored\n");
|
||||
if (m_first_vpos < 0)
|
||||
mame_printf_error("Scanline timer specified invalid initial position\n");
|
||||
if (m_increment < 0)
|
||||
mame_printf_error("Scanline timer specified invalid increment\n");
|
||||
// if (m_first_vpos < 0)
|
||||
// mame_printf_error("Scanline timer specified invalid initial position\n");
|
||||
// if (m_increment < 0)
|
||||
// mame_printf_error("Scanline timer specified invalid increment\n");
|
||||
break;
|
||||
|
||||
default:
|
||||
|
@ -855,7 +855,7 @@ WRITE32_HANDLER(archimedes_vidc_w)
|
||||
// 0x00 - 0x3c Video Palette Logical Colors (16 colors)
|
||||
// 0x40 Border Color
|
||||
// 0x44 - 0x4c Cursor Palette Logical Colors
|
||||
if (reg >= 0x00 && reg <= 0x4c)
|
||||
if (reg <= 0x4c)
|
||||
{
|
||||
int r,g,b;
|
||||
|
||||
|
@ -436,7 +436,7 @@ UINT16 vdp_get_word_from_68k_mem_default(running_machine &machine, UINT32 source
|
||||
|
||||
//printf("vdp_get_word_from_68k_mem_default %08x\n", source);
|
||||
|
||||
if (( source >= 0x000000 ) && ( source <= 0x3fffff ))
|
||||
if ( source <= 0x3fffff )
|
||||
{
|
||||
if (_svp_cpu != NULL)
|
||||
{
|
||||
|
@ -310,7 +310,7 @@ int osd_work_queue_wait(osd_work_queue *queue, osd_ticks_t timeout)
|
||||
void osd_work_queue_free(osd_work_queue *queue)
|
||||
{
|
||||
// if we have threads, clean them up
|
||||
if (queue->threads >= 0 && queue->thread != NULL)
|
||||
if (queue->thread != NULL)
|
||||
{
|
||||
int threadnum;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user