Previous 15994 Revisions Next

r15239 Sunday 20th May, 2012 at 08:36:20 UTC by Firewave
fixed some "comparison is always true/false" warnings reported by clang
[src/emu]timer.c
[src/emu/cpu/v60]op12.c
[src/emu/machine]idectrl.c
[src/mame/machine]archimds.c megavdp.c
[src/mess/drivers]pc1512.c
[src/mess/machine]coco.c
[src/osd/sdl]sdlwork.c

src/mame/machine/megavdp.c
r15238r15239
436436
437437   //printf("vdp_get_word_from_68k_mem_default %08x\n", source);
438438
439   if (( source >= 0x000000 ) && ( source <= 0x3fffff ))
439   if ( source <= 0x3fffff )
440440   {
441441      if (_svp_cpu != NULL)
442442      {
src/mame/machine/archimds.c
r15238r15239
855855   // 0x00 - 0x3c Video Palette Logical Colors (16 colors)
856856   // 0x40 Border Color
857857   // 0x44 - 0x4c Cursor Palette Logical Colors
858   if (reg >= 0x00 && reg <= 0x4c)
858   if (reg <= 0x4c)
859859   {
860860      int r,g,b;
861861
src/osd/sdl/sdlwork.c
r15238r15239
310310void osd_work_queue_free(osd_work_queue *queue)
311311{
312312   // if we have threads, clean them up
313   if (queue->threads >= 0 && queue->thread != NULL)
313   if (queue->thread != NULL)
314314   {
315315      int threadnum;
316316
src/emu/cpu/v60/op12.c
r15238r15239
753753static UINT32 opLDPR(v60_state *cpustate)
754754{
755755   F12DecodeOperands(cpustate, ReadAMAddress, 2,ReadAM, 2);
756   if (cpustate->op2 >= 0 && cpustate->op2 <= 28)
756   if (cpustate->op2 <= 28)
757757   {
758758     if (cpustate->flag1 &&(!(OpRead8(cpustate, cpustate->PC + 1)&0x80 && OpRead8(cpustate, cpustate->PC + 2) == 0xf4 ) ))
759759         cpustate->reg[cpustate->op2 + 36] = cpustate->reg[cpustate->op1];
r15238r15239
20962096static UINT32 opSTPR(v60_state *cpustate)
20972097{
20982098   F12DecodeFirstOperand(cpustate, ReadAM, 2);
2099   if (cpustate->op1 >= 0 && cpustate->op1 <= 28)
2099   if (cpustate->op1 <= 28)
21002100      cpustate->modwritevalw = cpustate->reg[cpustate->op1 + 36];
21012101   else
21022102   {
src/emu/machine/idectrl.c
r15238r15239
17461746   offset *= 4;
17471747   size = convert_to_offset_and_size32(&offset, mem_mask);
17481748
1749   if (offset >= 0x000 && offset < 0x008)
1749   if (offset < 0x008)
17501750      res = ide_controller_read(device, 0, offset & 7, size);
17511751   if (offset >= 0x008 && offset < 0x010)
17521752      res = ide_controller_read(device, 1, offset & 7, size);
r15238r15239
17631763   size = convert_to_offset_and_size32(&offset, mem_mask);
17641764   data = data >> ((offset & 3) * 8);
17651765
1766   if (offset >= 0x000 && offset < 0x008)
1766   if (offset < 0x008)
17671767      ide_controller_write(device, 0, offset & 7, size, data);
17681768   if (offset >= 0x008 && offset < 0x010)
17691769      ide_controller_write(device, 1, offset & 7, size, data);
src/emu/timer.c
r15238r15239
199199            mame_printf_warning("Scanline timer specified parameters for a periodic timer\n");
200200         if (m_param != 0)
201201            mame_printf_warning("Scanline timer specified parameter which is ignored\n");
202         if (m_first_vpos < 0)
203            mame_printf_error("Scanline timer specified invalid initial position\n");
204         if (m_increment < 0)
205            mame_printf_error("Scanline timer specified invalid increment\n");
206202         break;
207203
208204      default:
src/mess/machine/coco.c
r15238r15239
14281428   if ((oprom[0] == 0x10) && (oprom[1] == 0x3F))
14291429   {
14301430      call = oprom[2];
1431      if ((call >= 0) && (call < ARRAY_LENGTH(os9syscalls)) && os9syscalls[call])
1431      if ((call < ARRAY_LENGTH(os9syscalls)) && os9syscalls[call])
14321432      {
14331433         sprintf(buffer, "OS9   %s", os9syscalls[call]);
14341434         result = 3;
src/mess/drivers/pc1512.c
r15238r15239
550550   offs_t addr = offset & 0x3ff;
551551   bool decoded = false;
552552
553   if      (addr >= 0x000 && addr <= 0x00f) { data = i8237_r(m_dmac, offset & 0x0f); decoded = true; }
553   if      (               addr <= 0x00f) { data = i8237_r(m_dmac, offset & 0x0f); decoded = true; }
554554   else if (addr >= 0x020 && addr <= 0x021) { data = pic8259_r(m_pic, offset & 0x01); decoded = true; }
555555   else if (addr >= 0x040 && addr <= 0x043) { data = pit8253_r(m_pit, offset & 0x03); decoded = true; }
556556   else if (addr >= 0x060 && addr <= 0x06f) { data = system_r(space, offset & 0x0f); decoded = true; }

Previous 15994 Revisions Next


© 1998-2018 The MESS Team