From cb93774e2289631d23dc7e0b55d0d7162e44471e Mon Sep 17 00:00:00 2001 From: Scott Stone Date: Fri, 23 Apr 2010 23:21:39 +0000 Subject: [PATCH] =?UTF-8?q?Disable=20many=20unused=20variables=20as=20iden?= =?UTF-8?q?tifed=20by=20cppcheck.=20=20[Oliver=20St=C3=B6neberg]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/emu/cheat.c | 4 ++-- src/emu/cpu/i960/i960dis.c | 4 ++-- src/emu/cpu/lr35902/lr35902d.c | 4 ++-- src/emu/cpu/m37710/m7700ds.c | 4 ++-- src/emu/cpu/pic16c5x/16c5xdsm.c | 4 ++-- src/emu/cpu/pic16c62x/16c62xdsm.c | 4 ++-- src/emu/cpu/sharc/sharcdma.c | 10 +++++----- src/emu/cpu/tms32010/32010dsm.c | 4 ++-- src/emu/cpu/tms32025/32025dsm.c | 4 ++-- src/emu/cpu/tms7000/7000dasm.c | 14 +++++++------- src/emu/cpuexec.c | 9 +++++---- src/emu/debug/express.c | 6 ++++-- src/emu/inptport.c | 4 ++-- src/emu/machine/am53cf96.c | 4 ++-- src/emu/machine/mc146818.c | 4 ++-- src/emu/romload.c | 4 ++-- src/emu/sound/cdda.c | 4 ++-- src/emu/sound/okim6376.c | 4 ++-- src/emu/sound/s14001a.c | 4 ++-- src/emu/sound/sp0256.c | 4 ++-- src/emu/sound/ymf271.c | 4 ++-- src/emu/uimenu.c | 4 ++-- src/lib/util/aviio.c | 4 ++-- src/mame/audio/leland.c | 4 ++-- src/mame/audio/turbo.c | 2 ++ src/mame/audio/tx1.c | 6 +++--- src/mame/drivers/hitpoker.c | 2 +- src/mame/drivers/qix.c | 6 +++--- src/mame/machine/stvcd.c | 8 ++++---- src/mame/video/cps1.c | 8 ++------ src/mame/video/konicdev.c | 6 +++--- src/mame/video/model3.c | 9 +++++---- src/mame/video/stvvdp1.c | 4 ++-- src/mame/video/stvvdp2.c | 18 +++++++++--------- src/mame/video/system16.c | 8 ++++---- src/mame/video/taito_f3.c | 4 ++-- src/tools/chdcd.c | 4 ++-- 37 files changed, 103 insertions(+), 101 deletions(-) diff --git a/src/emu/cheat.c b/src/emu/cheat.c index 08cc50f6b8a..e49f78cb04b 100644 --- a/src/emu/cheat.c +++ b/src/emu/cheat.c @@ -622,9 +622,9 @@ void *cheat_get_next_menu_entry(running_machine *machine, void *previous, const } else { - parameter_item *item = NULL, *prev = NULL; + parameter_item *item = NULL/*, *prev = NULL*/; - for (item = cheat->parameter->itemlist; item != NULL; prev = item, item = item->next) + for (item = cheat->parameter->itemlist; item != NULL; /*prev = item, */item = item->next) if (item->value == cheat->parameter->value) break; if (state != NULL) diff --git a/src/emu/cpu/i960/i960dis.c b/src/emu/cpu/i960/i960dis.c index 13e2f91760c..b27b0fdc6ff 100644 --- a/src/emu/cpu/i960/i960dis.c +++ b/src/emu/cpu/i960/i960dis.c @@ -158,7 +158,7 @@ static char *dis_decode_reg(unsigned long iCode, char* tmpStr,unsigned char cnt) static char *i960_disassemble(disassemble_t *diss) { unsigned char op,op2; - unsigned char mode, modeh, model; + unsigned char /*mode,*/ modeh, model; unsigned char dst,abase,reg2; unsigned short opc; unsigned long iCode; @@ -171,7 +171,7 @@ static char *i960_disassemble(disassemble_t *diss) model = (unsigned char) (iCode >> 10) &0x3; modeh = (unsigned char) (iCode >> 12) &0x3; - mode = (unsigned char) (iCode >> 10) &0x7; + //mode = (unsigned char) (iCode >> 10) &0x7; dst = (unsigned char) (iCode >> 19) &0x1f; abase = (unsigned char) (iCode>>14)&0x1f; reg2 = (unsigned char) (iCode)&0x1f; diff --git a/src/emu/cpu/lr35902/lr35902d.c b/src/emu/cpu/lr35902/lr35902d.c index 174eb766a7c..aa1bfccd4e8 100644 --- a/src/emu/cpu/lr35902/lr35902d.c +++ b/src/emu/cpu/lr35902/lr35902d.c @@ -205,7 +205,7 @@ static const lr35902dasm mnemonic_main[256]= { CPU_DISASSEMBLE( lr35902 ) { const lr35902dasm *d; - const char *symbol, *src; + const char /* *symbol,*/ *src; char *dst; INT8 offset = 0; UINT8 op, op1; @@ -213,7 +213,7 @@ CPU_DISASSEMBLE( lr35902 ) int pos = 0; dst = buffer; - symbol = NULL; + //symbol = NULL; op = oprom[pos++]; op1 = 0; /* keep GCC happy */ diff --git a/src/emu/cpu/m37710/m7700ds.c b/src/emu/cpu/m37710/m7700ds.c index 2930a38d84c..a76b45ef1c2 100644 --- a/src/emu/cpu/m37710/m7700ds.c +++ b/src/emu/cpu/m37710/m7700ds.c @@ -375,12 +375,12 @@ int m7700_disassemble(char* buff, unsigned int pc, unsigned int pb, const UINT8 signed char varS; int length = 1; unsigned int address; - unsigned int start; + //unsigned int start; UINT32 flags = 0; pb <<= 16; address = pc | pb; - start = address; + //start = address; instruction = read_8(oprom,0); diff --git a/src/emu/cpu/pic16c5x/16c5xdsm.c b/src/emu/cpu/pic16c5x/16c5xdsm.c index 2089b33bf3a..3b2f997f42d 100644 --- a/src/emu/cpu/pic16c5x/16c5xdsm.c +++ b/src/emu/cpu/pic16c5x/16c5xdsm.c @@ -155,7 +155,7 @@ CPU_DISASSEMBLE( pic16c5x ) int cnt = 1; int code; int bit; - char *buffertmp; + //char *buffertmp; const char *cp; /* character pointer in OpFormats */ UINT32 flags = 0; @@ -184,7 +184,7 @@ CPU_DISASSEMBLE( pic16c5x ) sprintf(buffer,"???? dw %04Xh",code); return cnt; } - buffertmp = buffer; + //buffertmp = buffer; if (Op[op].extcode) /* Actually, theres no double length opcodes */ { bit = 27; diff --git a/src/emu/cpu/pic16c62x/16c62xdsm.c b/src/emu/cpu/pic16c62x/16c62xdsm.c index c0f6ff71b8c..4a5ec7c002e 100644 --- a/src/emu/cpu/pic16c62x/16c62xdsm.c +++ b/src/emu/cpu/pic16c62x/16c62xdsm.c @@ -166,7 +166,7 @@ CPU_DISASSEMBLE( pic16c62x ) int cnt = 1; int code; int bit; - char *buffertmp; + //char *buffertmp; const char *cp; /* character pointer in OpFormats */ UINT32 flags = 0; @@ -195,7 +195,7 @@ CPU_DISASSEMBLE( pic16c62x ) sprintf(buffer,"???? dw %04Xh",code); return cnt; } - buffertmp = buffer; + //buffertmp = buffer; if (Op[op].extcode) /* Actually, theres no double length opcodes */ { bit = 29; diff --git a/src/emu/cpu/sharc/sharcdma.c b/src/emu/cpu/sharc/sharcdma.c index d2571b4143f..740f68bda14 100644 --- a/src/emu/cpu/sharc/sharcdma.c +++ b/src/emu/cpu/sharc/sharcdma.c @@ -141,18 +141,18 @@ static void sharc_dma_exec(SHARC_REGS *cpustate, int channel) UINT32 src, dst; UINT32 src_count, dst_count; UINT32 src_modifier, dst_modifier; - int chen, tran, dtype, pmode, mswf, master, ishake, intio, ext, flsh; + int chen, tran, dtype, pmode, /*mswf, master,*/ ishake, intio/*, ext, flsh*/; chen = (cpustate->dma[channel].control >> 1) & 0x1; tran = (cpustate->dma[channel].control >> 2) & 0x1; dtype = (cpustate->dma[channel].control >> 5) & 0x1; pmode = (cpustate->dma[channel].control >> 6) & 0x3; - mswf = (cpustate->dma[channel].control >> 8) & 0x1; - master = (cpustate->dma[channel].control >> 9) & 0x1; + //mswf = (cpustate->dma[channel].control >> 8) & 0x1; + //master = (cpustate->dma[channel].control >> 9) & 0x1; ishake = (cpustate->dma[channel].control >> 10) & 0x1; intio = (cpustate->dma[channel].control >> 11) & 0x1; - ext = (cpustate->dma[channel].control >> 12) & 0x1; - flsh = (cpustate->dma[channel].control >> 13) & 0x1; + //ext = (cpustate->dma[channel].control >> 12) & 0x1; + //flsh = (cpustate->dma[channel].control >> 13) & 0x1; if (ishake) fatalerror("SHARC: dma_exec: handshake not supported"); diff --git a/src/emu/cpu/tms32010/32010dsm.c b/src/emu/cpu/tms32010/32010dsm.c index eec28572f96..5aea3812eaf 100644 --- a/src/emu/cpu/tms32010/32010dsm.c +++ b/src/emu/cpu/tms32010/32010dsm.c @@ -231,7 +231,7 @@ CPU_DISASSEMBLE( tms32010 ) int cnt = 1; int code; int bit; - char *buffertmp; + //char *buffertmp; const char *cp; /* character pointer in OpFormats */ if (!OpInizialized) InitDasm32010(); @@ -255,7 +255,7 @@ CPU_DISASSEMBLE( tms32010 ) sprintf(buffer, "dw %04Xh *(invalid op)", code); return cnt | DASMFLAG_SUPPORTED; } - buffertmp = buffer; + //buffertmp = buffer; if (Op[op].extcode) { bit = 31; diff --git a/src/emu/cpu/tms32025/32025dsm.c b/src/emu/cpu/tms32025/32025dsm.c index 5d8bf4f195d..9388bf0a9d9 100644 --- a/src/emu/cpu/tms32025/32025dsm.c +++ b/src/emu/cpu/tms32025/32025dsm.c @@ -394,7 +394,7 @@ CPU_DISASSEMBLE( tms32025 ) int cnt = 1; int code; int bit; - char *buffertmp; + //char *buffertmp; const char *cp; /* character pointer in OpFormats */ if (!OpInizialized) InitDasm32025(); @@ -418,7 +418,7 @@ CPU_DISASSEMBLE( tms32025 ) sprintf(buffer,"???? dw %04Xh",code); return cnt | DASMFLAG_SUPPORTED; } - buffertmp = buffer; + //buffertmp = buffer; if (Op[op].extcode) { bit = 31; diff --git a/src/emu/cpu/tms7000/7000dasm.c b/src/emu/cpu/tms7000/7000dasm.c index 9dafd7faa5e..8ab0b0d94f6 100644 --- a/src/emu/cpu/tms7000/7000dasm.c +++ b/src/emu/cpu/tms7000/7000dasm.c @@ -361,7 +361,7 @@ static const opcodeinfo opcodes[] = { CPU_DISASSEMBLE( tms7000 ) { - int opcode, i, size = 1; + int opcode, i/*, size = 1*/; int pos = 0; char tmpbuf[32]; @@ -395,32 +395,32 @@ CPU_DISASSEMBLE( tms7000 ) case UI8: a = (UINT8)opram[pos++]; buffer += sprintf(buffer, of[j].opstr[k], (unsigned int)a); - size += 1; + //size += 1; break; case I8: b = (INT8)opram[pos++]; buffer += sprintf (buffer, of[j].opstr[k], (INT8)b); - size += 1; + //size += 1; break; case UI16: c = (UINT16)opram[pos++]; c <<= 8; c += opram[pos++]; buffer += sprintf (buffer, of[j].opstr[k], (unsigned int)c); - size += 2; + //size += 2; break; case I16: d = (INT16)opram[pos++]; d <<= 8; d += opram[pos++]; buffer += sprintf (buffer, of[j].opstr[k], (signed int)d); - size += 2; + //size += 2; break; case PCREL: b = (INT8)opram[pos++]; sprintf(tmpbuf, "$%04X", pc+2+k+b); buffer += sprintf (buffer, of[j].opstr[k], tmpbuf); - size += 1; + //size += 1; break; case PCABS: c = (UINT16)opram[pos++]; @@ -428,7 +428,7 @@ CPU_DISASSEMBLE( tms7000 ) c += opram[pos++]; sprintf(tmpbuf, "$%04X", c); buffer += sprintf (buffer, of[j].opstr[k], tmpbuf); - size += 2; + //size += 2; break; case TRAP: vector = 0xffff - ((0xff - opcode) * 2); diff --git a/src/emu/cpuexec.c b/src/emu/cpuexec.c index 5c33641006f..82f73d49888 100644 --- a/src/emu/cpuexec.c +++ b/src/emu/cpuexec.c @@ -1913,7 +1913,7 @@ static void get_register_string_value(running_device *device, void *baseptr, con #ifdef UNUSED_FUNCTION static int get_register_string_max_width(running_device *device, void *baseptr, const cpu_state_entry *entry) { - int leadzero = 0, width = 0, percent = 0, explicitsign = 0, reset; + int /*leadzero = 0,*/ width = 0, percent = 0, explicitsign = 0, reset; int totalwidth = 0; const char *fptr; @@ -1927,7 +1927,7 @@ static int get_register_string_max_width(running_device *device, void *baseptr, { /* reset any accumulated state */ if (reset) - leadzero = width = percent = explicitsign = reset = 0; + /*leadzero =*/ width = percent = explicitsign = reset = 0; /* if we're not within a format, then anything other than a % outputs directly */ if (!percent && *fptr != '%') @@ -1952,8 +1952,9 @@ static int get_register_string_max_width(running_device *device, void *baseptr, /* 0 means insert leading 0s, unless it follows another width digit */ case '0': - if (width == 0) - leadzero = TRUE; + if (width == 0) { + //leadzero = TRUE; + } else width *= 10; break; diff --git a/src/emu/debug/express.c b/src/emu/debug/express.c index 6fab6e7de8f..a539713c926 100644 --- a/src/emu/debug/express.c +++ b/src/emu/debug/express.c @@ -1976,11 +1976,12 @@ int symtable_add(symbol_table *table, const char *name, const symbol_entry *entr char *newstring; UINT32 hash_index; int strindex; - int all_digits, i; + //int all_digits, i; // assert_always(entry->table == table, "Mismatched symbol tables"); /* we cannot add numeric symbols */ + /* all_digits = TRUE; for (i = 0; name[i]; i++) { @@ -1990,7 +1991,8 @@ int symtable_add(symbol_table *table, const char *name, const symbol_entry *entr break; } } -// assert_always(!all_digits, "All-digit symbols are not allowed"); + assert_always(!all_digits, "All-digit symbols are not allowed"); + */ /* see if we already have an entry and just overwrite it if we do */ oldentry = (symbol_entry *)symtable_find(table, name); diff --git a/src/emu/inptport.c b/src/emu/inptport.c index 8c8a4650e49..b244ab53a43 100644 --- a/src/emu/inptport.c +++ b/src/emu/inptport.c @@ -973,13 +973,13 @@ static WRITE_LINE_DEVICE_HANDLER( changed_write_line_device ) time_t input_port_init(running_machine *machine, const input_port_token *tokens) { - input_port_private *portdata; + //input_port_private *portdata; char errorbuf[1024]; time_t basetime; /* allocate memory for our data structure */ machine->input_port_data = auto_alloc_clear(machine, input_port_private); - portdata = machine->input_port_data; + //portdata = machine->input_port_data; /* add an exit callback and a frame callback */ add_exit_callback(machine, input_port_exit); diff --git a/src/emu/machine/am53cf96.c b/src/emu/machine/am53cf96.c index 3fe4aff5c83..ed9d1001c99 100644 --- a/src/emu/machine/am53cf96.c +++ b/src/emu/machine/am53cf96.c @@ -92,7 +92,7 @@ static TIMER_CALLBACK( am53cf96_irq ) WRITE32_HANDLER( am53cf96_w ) { - int reg, val, dma; + int reg, val/*, dma*/; reg = offset * 2; val = data; @@ -133,7 +133,7 @@ WRITE32_HANDLER( am53cf96_w ) // command if (reg == REG_COMMAND) { - dma = (val & 0x80) ? 1 : 0; + //dma = (val & 0x80) ? 1 : 0; fptr = 0; switch (val & 0x7f) { diff --git a/src/emu/machine/mc146818.c b/src/emu/machine/mc146818.c index 7aba725f4d3..c2e9761027e 100644 --- a/src/emu/machine/mc146818.c +++ b/src/emu/machine/mc146818.c @@ -113,7 +113,7 @@ static void mc146818_set_base_datetime(running_machine *machine); static TIMER_CALLBACK( mc146818_timer ) { - int year, month; + int year/*, month*/; if (BCD_MODE) { @@ -132,7 +132,7 @@ static TIMER_CALLBACK( mc146818_timer ) mc146818->data[4]=0; WEEK_DAY=bcd_adjust(WEEK_DAY+1)%7; DAY=bcd_adjust(DAY+1); - month=bcd_2_dec(MONTH); + //month=bcd_2_dec(MONTH); year=bcd_2_dec(YEAR); if (mc146818->type!=MC146818_IGNORE_CENTURY) year+=bcd_2_dec(CENTURY)*100; else year+=2000; // save for julian_days_in_month calculation diff --git a/src/emu/romload.c b/src/emu/romload.c index 1ac4e070704..9f572687acc 100644 --- a/src/emu/romload.c +++ b/src/emu/romload.c @@ -944,7 +944,7 @@ static void process_rom_entries(rom_load_data *romdata, const char *regiontag, c do { rom_entry modified_romp = *romp++; - int readresult; + //int readresult; /* handle flag inheritance */ if (!ROM_INHERITSFLAGS(&modified_romp)) @@ -956,7 +956,7 @@ static void process_rom_entries(rom_load_data *romdata, const char *regiontag, c /* attempt to read using the modified entry */ if (!ROMENTRY_ISIGNORE(&modified_romp) && !irrelevantbios) - readresult = read_rom_data(romdata, &modified_romp); + /*readresult = */read_rom_data(romdata, &modified_romp); } while (ROMENTRY_ISCONTINUE(romp) || ROMENTRY_ISIGNORE(romp)); diff --git a/src/emu/sound/cdda.c b/src/emu/sound/cdda.c index 2d336c5eb32..533a9b130af 100644 --- a/src/emu/sound/cdda.c +++ b/src/emu/sound/cdda.c @@ -53,13 +53,13 @@ static STREAM_UPDATE( cdda_update ) static DEVICE_START( cdda ) { - const struct CDDAinterface *intf; + //const struct CDDAinterface *intf; cdda_info *info = get_safe_token(device); /* allocate an audio cache */ info->audio_cache = auto_alloc_array( device->machine, UINT8, CD_MAX_SECTOR_DATA * MAX_SECTORS ); - intf = (const struct CDDAinterface *)device->baseconfig().static_config; + //intf = (const struct CDDAinterface *)device->baseconfig().static_config; info->stream = stream_create(device, 0, 2, 44100, info, cdda_update); diff --git a/src/emu/sound/okim6376.c b/src/emu/sound/okim6376.c index 77a5ddef190..67495e6729d 100644 --- a/src/emu/sound/okim6376.c +++ b/src/emu/sound/okim6376.c @@ -386,7 +386,7 @@ WRITE8_DEVICE_HANDLER( okim6376_w ) if (info->command != -1) { int temp = data >> 4, i, start; - unsigned char *base, *base_end; + unsigned char *base/*, *base_end*/; /* FIX: Check if it's possible to start multiple voices at the same time */ @@ -405,7 +405,7 @@ WRITE8_DEVICE_HANDLER( okim6376_w ) /* determine the start position, max address space is 16Mbit */ base = &info->region_base[info->command * 4]; - base_end = &info->region_base[(MAX_WORDS+1) * 4]; + //base_end = &info->region_base[(MAX_WORDS+1) * 4]; start = ((base[0] << 16) + (base[1] << 8) + base[2]) & 0x1fffff; if (start == 0) diff --git a/src/emu/sound/s14001a.c b/src/emu/sound/s14001a.c index c0b852589c4..eb3166e6f32 100644 --- a/src/emu/sound/s14001a.c +++ b/src/emu/sound/s14001a.c @@ -552,13 +552,13 @@ static void s14001a_clock(S14001AChip *chip) /* called once per clock */ static STREAM_UPDATE( s14001a_pcm_update ) { INT32 mix[48000]; - INT32 *mixp; + //INT32 *mixp; S14001AChip *chip = (S14001AChip *)param; int i; memset(mix, 0, sizeof(mix)); - mixp = &mix[0]; + //mixp = &mix[0]; for (i = 0; i < samples; i++) { s14001a_clock(chip); diff --git a/src/emu/sound/sp0256.c b/src/emu/sound/sp0256.c index d592dcb1f5b..d132239303b 100644 --- a/src/emu/sound/sp0256.c +++ b/src/emu/sound/sp0256.c @@ -1106,7 +1106,7 @@ static STREAM_UPDATE( sp0256_update ) sp0256_state *sp = (sp0256_state *)param; stream_sample_t *output = outputs[0]; int output_index = 0; - int length, did_samp, old_idx; + int length, did_samp/*, old_idx*/; while( output_index < samples ) { @@ -1137,7 +1137,7 @@ static STREAM_UPDATE( sp0256_update ) /* repeat count holds up and we have room in our scratch buffer. */ /* ---------------------------------------------------------------- */ did_samp = 0; - old_idx = sp->sc_head; + //old_idx = sp->sc_head; if (length > 0) do { int do_samp; diff --git a/src/emu/sound/ymf271.c b/src/emu/sound/ymf271.c index aea5a0fbb4a..37f2bbfbda6 100644 --- a/src/emu/sound/ymf271.c +++ b/src/emu/sound/ymf271.c @@ -1225,11 +1225,11 @@ static void ymf271_write_fm(YMF271Chip *chip, int grp, int adr, int data) int slotnum; int slot_group; int sync_mode, sync_reg; - YMF271Slot *slot; + //YMF271Slot *slot; slotnum = 12*grp; slotnum += fm_tab[adr & 0xf]; - slot = &chip->slots[slotnum]; + //slot = &chip->slots[slotnum]; slot_group = fm_tab[adr & 0xf]; reg = (adr >> 4) & 0xf; diff --git a/src/emu/uimenu.c b/src/emu/uimenu.c index 517b6c02f0b..f0160a20bce 100644 --- a/src/emu/uimenu.c +++ b/src/emu/uimenu.c @@ -3123,7 +3123,7 @@ static void menu_crosshair(running_machine *machine, ui_menu *menu, void *parame crosshair_user_settings settings; crosshair_item_data *data = (crosshair_item_data *)event->itemref; int changed = FALSE; - int set_def = FALSE; + //int set_def = FALSE; int newval = data->cur; /* retreive the user settings */ @@ -3134,7 +3134,7 @@ static void menu_crosshair(running_machine *machine, ui_menu *menu, void *parame /* if selected, reset to default value */ case IPT_UI_SELECT: newval = data->defvalue; - set_def = TRUE; + //set_def = TRUE; break; /* left decrements */ diff --git a/src/lib/util/aviio.c b/src/lib/util/aviio.c index 17e63011737..888aabce480 100644 --- a/src/lib/util/aviio.c +++ b/src/lib/util/aviio.c @@ -1349,7 +1349,7 @@ error: static avi_error extract_movie_info(avi_file *file) { - avi_stream *audiostream; + //avi_stream *audiostream; avi_stream *stream; /* get the video stream */ @@ -1380,7 +1380,7 @@ static avi_error extract_movie_info(avi_file *file) } /* now make sure all other audio streams are valid */ - audiostream = stream; + //audiostream = stream; while (1) { /* get the stream info */ diff --git a/src/mame/audio/leland.c b/src/mame/audio/leland.c index 42ff3b96f3f..c75b31ba2bf 100644 --- a/src/mame/audio/leland.c +++ b/src/mame/audio/leland.c @@ -1560,7 +1560,7 @@ INLINE void counter_update_count(int which) static READ16_HANDLER( pit8254_r ) { - struct counter_state *ctr; + //struct counter_state *ctr; int which = offset / 0x40; int reg = offset & 3; @@ -1572,7 +1572,7 @@ static READ16_HANDLER( pit8254_r ) case 2: /* warning: assumes LSB/MSB addressing and no latching! */ which = (which * 3) + reg; - ctr = &counter[which]; + //ctr = &counter[which]; /* update the count */ counter_update_count(which); diff --git a/src/mame/audio/turbo.c b/src/mame/audio/turbo.c index 1d83b090223..50115650659 100644 --- a/src/mame/audio/turbo.c +++ b/src/mame/audio/turbo.c @@ -72,7 +72,9 @@ if (!((data >> 4) & 1)) mame_printf_debug("/TRIG4\n"); WRITE8_DEVICE_HANDLER( turbo_sound_a_w ) { +#if (!DISCRETE_TEST) running_device *samples = devtag_get_device(device->machine, "samples"); +#endif turbo_state *state = (turbo_state *)device->machine->driver_data; UINT8 diff = data ^ state->sound_state[0]; state->sound_state[0] = data; diff --git a/src/mame/audio/tx1.c b/src/mame/audio/tx1.c index 10a7379c289..9987b7b2a63 100644 --- a/src/mame/audio/tx1.c +++ b/src/mame/audio/tx1.c @@ -214,7 +214,7 @@ INLINE void update_engine (int eng[4]) static STREAM_UPDATE( tx1_stream_update ) { UINT32 step_0, step_1, step_2; - double gain_0, gain_1, gain_2, gain_3; + double /*gain_0, gain_1,*/ gain_2, gain_3; stream_sample_t *fl = &outputs[0][0]; stream_sample_t *fr = &outputs[1][0]; @@ -232,8 +232,8 @@ static STREAM_UPDATE( tx1_stream_update ) step_1 = pit8253.counts[1].val ? (TX1_PIT_CLOCK / pit8253.counts[1].val) * freq_to_step : 0; step_2 = pit8253.counts[2].val ? (TX1_PIT_CLOCK / pit8253.counts[2].val) * freq_to_step : 0; - gain_0 = tx1_engine_gains[ay_outputa & 0xf]; - gain_1 = tx1_engine_gains[ay_outputa >> 4]; + //gain_0 = tx1_engine_gains[ay_outputa & 0xf]; + //gain_1 = tx1_engine_gains[ay_outputa >> 4]; gain_2 = tx1_engine_gains[ay_outputb & 0xf]; gain_3 = BIT(ay_outputb, 5) ? 1.0f : 1.5f; diff --git a/src/mame/drivers/hitpoker.c b/src/mame/drivers/hitpoker.c index 6f49899d8d6..8b024fa9f78 100644 --- a/src/mame/drivers/hitpoker.c +++ b/src/mame/drivers/hitpoker.c @@ -493,9 +493,9 @@ MACHINE_DRIVER_END static DRIVER_INIT(hitpoker) { + #if 1 UINT8 *ROM = memory_region(machine, "maincpu"); - #if 1 ROM[0x1220] = 0x01; //patch eeprom write? ROM[0x1221] = 0x01; ROM[0x1222] = 0x01; diff --git a/src/mame/drivers/qix.c b/src/mame/drivers/qix.c index 2d77139bf76..db74994ba5a 100644 --- a/src/mame/drivers/qix.c +++ b/src/mame/drivers/qix.c @@ -1264,7 +1264,7 @@ static DRIVER_INIT( kram3 ) { const address_space *mainspace = cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM); const address_space *videospace = cputag_get_address_space(machine, "videocpu", ADDRESS_SPACE_PROGRAM); - const UINT8 *patch; + //const UINT8 *patch; UINT8 *rom, *decrypted; int i; @@ -1283,7 +1283,7 @@ static DRIVER_INIT( kram3 ) ********************************/ i = 0; - patch = memory_region(machine, "user1"); + //patch = memory_region(machine, "user1"); rom = memory_region(machine, "maincpu"); decrypted = auto_alloc_array(machine, UINT8, 0x6000); @@ -1296,7 +1296,7 @@ static DRIVER_INIT( kram3 ) } i = 0; - patch = memory_region(machine, "user2"); + //patch = memory_region(machine, "user2"); rom = memory_region(machine, "videocpu"); decrypted = auto_alloc_array(machine, UINT8, 0x6000); diff --git a/src/mame/machine/stvcd.c b/src/mame/machine/stvcd.c index 8badaf4a979..d4a2ae0b909 100644 --- a/src/mame/machine/stvcd.c +++ b/src/mame/machine/stvcd.c @@ -1557,7 +1557,7 @@ void stvcd_exit(running_machine* machine) static void cd_readTOC(void) { - int i, ntrks, toclen, tocptr, fad; + int i, ntrks, /*toclen, */tocptr, fad; xfertype = XFERTYPE_TOC; xfercount = 0; @@ -1571,7 +1571,7 @@ static void cd_readTOC(void) ntrks = 0; } - toclen = (4 * ntrks); // toclen header entry + //toclen = (4 * ntrks); // toclen header entry // data format for Saturn TOC: // no header. @@ -1822,9 +1822,9 @@ static void cd_playdata(void) if (cdrom) { - partitionT *playpart; + //partitionT *playpart; - playpart = cd_read_filtered_sector(cd_curfad); + /*playpart = */cd_read_filtered_sector(cd_curfad); cd_curfad++; fadstoplay--; diff --git a/src/mame/video/cps1.c b/src/mame/video/cps1.c index 34c5cb8fc87..73a3648772e 100644 --- a/src/mame/video/cps1.c +++ b/src/mame/video/cps1.c @@ -1761,7 +1761,7 @@ void cps1_get_video_base( running_machine *machine ) state->stars_enabled[0] = layercontrol & state->game_config->layer_enable_mask[3]; state->stars_enabled[1] = layercontrol & state->game_config->layer_enable_mask[4]; - +#ifdef MAME_DEBUG { int enablemask = 0; @@ -1774,24 +1774,20 @@ void cps1_get_video_base( running_machine *machine ) if (state->game_config->layer_enable_mask[1] == state->game_config->layer_enable_mask[2]) enablemask = state->game_config->layer_enable_mask[1]; -#ifdef MAME_DEBUG if (enablemask) { if (((layercontrol & enablemask) && (layercontrol & enablemask) != enablemask)) popmessage("layer %02x contact MAMEDEV", layercontrol & 0xc03f); } -#endif enablemask = state->game_config->layer_enable_mask[0] | state->game_config->layer_enable_mask[1] | state->game_config->layer_enable_mask[2] | state->game_config->layer_enable_mask[3] | state->game_config->layer_enable_mask[4]; -#ifdef MAME_DEBUG if (((layercontrol & ~enablemask) & 0x003e) != 0) popmessage("layer %02x contact MAMEDEV", layercontrol & 0xc03f); -#endif - } +#endif } diff --git a/src/mame/video/konicdev.c b/src/mame/video/konicdev.c index 73e1accf92f..acd43c0487d 100644 --- a/src/mame/video/konicdev.c +++ b/src/mame/video/konicdev.c @@ -10383,18 +10383,18 @@ WRITE32_DEVICE_HANDLER( k001604_tile_w ) { k001604_state *k001604 = k001604_get_safe_token(device); - int x, y; + int x/*, y*/; COMBINE_DATA(k001604->tile_ram + offset); if (k001604->layer_size) { x = offset & 0xff; - y = offset / 256; + /*y = offset / 256;*/ } else { x = offset & 0x7f; - y = offset / 128; + /*y = offset / 128;*/ } if (k001604->layer_size) diff --git a/src/mame/video/model3.c b/src/mame/video/model3.c index 7ef3f5c8921..3bd417b1891 100644 --- a/src/mame/video/model3.c +++ b/src/mame/video/model3.c @@ -380,6 +380,7 @@ static void copy_screen(bitmap_t *bitmap, const rectangle *cliprect) VIDEO_UPDATE( model3 ) { +/* int layer_scroll_x[4], layer_scroll_y[4]; UINT32 layer_data[4]; @@ -395,7 +396,7 @@ VIDEO_UPDATE( model3 ) layer_scroll_y[2] = (layer_data[2] & 0x8000) ? (layer_data[2] & 0x1ff) : -(layer_data[2] & 0x1ff); layer_scroll_x[3] = (layer_data[3] & 0x8000) ? (layer_data[3] & 0x1ff) : -(layer_data[3] & 0x1ff); layer_scroll_y[3] = (layer_data[3] & 0x8000) ? (layer_data[3] & 0x1ff) : -(layer_data[3] & 0x1ff); - +*/ screen_clip = (rectangle*)cliprect; clip3d.min_x = cliprect->min_x; @@ -1454,7 +1455,7 @@ static void draw_viewport(running_machine *machine, int pri, UINT32 address) { const UINT32 *node = get_memory_pointer(address); UINT32 link_address; - float viewport_left, viewport_right, viewport_top, viewport_bottom; + float /*viewport_left, viewport_right, */viewport_top, viewport_bottom; float /*fov_x,*/ fov_y; link_address = node[1]; @@ -1477,8 +1478,8 @@ static void draw_viewport(running_machine *machine, int pri, UINT32 address) viewport_region_height = ((node[20] >> 16) & 0xffff) >> 2; /* frustum plane angles */ - viewport_left = RADIAN_TO_DEGREE(asin(*(float *)&node[12])); - viewport_right = RADIAN_TO_DEGREE(asin(*(float *)&node[16])); + //viewport_left = RADIAN_TO_DEGREE(asin(*(float *)&node[12])); + //viewport_right = RADIAN_TO_DEGREE(asin(*(float *)&node[16])); viewport_top = RADIAN_TO_DEGREE(asin(*(float *)&node[14])); viewport_bottom = RADIAN_TO_DEGREE(asin(*(float *)&node[18])); diff --git a/src/mame/video/stvvdp1.c b/src/mame/video/stvvdp1.c index 21d161ebb3f..6bb7e934ac6 100644 --- a/src/mame/video/stvvdp1.c +++ b/src/mame/video/stvvdp1.c @@ -1672,7 +1672,7 @@ static void stv_vpd1_draw_scaled_sprite(running_machine *machine, const rectangl static void stv_vpd1_draw_normal_sprite(running_machine *machine, const rectangle *cliprect, int sprite_type) { - UINT16 *destline; + //UINT16 *destline; int y, ysize, drawypos; int x, xsize, drawxpos; @@ -1745,7 +1745,7 @@ static void stv_vpd1_draw_normal_sprite(running_machine *machine, const rectangl maxdrawxpos = MIN(x+xsize-1,cliprect->max_x); for (drawypos = y; drawypos <= maxdrawypos; drawypos++ ) { - destline = stv_framebuffer_draw_lines[drawypos]; + //destline = stv_framebuffer_draw_lines[drawypos]; su = u; for (drawxpos = x; drawxpos <= maxdrawxpos; drawxpos++ ) { diff --git a/src/mame/video/stvvdp2.c b/src/mame/video/stvvdp2.c index 2874ce9136a..2d9b2584814 100644 --- a/src/mame/video/stvvdp2.c +++ b/src/mame/video/stvvdp2.c @@ -2850,8 +2850,8 @@ static void stv_vdp2_draw_basic_bitmap(running_machine *machine, bitmap_t *bitma //popmessage("%04x",STV_VDP2_SCRCTL); int xsize = 0, xsizemask = 0; - int ysize = 0, ysizemask = 0; - int xlinesize = 0, xpixelsize = 0; + int ysize = 0/*, ysizemask = 0*/; + int xlinesize = 0/*, xpixelsize = 0*/; int xcnt,ycnt; UINT8* gfxdata = stv_vdp2_gfx_decode; static UINT16 *destline; @@ -2872,14 +2872,14 @@ static void stv_vdp2_draw_basic_bitmap(running_machine *machine, bitmap_t *bitma case 3: xsize=1024; ysize=512; break; } xsizemask = xsize - 1; - ysizemask = ysize - 1; + /*ysizemask = ysize - 1;*/ switch( stv2_current_tilemap.colour_depth ) { - case 0: xlinesize = xsize / 2; xpixelsize = 0; break; - case 1: xlinesize = xsize; xpixelsize = 1; break; - case 2: case 3: xlinesize = xsize * 2; xpixelsize = 2; break; - case 4: xlinesize = xsize * 4; xpixelsize = 4; break; + case 0: xlinesize = xsize / 2; /*xpixelsize = 0;*/ break; + case 1: xlinesize = xsize; /*xpixelsize = 1;*/ break; + case 2: case 3: xlinesize = xsize * 2; /*xpixelsize = 2;*/ break; + case 4: xlinesize = xsize * 4; /*xpixelsize = 4;*/ break; } if(stv2_current_tilemap.colour_depth == 0) @@ -3360,7 +3360,7 @@ static void stv_vdp2_draw_basic_tilemap(running_machine *machine, bitmap_t *bitm /* Plane Variables */ int pltiles_x, plpixels_x; int pltiles_y, plpixels_y; - int plsize_bytes, plsize_dwords; + int plsize_bytes/*, plsize_dwords*/; /* Map Variables */ int mptiles_x, mppixels_x; @@ -3559,7 +3559,7 @@ static void stv_vdp2_draw_basic_tilemap(running_machine *machine, bitmap_t *bitm stv2_current_tilemap.scrolly &= mppixels_y-1; pgsize_dwords = pgsize_bytes /4; - plsize_dwords = plsize_bytes /4; + //plsize_dwords = plsize_bytes /4; mpsize_dwords = mpsize_bytes /4; // if (stv2_current_tilemap.layer_name==3) popmessage ("well this is a bit %08x", stv2_current_tilemap.map_offset[0]); diff --git a/src/mame/video/system16.c b/src/mame/video/system16.c index 8ab4cb9182f..21ffcae0b1e 100644 --- a/src/mame/video/system16.c +++ b/src/mame/video/system16.c @@ -121,7 +121,7 @@ WRITE16_HANDLER( sys16_paletteram_w ) /* sBGR BBBB GGGG RRRR */ /* x000 4321 4321 4321 */ { - int r, g, b, rs, gs, bs, rh, gh, bh; + int r, g, b, rs, gs, bs/*, rh, gh, bh*/; int r0 = (newword >> 12) & 1; int r1 = (newword >> 0) & 1; int r2 = (newword >> 1) & 1; @@ -149,9 +149,9 @@ WRITE16_HANDLER( sys16_paletteram_w ) bs = combine_6_weights(state->weights[1][2], b0, b1, b2, b3, b4, 0); /* Highlight colors */ - rh = combine_6_weights(state->weights[1][0], r0, r1, r2, r3, r4, 1); - gh = combine_6_weights(state->weights[1][1], g0, g1, g2, g3, g4, 1); - bh = combine_6_weights(state->weights[1][2], b0, b1, b2, b3, b4, 1); + //rh = combine_6_weights(state->weights[1][0], r0, r1, r2, r3, r4, 1); + //gh = combine_6_weights(state->weights[1][1], g0, g1, g2, g3, g4, 1); + //bh = combine_6_weights(state->weights[1][2], b0, b1, b2, b3, b4, 1); palette_set_color(space->machine, offset, MAKE_RGB(r, g, b) ); diff --git a/src/mame/video/taito_f3.c b/src/mame/video/taito_f3.c index e2ccef39795..1c09270500e 100644 --- a/src/mame/video/taito_f3.c +++ b/src/mame/video/taito_f3.c @@ -2922,7 +2922,7 @@ static void get_sprite_info(running_machine *machine, const UINT32 *spriteram32_ const rectangle *visarea = video_screen_get_visible_area(machine->primary_screen); const int min_x=visarea->min_x,max_x=visarea->max_x; const int min_y=visarea->min_y,max_y=visarea->max_y; - int offs,spritecont,flipx,flipy,old_x,color,x,y; + int offs,spritecont,flipx,flipy,/*old_x,*/color,x,y; int sprite,global_x=0,global_y=0,subglobal_x=0,subglobal_y=0; int block_x=0, block_y=0; int last_color=0,last_x=0,last_y=0,block_zoom_x=0,block_zoom_y=0; @@ -2939,7 +2939,7 @@ static void get_sprite_info(running_machine *machine, const UINT32 *spriteram32_ color=0; flipx=flipy=0; - old_x=0; + //old_x=0; y=x=0; sprite_top=0x1000; diff --git a/src/tools/chdcd.c b/src/tools/chdcd.c index 50efee7c59b..cbb19b10070 100644 --- a/src/tools/chdcd.c +++ b/src/tools/chdcd.c @@ -124,7 +124,7 @@ static chd_error chdcd_parse_gdi(const char *tocfname, cdrom_toc *outtoc, chdcd_ { FILE *infile; int i, numtracks; - int chdpos=0; + //int chdpos=0; infile = fopen(tocfname, "rt"); @@ -212,7 +212,7 @@ static chd_error chdcd_parse_gdi(const char *tocfname, cdrom_toc *outtoc, chdcd_ hunks = (outtoc->tracks[trknum].frames+CD_FRAMES_PER_HUNK - 1) / CD_FRAMES_PER_HUNK; outtoc->tracks[trknum].extraframes = hunks * CD_FRAMES_PER_HUNK - outtoc->tracks[trknum].frames; - chdpos+=outtoc->tracks[trknum].frames+outtoc->tracks[trknum].extraframes; + //chdpos+=outtoc->tracks[trknum].frames+outtoc->tracks[trknum].extraframes; } /*