From a546ea128238feaa616451ed7b7f4fe389dd1460 Mon Sep 17 00:00:00 2001 From: Miodrag Milanovic Date: Sat, 26 Dec 2015 10:27:03 +0100 Subject: [PATCH] cleanup (nw) --- src/devices/bus/isa/trident.cpp | 2 +- src/devices/cpu/8x300/8x300.cpp | 2 +- src/devices/cpu/adsp2100/adsp2100.cpp | 2 +- src/devices/cpu/arm7/arm7ops.cpp | 2 +- src/devices/cpu/hd61700/hd61700.cpp | 2 +- src/devices/cpu/i386/i386.cpp | 2 +- src/devices/cpu/i386/i386priv.h | 2 +- src/devices/cpu/i8085/i8085.cpp | 2 +- src/devices/cpu/i8089/i8089.cpp | 2 +- src/devices/cpu/lc8670/lc8670.cpp | 2 +- src/devices/cpu/mb86233/mb86233.cpp | 2 +- src/devices/cpu/melps4/melps4.cpp | 2 +- src/devices/cpu/rsp/rspcp2d.cpp | 4 ++-- src/devices/cpu/scmp/scmp.cpp | 4 ++-- src/devices/cpu/ssp1601/ssp1601.cpp | 2 +- src/devices/cpu/superfx/superfx.cpp | 6 +++--- src/devices/cpu/tms32082/mp_ops.cpp | 14 +++++++------- src/devices/machine/53c810.cpp | 2 +- src/devices/machine/68230pit.cpp | 2 +- src/devices/machine/68307.cpp | 2 +- src/devices/machine/adc1213x.cpp | 2 +- src/devices/machine/akiko.cpp | 2 +- src/devices/machine/ds1315.cpp | 2 +- src/devices/machine/gayle.cpp | 2 +- src/devices/machine/hdc92x4.cpp | 4 ++-- src/devices/machine/i8255.cpp | 6 +++--- src/devices/machine/idehd.cpp | 6 +++--- src/devices/machine/ldvp931.cpp | 2 +- src/devices/machine/mc68681.cpp | 2 +- src/devices/machine/mos6526.cpp | 2 +- src/devices/machine/mos6530.cpp | 2 +- src/devices/machine/mos6530n.cpp | 2 +- src/devices/machine/ncr5380.cpp | 2 +- src/devices/machine/ncr5380n.cpp | 2 +- src/devices/machine/pckeybrd.cpp | 2 +- src/devices/machine/smc91c9x.cpp | 2 +- src/devices/machine/steppers.cpp | 2 +- src/devices/machine/wd2010.cpp | 6 +++--- src/devices/machine/z80dma.cpp | 2 +- src/devices/machine/z80scc.cpp | 4 ++-- src/devices/machine/z8536.cpp | 4 ++-- src/devices/sound/aica.cpp | 6 +++--- src/devices/sound/aicadsp.cpp | 6 +++--- src/devices/sound/k007232.cpp | 2 +- src/devices/sound/mos6581.cpp | 2 +- src/devices/sound/qsound.cpp | 2 +- src/devices/sound/scsp.cpp | 6 +++--- src/devices/sound/scspdsp.cpp | 8 ++++---- src/devices/sound/segapcm.cpp | 2 +- src/devices/sound/sn76496.cpp | 2 +- src/devices/sound/tiasound.cpp | 2 +- src/devices/sound/vrender0.cpp | 2 +- src/devices/sound/ymf278b.cpp | 4 ++-- src/devices/video/ef9340_1.cpp | 2 +- src/devices/video/hd44780.cpp | 2 +- src/devices/video/hd61830.cpp | 2 +- src/devices/video/i8244.cpp | 2 +- src/devices/video/i82730.cpp | 2 +- src/devices/video/i8275.cpp | 4 ++-- src/devices/video/mc6847.h | 2 +- src/devices/video/tms3556.cpp | 4 ++-- 61 files changed, 92 insertions(+), 92 deletions(-) diff --git a/src/devices/bus/isa/trident.cpp b/src/devices/bus/isa/trident.cpp index 03f646139be..4f47bdd7212 100644 --- a/src/devices/bus/isa/trident.cpp +++ b/src/devices/bus/isa/trident.cpp @@ -195,7 +195,7 @@ void trident_vga_device::device_reset() UINT32 trident_vga_device::screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect) { - UINT8 cur_mode = 0; + UINT8 cur_mode; svga_device::screen_update(screen,bitmap,cliprect); cur_mode = pc_vga_choosevideomode(); diff --git a/src/devices/cpu/8x300/8x300.cpp b/src/devices/cpu/8x300/8x300.cpp index bf6a5148ca5..ae1fa8bb906 100644 --- a/src/devices/cpu/8x300/8x300.cpp +++ b/src/devices/cpu/8x300/8x300.cpp @@ -168,7 +168,7 @@ void n8x300_cpu_device::execute_run() do { UINT16 opcode; - UINT8 src = 0; + UINT8 src; UINT8 dst; UINT8 rotlen; // rotate amount or I/O field length UINT8 mask; diff --git a/src/devices/cpu/adsp2100/adsp2100.cpp b/src/devices/cpu/adsp2100/adsp2100.cpp index e0e38ef3264..5554513e42f 100644 --- a/src/devices/cpu/adsp2100/adsp2100.cpp +++ b/src/devices/cpu/adsp2100/adsp2100.cpp @@ -368,7 +368,7 @@ void adsp2181_device::idma_data_w(UINT16 data) UINT16 adsp2181_device::idma_data_r() { - UINT16 result = 0xffff; + UINT16 result; // program memory? if (!(m_idma_addr & 0x4000)) diff --git a/src/devices/cpu/arm7/arm7ops.cpp b/src/devices/cpu/arm7/arm7ops.cpp index 07dd3c2e75c..ef0ae06cf63 100644 --- a/src/devices/cpu/arm7/arm7ops.cpp +++ b/src/devices/cpu/arm7/arm7ops.cpp @@ -637,7 +637,7 @@ void arm7_cpu_device::HandleHalfWordDT(UINT32 insn) // Signed? if (insn & 0x40) { - UINT32 newval = 0; + UINT32 newval; // Signed Half Word? if (insn & 0x20) { diff --git a/src/devices/cpu/hd61700/hd61700.cpp b/src/devices/cpu/hd61700/hd61700.cpp index 777a23de894..cabb0539acf 100644 --- a/src/devices/cpu/hd61700/hd61700.cpp +++ b/src/devices/cpu/hd61700/hd61700.cpp @@ -661,7 +661,7 @@ void hd61700_cpu_device::execute_run() case 0x1c: //gpo/gfl { UINT8 arg = read_op(); - UINT8 src = 0xff; + UINT8 src; if (arg&0x40) { diff --git a/src/devices/cpu/i386/i386.cpp b/src/devices/cpu/i386/i386.cpp index 77623b8f7d4..0c56db0686c 100644 --- a/src/devices/cpu/i386/i386.cpp +++ b/src/devices/cpu/i386/i386.cpp @@ -475,7 +475,7 @@ void i386_device::i386_check_sreg_validity(int reg) UINT8 CPL = m_CPL; UINT8 DPL,RPL; I386_SREG desc; - int invalid = 0; + int invalid; memset(&desc, 0, sizeof(desc)); desc.selector = selector; diff --git a/src/devices/cpu/i386/i386priv.h b/src/devices/cpu/i386/i386priv.h index c1f6ecea94c..9913d851fa2 100644 --- a/src/devices/cpu/i386/i386priv.h +++ b/src/devices/cpu/i386/i386priv.h @@ -398,7 +398,7 @@ bool i386_device::i386_translate_address(int intention, offs_t *address, vtlb_en UINT32 directory = (a >> 22) & 0x3ff; UINT32 table = (a >> 12) & 0x3ff; vtlb_entry perm = 0; - bool ret = false; + bool ret; bool user = (intention & TRANSLATE_USER_MASK) ? true : false; bool write = (intention & TRANSLATE_WRITE) ? true : false; bool debug = (intention & TRANSLATE_DEBUG_MASK) ? true : false; diff --git a/src/devices/cpu/i8085/i8085.cpp b/src/devices/cpu/i8085/i8085.cpp index 53c2ca603c2..55daea22fee 100644 --- a/src/devices/cpu/i8085/i8085.cpp +++ b/src/devices/cpu/i8085/i8085.cpp @@ -395,7 +395,7 @@ void i8085a_cpu_device::check_for_interrupts() /* followed by classic INTR */ else if (m_irq_state[I8085_INTR_LINE] && (m_IM & IM_IE)) { - UINT32 vector = 0; + UINT32 vector; /* break out of HALT state and call the IRQ ack callback */ break_halt_for_interrupt(); diff --git a/src/devices/cpu/i8089/i8089.cpp b/src/devices/cpu/i8089/i8089.cpp index 7e4c09485a8..f3772286f6f 100644 --- a/src/devices/cpu/i8089/i8089.cpp +++ b/src/devices/cpu/i8089/i8089.cpp @@ -286,7 +286,7 @@ UINT8 i8089_device::read_byte(bool space, offs_t address) UINT16 i8089_device::read_word(bool space, offs_t address) { - UINT16 data = 0xffff; + UINT16 data; address_space *aspace = (space ? m_io : m_mem); if (sysbus_width() && !(address & 1)) diff --git a/src/devices/cpu/lc8670/lc8670.cpp b/src/devices/cpu/lc8670/lc8670.cpp index c7af2b69546..be38f0b3128 100644 --- a/src/devices/cpu/lc8670/lc8670.cpp +++ b/src/devices/cpu/lc8670/lc8670.cpp @@ -418,7 +418,7 @@ void lc8670_cpu_device::execute_run() debugger_instruction_hook(this, m_pc); - int cycles = 0; + int cycles; m_ppc = m_pc; if (REG_PCON & HALT_MODE) diff --git a/src/devices/cpu/mb86233/mb86233.cpp b/src/devices/cpu/mb86233/mb86233.cpp index 7d760567872..b818924fa15 100644 --- a/src/devices/cpu/mb86233/mb86233.cpp +++ b/src/devices/cpu/mb86233/mb86233.cpp @@ -478,7 +478,7 @@ UINT32 mb86233_cpu_device::GETEXTERNAL( UINT32 EB, UINT32 offset ) { unsigned int value=GETEXTPORT()[0x27]; int exp=(value>>23)&0xff; - unsigned int res=0; + unsigned int res; unsigned int sign=0; MB86233_REG a,b; int index; diff --git a/src/devices/cpu/melps4/melps4.cpp b/src/devices/cpu/melps4/melps4.cpp index b7390eaccf5..7a3653dfe96 100644 --- a/src/devices/cpu/melps4/melps4.cpp +++ b/src/devices/cpu/melps4/melps4.cpp @@ -367,7 +367,7 @@ void melps4_cpu_device::check_interrupt() if (!m_inte) return; - int which = 0; + int which; // assume that lower irq vectors have higher priority if (m_irqflag[0]) diff --git a/src/devices/cpu/rsp/rspcp2d.cpp b/src/devices/cpu/rsp/rspcp2d.cpp index da23d00df0d..61d567b6509 100644 --- a/src/devices/cpu/rsp/rspcp2d.cpp +++ b/src/devices/cpu/rsp/rspcp2d.cpp @@ -268,7 +268,7 @@ void rsp_cop2_drc::lbv() { UINT32 op = m_rspcop2_state->op; - UINT32 ea = 0; + UINT32 ea; int dest = (op >> 16) & 0x1f; int base = (op >> 21) & 0x1f; int index = (op >> 7) & 0xf; @@ -336,7 +336,7 @@ static void cfunc_lsv(void *param) void rsp_cop2_drc::llv() { UINT32 op = m_rspcop2_state->op; - UINT32 ea = 0; + UINT32 ea; int dest = (op >> 16) & 0x1f; int base = (op >> 21) & 0x1f; int index = (op >> 7) & 0xc; diff --git a/src/devices/cpu/scmp/scmp.cpp b/src/devices/cpu/scmp/scmp.cpp index ed05dafa962..4ceb90c9f8f 100644 --- a/src/devices/cpu/scmp/scmp.cpp +++ b/src/devices/cpu/scmp/scmp.cpp @@ -130,8 +130,8 @@ void scmp_device::DEC_ADD(UINT8 val) UINT16 scmp_device::GET_ADDR(UINT8 code) { - UINT16 addr = 0; - INT8 offset = 0; + UINT16 addr; + INT8 offset; UINT16 retVal = 0; UINT16 ptr = GET_PTR_REG(code & 0x03)->w.l; diff --git a/src/devices/cpu/ssp1601/ssp1601.cpp b/src/devices/cpu/ssp1601/ssp1601.cpp index 945eb7d4499..d15fa2525e5 100644 --- a/src/devices/cpu/ssp1601/ssp1601.cpp +++ b/src/devices/cpu/ssp1601/ssp1601.cpp @@ -451,7 +451,7 @@ void ssp1601_device::ptr1_write(int op, UINT32 d) UINT32 ssp1601_device::ptr2_read(int op) { - int mv = 0, t = (op&3) | ((op>>6)&4) | ((op<<1)&0x18); + int mv, t = (op&3) | ((op>>6)&4) | ((op<<1)&0x18); switch (t) { // mod=0 (00) diff --git a/src/devices/cpu/superfx/superfx.cpp b/src/devices/cpu/superfx/superfx.cpp index eb5f04278d3..ad0915be9b8 100644 --- a/src/devices/cpu/superfx/superfx.cpp +++ b/src/devices/cpu/superfx/superfx.cpp @@ -106,7 +106,7 @@ void superfx_device::superfx_pixelcache_flush(INT32 line) UINT8 y = m_pixelcache[line].offset >> 5; UINT32 cn = 0; UINT32 bpp = 2 << ((m_scmr & SUPERFX_SCMR_MD) - ((m_scmr & SUPERFX_SCMR_MD) >> 1)); // = [regs.scmr.md]{ 2, 4, 4, 8 }; - UINT32 addr = 0; + UINT32 addr; UINT32 n = 0; if(m_pixelcache[line].bitpend == 0x00) @@ -218,8 +218,8 @@ void superfx_device::superfx_plot(UINT8 x, UINT8 y) UINT8 superfx_device::superfx_rpix(UINT8 x, UINT8 y) { UINT32 cn = 0; - UINT32 bpp = 0; - UINT32 addr = 0; + UINT32 bpp; + UINT32 addr; UINT8 data = 0x00; UINT32 n = 0; diff --git a/src/devices/cpu/tms32082/mp_ops.cpp b/src/devices/cpu/tms32082/mp_ops.cpp index f92f5091053..bdfbcf1ff28 100644 --- a/src/devices/cpu/tms32082/mp_ops.cpp +++ b/src/devices/cpu/tms32082/mp_ops.cpp @@ -254,7 +254,7 @@ void tms32082_mp_device::execute_short_imm() UINT32 compmask = endmask; // shiftmask == 0xffffffff - UINT32 res = 0; + UINT32 res; if (r) // right { res = ROTATE_R(source, rot) & compmask; @@ -283,7 +283,7 @@ void tms32082_mp_device::execute_short_imm() UINT32 compmask = endmask; // shiftmask == 0xffffffff - UINT32 res = 0; + UINT32 res; if (r) // right { res = ROTATE_R(source, rot) & compmask; @@ -316,7 +316,7 @@ void tms32082_mp_device::execute_short_imm() UINT32 shiftmask = SHIFT_MASK[shift ? shift : 32]; UINT32 compmask = endmask & shiftmask; - UINT32 res = 0; + UINT32 res; if (r) // right { res = ROTATE_R(source, rot) & compmask; @@ -346,7 +346,7 @@ void tms32082_mp_device::execute_short_imm() UINT32 shiftmask = SHIFT_MASK[r ? 32-rot : rot]; UINT32 compmask = endmask & shiftmask; - UINT32 res = 0; + UINT32 res; if (r) // right { res = (ROTATE_R(source, rot) & compmask) | (m_reg[rd] & ~compmask); @@ -377,7 +377,7 @@ void tms32082_mp_device::execute_short_imm() UINT32 shiftmask = SHIFT_MASK[shift ? shift : 32]; UINT32 compmask = endmask & shiftmask; - UINT32 res = 0; + UINT32 res; if (r) // right { res = ROTATE_R(source, rot) & compmask; @@ -409,7 +409,7 @@ void tms32082_mp_device::execute_short_imm() UINT32 shiftmask = SHIFT_MASK[r ? 32-rot : rot]; UINT32 compmask = endmask & ~shiftmask; - UINT32 res = 0; + UINT32 res; if (r) // right { res = ROTATE_R(source, rot) & compmask; @@ -439,7 +439,7 @@ void tms32082_mp_device::execute_short_imm() UINT32 shiftmask = SHIFT_MASK[r ? 32-rot : rot]; UINT32 compmask = endmask & ~shiftmask; - UINT32 res = 0; + UINT32 res; if (r) // right { res = (ROTATE_R(source, rot) & compmask) | (m_reg[rd] & ~compmask); diff --git a/src/devices/machine/53c810.cpp b/src/devices/machine/53c810.cpp index 1323e822d69..2d6b7049016 100644 --- a/src/devices/machine/53c810.cpp +++ b/src/devices/machine/53c810.cpp @@ -708,7 +708,7 @@ unsigned lsi53c810_device::lsi53c810_dasm(char *buf, UINT32 pc) { 0x00000200, "TARGET" }, { 0x00000400, "CARRY" } }; - int need_cojunction = FALSE; + int need_cojunction; /* SET/CLEAR */ switch(op & 0xF8000000) diff --git a/src/devices/machine/68230pit.cpp b/src/devices/machine/68230pit.cpp index cb066344784..927ece2cb75 100644 --- a/src/devices/machine/68230pit.cpp +++ b/src/devices/machine/68230pit.cpp @@ -190,7 +190,7 @@ LOG (static INT32 or_data = 0) LOG (static INT32 or_ofs = 0) READ8_MEMBER (pit68230_device::read){ - UINT8 data = 0; + UINT8 data; switch (offset) { case PIT_68230_PGCR: diff --git a/src/devices/machine/68307.cpp b/src/devices/machine/68307.cpp index 2c3649023be..cbdd2c1eed8 100644 --- a/src/devices/machine/68307.cpp +++ b/src/devices/machine/68307.cpp @@ -307,7 +307,7 @@ WRITE16_MEMBER( m68307cpu_device::m68307_internal_base_w ) int pc = space.device().safe_pc(); logerror("%08x m68307_internal_base_w %08x, %04x (%04x)\n", pc, offset*2,data,mem_mask); - int base = 0; + int base; //int mask = 0; switch (offset<<1) diff --git a/src/devices/machine/adc1213x.cpp b/src/devices/machine/adc1213x.cpp index f6104f273e3..b3aec60a8e7 100644 --- a/src/devices/machine/adc1213x.cpp +++ b/src/devices/machine/adc1213x.cpp @@ -127,7 +127,7 @@ void adc12138_device::convert(int channel, int bits16, int lsbfirst) { int bits; int input_value; - double input = 0; + double input; if (bits16) fatalerror("ADC1213X: 16-bit mode not supported\n"); diff --git a/src/devices/machine/akiko.cpp b/src/devices/machine/akiko.cpp index 85df5f0d66d..07baf8b55ad 100644 --- a/src/devices/machine/akiko.cpp +++ b/src/devices/machine/akiko.cpp @@ -471,7 +471,7 @@ TIMER_CALLBACK_MEMBER(akiko_device::dma_proc) { amiga_state *amiga = machine().driver_data(); UINT32 track = cdrom_get_track( m_cdrom, m_cdrom_lba_cur ); - UINT32 datasize = cdrom_get_toc( m_cdrom )->tracks[track].datasize; + UINT32 datasize;// = cdrom_get_toc(m_cdrom)->tracks[track].datasize; UINT32 subsize = cdrom_get_toc( m_cdrom )->tracks[track].subsize; int i; diff --git a/src/devices/machine/ds1315.cpp b/src/devices/machine/ds1315.cpp index 5764158cefe..e9c984e4716 100644 --- a/src/devices/machine/ds1315.cpp +++ b/src/devices/machine/ds1315.cpp @@ -231,7 +231,7 @@ READ8_MEMBER(ds1315_device::write_data) void ds1315_device::input_raw_data() { - int raw[8], i, j=0; + int raw[8], i, j; raw[0] = raw[1] = raw[2] = raw[3] = raw[4] = raw[5] = raw[6] = raw[7] = 0; UINT8 flag = 1; diff --git a/src/devices/machine/gayle.cpp b/src/devices/machine/gayle.cpp index bf56f2aaf9e..93ea9034eb0 100644 --- a/src/devices/machine/gayle.cpp +++ b/src/devices/machine/gayle.cpp @@ -188,7 +188,7 @@ WRITE_LINE_MEMBER( gayle_device::ide_interrupt_w ) READ16_MEMBER( gayle_device::gayle_id_r ) { - UINT16 data = 0xffff; + UINT16 data; if (ACCESSING_BITS_8_15) data = ((m_gayle_id << m_gayle_id_count++) & 0x80) << 8; diff --git a/src/devices/machine/hdc92x4.cpp b/src/devices/machine/hdc92x4.cpp index f433a7a2edd..299a4e7c367 100644 --- a/src/devices/machine/hdc92x4.cpp +++ b/src/devices/machine/hdc92x4.cpp @@ -568,7 +568,7 @@ bool hdc92x4_device::using_floppy() */ int hdc92x4_device::step_time() { - int time = 0; + int time; int index = m_register_w[MODE] & MO_STEPRATE; // Get seek time. if (m_selected_drive_type == TYPE_FLOPPY8) @@ -588,7 +588,7 @@ int hdc92x4_device::step_time() */ int hdc92x4_device::pulse_width() { - int time = 0; + int time; // Get seek time. if (m_selected_drive_type == TYPE_FLOPPY8) time = pulse_flop8; diff --git a/src/devices/machine/i8255.cpp b/src/devices/machine/i8255.cpp index 7725565cde2..7e6a769f904 100644 --- a/src/devices/machine/i8255.cpp +++ b/src/devices/machine/i8255.cpp @@ -313,7 +313,7 @@ void i8255_device::device_reset() UINT8 i8255_device::read_mode0(int port) { - UINT8 data = 0; + UINT8 data; if (port_mode(port) == MODE_OUTPUT) { @@ -336,7 +336,7 @@ UINT8 i8255_device::read_mode0(int port) UINT8 i8255_device::read_mode1(int port) { - UINT8 data = 0; + UINT8 data; if (port_mode(port) == MODE_OUTPUT) { @@ -368,7 +368,7 @@ UINT8 i8255_device::read_mode1(int port) UINT8 i8255_device::read_mode2() { - UINT8 data = 0; + UINT8 data; // read data from input latch data = m_input[PORT_A]; diff --git a/src/devices/machine/idehd.cpp b/src/devices/machine/idehd.cpp index a9205ed02fe..c563ff3c6e6 100644 --- a/src/devices/machine/idehd.cpp +++ b/src/devices/machine/idehd.cpp @@ -60,7 +60,7 @@ static void swap_strncpy(UINT16 *dst, const char *src, int field_size_in_words) { for (int i = 0; i < field_size_in_words; i++) { - UINT16 d = 0; + UINT16 d; if (*src) { @@ -404,7 +404,7 @@ void ata_mass_storage_device::fill_buffer() void ata_mass_storage_device::finished_read() { - int lba = lba_address(), count = 0; + int lba = lba_address(), count; set_dasp(CLEAR_LINE); @@ -534,7 +534,7 @@ void ata_mass_storage_device::process_buffer() void ata_mass_storage_device::finished_write() { - int lba = lba_address(), count = 0; + int lba = lba_address(), count; set_dasp(CLEAR_LINE); diff --git a/src/devices/machine/ldvp931.cpp b/src/devices/machine/ldvp931.cpp index 47133de9ffb..716728b638b 100644 --- a/src/devices/machine/ldvp931.cpp +++ b/src/devices/machine/ldvp931.cpp @@ -389,7 +389,7 @@ WRITE8_MEMBER( phillips_22vp931_device::i8049_output1_w ) $01 = OSM */ - INT32 speed = 0; + INT32 speed; if (LOG_PORTS && (m_i8049_out1 ^ data) & 0x08) { diff --git a/src/devices/machine/mc68681.cpp b/src/devices/machine/mc68681.cpp index edf1a23f817..c7abec82b46 100644 --- a/src/devices/machine/mc68681.cpp +++ b/src/devices/machine/mc68681.cpp @@ -590,7 +590,7 @@ mc68681_channel *mc68681_device::get_channel(int chan) int mc68681_device::calc_baud(int ch, UINT8 data) { - int baud_rate = 0; + int baud_rate; if ( BIT(ACR, 7) == 0 ) { diff --git a/src/devices/machine/mos6526.cpp b/src/devices/machine/mos6526.cpp index 3d9561b36f7..317c6b8555d 100644 --- a/src/devices/machine/mos6526.cpp +++ b/src/devices/machine/mos6526.cpp @@ -921,7 +921,7 @@ READ8_MEMBER( mos6526_device::read ) READ8_MEMBER( mos8520_device::read ) { - UINT8 data = 0; + UINT8 data; switch (offset & 0x0f) { diff --git a/src/devices/machine/mos6530.cpp b/src/devices/machine/mos6530.cpp index a32383fcbda..46979b078f0 100644 --- a/src/devices/machine/mos6530.cpp +++ b/src/devices/machine/mos6530.cpp @@ -259,7 +259,7 @@ WRITE8_MEMBER( mos6530_device::write ) READ8_MEMBER( mos6530_device::read ) { - UINT8 val = 0; + UINT8 val; /* if A2 == 1 and A0 == 1, we are reading interrupt flags */ if ((offset & 0x05) == 0x05) diff --git a/src/devices/machine/mos6530n.cpp b/src/devices/machine/mos6530n.cpp index 3affa2d7b7f..31c15c65e1d 100644 --- a/src/devices/machine/mos6530n.cpp +++ b/src/devices/machine/mos6530n.cpp @@ -648,7 +648,7 @@ READ8_MEMBER( mos6530_base_t::timer_on_r ) UINT8 mos6530_base_t::timer_r(bool ie) { - UINT8 data = 0; + UINT8 data; live_sync(); diff --git a/src/devices/machine/ncr5380.cpp b/src/devices/machine/ncr5380.cpp index 175e9130c1c..fe62190d40f 100644 --- a/src/devices/machine/ncr5380.cpp +++ b/src/devices/machine/ncr5380.cpp @@ -137,7 +137,7 @@ void ncr5380_device::device_stop() UINT8 ncr5380_device::ncr5380_read_reg(UINT32 offset) { int reg = offset & 7; - UINT8 rv = 0; + UINT8 rv; switch( reg ) { diff --git a/src/devices/machine/ncr5380n.cpp b/src/devices/machine/ncr5380n.cpp index 6534730ca00..7ad2a7fd5d5 100644 --- a/src/devices/machine/ncr5380n.cpp +++ b/src/devices/machine/ncr5380n.cpp @@ -322,7 +322,7 @@ WRITE8_MEMBER(ncr5380n_device::icmd_w) if (mask) { // translate data to nscsi - UINT8 newdata = 0; + UINT8 newdata; newdata = (data & IC_RST ? S_RST : 0) | (data & IC_ACK ? S_ACK : 0) | diff --git a/src/devices/machine/pckeybrd.cpp b/src/devices/machine/pckeybrd.cpp index 513b9036dc9..6fbee8a0173 100644 --- a/src/devices/machine/pckeybrd.cpp +++ b/src/devices/machine/pckeybrd.cpp @@ -421,7 +421,7 @@ void pc_keyboard_device::standard_scancode_insert(int our_code, int pressed) /* add codes for standard keys */ void at_keyboard_device::standard_scancode_insert(int our_code, int pressed) { - int scancode = our_code; + int scancode; switch (m_scan_code_set) { diff --git a/src/devices/machine/smc91c9x.cpp b/src/devices/machine/smc91c9x.cpp index c075f03fb76..a38be999136 100644 --- a/src/devices/machine/smc91c9x.cpp +++ b/src/devices/machine/smc91c9x.cpp @@ -377,7 +377,7 @@ void smc91c9x_device::process_command(UINT16 data) READ16_MEMBER( smc91c9x_device::read ) { - UINT32 result = ~0; + UINT32 result; /* determine the effective register */ offset %= 8; diff --git a/src/devices/machine/steppers.cpp b/src/devices/machine/steppers.cpp index e1eea4d648e..2f63c8529d3 100644 --- a/src/devices/machine/steppers.cpp +++ b/src/devices/machine/steppers.cpp @@ -142,7 +142,7 @@ int stepper_device::update(UINT8 pattern) a small movement that may trigger the optic tab. */ - int pos,steps=0; + int pos,steps; m_pattern = pattern; switch ( m_type ) { diff --git a/src/devices/machine/wd2010.cpp b/src/devices/machine/wd2010.cpp index 6f50622ec79..a97b35b2517 100644 --- a/src/devices/machine/wd2010.cpp +++ b/src/devices/machine/wd2010.cpp @@ -224,7 +224,7 @@ void wd2010_device::device_reset() READ8_MEMBER(wd2010_device::read) { - UINT8 data = 0; + UINT8 data; switch (offset) { @@ -462,8 +462,8 @@ void wd2010_device::seek(UINT8 data) auto_scan_id(data); // has drive number changed? - int direction = 0; // 0 = towards 0 - int step_pulses = 0; + int direction; // 0 = towards 0 + int step_pulses; // Calculate number of steps by comparing the cylinder registers // HI/LO with the internally stored position. diff --git a/src/devices/machine/z80dma.cpp b/src/devices/machine/z80dma.cpp index 745d22877f0..c1f3162bebd 100644 --- a/src/devices/machine/z80dma.cpp +++ b/src/devices/machine/z80dma.cpp @@ -443,7 +443,7 @@ void z80dma_device::do_search() int z80dma_device::do_write() { - int done = 0; + int done; UINT8 mode; mode = TRANSFER_MODE; diff --git a/src/devices/machine/z80scc.cpp b/src/devices/machine/z80scc.cpp index b95116f03c1..d2aa4a5f5bd 100644 --- a/src/devices/machine/z80scc.cpp +++ b/src/devices/machine/z80scc.cpp @@ -425,10 +425,10 @@ UINT8 z80scc_device::modify_vector(UINT8 vec, int i, UINT8 src) void z80scc_device::trigger_interrupt(int index, int state) { UINT8 vector = m_chanB->m_wr2; - UINT8 source = 0; + UINT8 source; int priority; - int prio_level = 0; + int prio_level; LOG(("%s %s:%c %d \n",FUNCNAME, tag(), 'A' + index, state)); diff --git a/src/devices/machine/z8536.cpp b/src/devices/machine/z8536.cpp index 60d5e46f05f..f10b1c8f97a 100644 --- a/src/devices/machine/z8536.cpp +++ b/src/devices/machine/z8536.cpp @@ -214,7 +214,7 @@ void z8536_device::get_interrupt_vector() void z8536_device::check_interrupt() { - int state = ASSERT_LINE; + int state; if (m_register[MASTER_INTERRUPT_CONTROL] & MICR_MIE) { @@ -251,7 +251,7 @@ void z8536_device::check_interrupt() UINT8 z8536_device::read_register(offs_t offset) { - UINT8 data = 0; + UINT8 data; switch (offset) { diff --git a/src/devices/sound/aica.cpp b/src/devices/sound/aica.cpp index 641b47c477c..c8c14fc797d 100644 --- a/src/devices/sound/aica.cpp +++ b/src/devices/sound/aica.cpp @@ -443,10 +443,10 @@ void aica_device::Init() int iTL =(i>>0x0)&0xff; int iPAN=(i>>0x8)&0x1f; int iSDL=(i>>0xD)&0x0F; - float TL=1.0; + float TL; float SegaDB=0; - float fSDL=1.0; - float PAN=1.0; + float fSDL; + float PAN; float LPAN,RPAN; if(iTL&0x01) SegaDB-=0.4f; diff --git a/src/devices/sound/aicadsp.cpp b/src/devices/sound/aicadsp.cpp index 3cf57261cd5..08cb0702e44 100644 --- a/src/devices/sound/aicadsp.cpp +++ b/src/devices/sound/aicadsp.cpp @@ -66,14 +66,14 @@ void aica_dsp_step(AICADSP *DSP) { INT32 ACC=0; //26 bit INT32 SHIFTED=0; //24 bit - INT32 X=0; //24 bit + INT32 X; //24 bit INT32 Y=0; //13 bit - INT32 B=0; //26 bit + INT32 B; //26 bit INT32 INPUTS=0; //24 bit INT32 MEMVAL=0; INT32 FRC_REG=0; //13 bit INT32 Y_REG=0; //24 bit - UINT32 ADDR=0; + UINT32 ADDR; UINT32 ADRS_REG=0; //13 bit int step; diff --git a/src/devices/sound/k007232.cpp b/src/devices/sound/k007232.cpp index 767cd904357..cc25519e4b9 100644 --- a/src/devices/sound/k007232.cpp +++ b/src/devices/sound/k007232.cpp @@ -310,7 +310,7 @@ WRITE8_MEMBER( k007232_device::write ) READ8_MEMBER( k007232_device::read ) { int r = offset; - int ch = 0; + int ch; if( r == 0x0005 || r == 0x000b ){ ch = r/0x0006; diff --git a/src/devices/sound/mos6581.cpp b/src/devices/sound/mos6581.cpp index 89ed5e375c8..ab9dda60606 100644 --- a/src/devices/sound/mos6581.cpp +++ b/src/devices/sound/mos6581.cpp @@ -126,7 +126,7 @@ void mos6581_device::sound_stream_update(sound_stream &stream, stream_sample_t * READ8_MEMBER( mos6581_device::read ) { - UINT8 data = 0; + UINT8 data; switch (offset & 0x1f) { diff --git a/src/devices/sound/qsound.cpp b/src/devices/sound/qsound.cpp index c9bd30d3e74..bdb65ddb943 100644 --- a/src/devices/sound/qsound.cpp +++ b/src/devices/sound/qsound.cpp @@ -224,7 +224,7 @@ READ8_MEMBER(qsound_device::qsound_r) void qsound_device::write_data(UINT8 address, UINT16 data) { - int ch = 0, reg = 0; + int ch = 0, reg; // direct sound reg if (address < 0x80) diff --git a/src/devices/sound/scsp.cpp b/src/devices/sound/scsp.cpp index 1a81678fc31..7a20010714d 100644 --- a/src/devices/sound/scsp.cpp +++ b/src/devices/sound/scsp.cpp @@ -540,10 +540,10 @@ void scsp_device::init() int iTL =(i>>0x0)&0xff; int iPAN=(i>>0x8)&0x1f; int iSDL=(i>>0xD)&0x07; - float TL=1.0f; + float TL; float SegaDB=0.0f; - float fSDL=1.0f; - float PAN=1.0f; + float fSDL; + float PAN; float LPAN,RPAN; if(iTL&0x01) SegaDB-=0.4f; diff --git a/src/devices/sound/scspdsp.cpp b/src/devices/sound/scspdsp.cpp index 75b30cfe85a..9989e48b08a 100644 --- a/src/devices/sound/scspdsp.cpp +++ b/src/devices/sound/scspdsp.cpp @@ -65,14 +65,14 @@ void SCSPDSP_Step(SCSPDSP *DSP) { INT32 ACC=0; //26 bit INT32 SHIFTED=0; //24 bit - INT32 X=0; //24 bit + INT32 X; //24 bit INT32 Y=0; //13 bit - INT32 B=0; //26 bit - INT32 INPUTS=0; //24 bit + INT32 B; //26 bit + INT32 INPUTS; //24 bit INT32 MEMVAL=0; INT32 FRC_REG=0; //13 bit INT32 Y_REG=0; //24 bit - UINT32 ADDR=0; + UINT32 ADDR; UINT32 ADRS_REG=0; //13 bit int step; diff --git a/src/devices/sound/segapcm.cpp b/src/devices/sound/segapcm.cpp index 5ad1c6d7ebb..c93d830392e 100644 --- a/src/devices/sound/segapcm.cpp +++ b/src/devices/sound/segapcm.cpp @@ -106,7 +106,7 @@ void segapcm_device::sound_stream_update(sound_stream &stream, stream_sample_t * /* loop over samples on this channel */ for (i = 0; i < samples; i++) { - INT8 v = 0; + INT8 v; /* handle looping if we've hit the end */ if ((addr >> 16) == end) diff --git a/src/devices/sound/sn76496.cpp b/src/devices/sound/sn76496.cpp index 305daa62b5b..f39fc04bc38 100644 --- a/src/devices/sound/sn76496.cpp +++ b/src/devices/sound/sn76496.cpp @@ -335,7 +335,7 @@ void sn76496_base_device::sound_stream_update(sound_stream &stream, stream_sampl stream_sample_t *lbuffer = outputs[0]; stream_sample_t *rbuffer = (m_stereo)? outputs[1] : nullptr; - INT16 out = 0; + INT16 out; INT16 out2 = 0; while (samples > 0) diff --git a/src/devices/sound/tiasound.cpp b/src/devices/sound/tiasound.cpp index 960520b6b79..403365c08c7 100644 --- a/src/devices/sound/tiasound.cpp +++ b/src/devices/sound/tiasound.cpp @@ -162,7 +162,7 @@ static const UINT8 Div31[POLY5_SIZE] = void tia_write(void *_chip, offs_t offset, UINT8 data) { struct tia *chip = (struct tia *)_chip; - UINT16 new_val = 0; + UINT16 new_val; UINT8 chan; /* determine which address was changed */ diff --git a/src/devices/sound/vrender0.cpp b/src/devices/sound/vrender0.cpp index e063daf3d42..7226f35d304 100644 --- a/src/devices/sound/vrender0.cpp +++ b/src/devices/sound/vrender0.cpp @@ -161,7 +161,7 @@ void vrender0_device::VR0_RenderAudio(int nsamples, stream_sample_t *l, stream_s { INT16 *SAMPLES; UINT32 st=STATUS; - signed int lsample=0,rsample=0; + signed int lsample,rsample=0; UINT32 CLK=(m_SOUNDREGS[0x600/4]>>0)&0xff; UINT32 NCH=(m_SOUNDREGS[0x600/4]>>8)&0xff; UINT32 CT1=(m_SOUNDREGS[0x600/4]>>16)&0xff; diff --git a/src/devices/sound/ymf278b.cpp b/src/devices/sound/ymf278b.cpp index 5c696252728..af186ff0100 100644 --- a/src/devices/sound/ymf278b.cpp +++ b/src/devices/sound/ymf278b.cpp @@ -220,7 +220,7 @@ void ymf278b_device::compute_envelope(YMF278BSlot *slot) void ymf278b_device::sound_stream_update(sound_stream &stream, stream_sample_t **inputs, stream_sample_t **outputs, int samples) { int i, j; - YMF278BSlot *slot = nullptr; + YMF278BSlot *slot; INT16 sample = 0; INT32 *mixp; INT32 vl, vr; @@ -463,7 +463,7 @@ void ymf278b_device::C_w(UINT8 reg, UINT8 data) // Handle slot registers specifically if (reg >= 0x08 && reg <= 0xf7) { - YMF278BSlot *slot = nullptr; + YMF278BSlot *slot; int snum; snum = (reg-8) % 24; slot = &m_slots[snum]; diff --git a/src/devices/video/ef9340_1.cpp b/src/devices/video/ef9340_1.cpp index 1875ef3cf15..39654a32ba9 100644 --- a/src/devices/video/ef9340_1.cpp +++ b/src/devices/video/ef9340_1.cpp @@ -234,7 +234,7 @@ void ef9340_1_device::ef9341_write( UINT8 command, UINT8 b, UINT8 data ) UINT8 ef9340_1_device::ef9341_read( UINT8 command, UINT8 b ) { - UINT8 data = 0xFF; + UINT8 data; logerror("ef9341 %s read, t%s\n", command ? "command" : "data", b ? "B" : "A" ); if ( command ) diff --git a/src/devices/video/hd44780.cpp b/src/devices/video/hd44780.cpp index c54adc6538f..00c75e3cd2a 100644 --- a/src/devices/video/hd44780.cpp +++ b/src/devices/video/hd44780.cpp @@ -288,7 +288,7 @@ const UINT8 *hd44780_device::render() { UINT16 char_pos = line * 0x40 + ((pos + m_disp_shift) % line_size); - int char_base = 0; + int char_base; if (m_ddram[char_pos] < 0x10) { // draw CGRAM characters diff --git a/src/devices/video/hd61830.cpp b/src/devices/video/hd61830.cpp index da996128773..d60354ef8a8 100644 --- a/src/devices/video/hd61830.cpp +++ b/src/devices/video/hd61830.cpp @@ -420,7 +420,7 @@ void hd61830_device::draw_char(bitmap_ind16 &bitmap, const rectangle &cliprect, { int sy = y * m_vp + cl; int sx = x * m_hp + cr; - UINT8 data = 0; + UINT8 data; if (m_mcr & MODE_EXTERNAL_CG) { diff --git a/src/devices/video/i8244.cpp b/src/devices/video/i8244.cpp index 82ddeed4e43..8adb5b5ed15 100644 --- a/src/devices/video/i8244.cpp +++ b/src/devices/video/i8244.cpp @@ -285,7 +285,7 @@ offs_t i8244_device::fix_register_mirrors( offs_t offset ) READ8_MEMBER(i8244_device::read) { - UINT8 data = 0; + UINT8 data; offset = fix_register_mirrors( offset ); diff --git a/src/devices/video/i82730.cpp b/src/devices/video/i82730.cpp index 84bed542f24..d344c7006ef 100644 --- a/src/devices/video/i82730.cpp +++ b/src/devices/video/i82730.cpp @@ -126,7 +126,7 @@ UINT8 i82730_device::read_byte(offs_t address) UINT16 i82730_device::read_word(offs_t address) { - UINT16 data = 0xffff; + UINT16 data; if (sysbus_16bit() && !(address & 1)) { diff --git a/src/devices/video/i8275.cpp b/src/devices/video/i8275.cpp index 4f75d7cbc1a..433f222cb92 100644 --- a/src/devices/video/i8275.cpp +++ b/src/devices/video/i8275.cpp @@ -367,7 +367,7 @@ void i8275_device::device_timer(emu_timer &timer, device_timer_id id, int param, m_hlgt = (data & CA_H) ? 1 : 0; m_vsp = (data & CA_B) ? 1 : 0; - UINT8 ca = 0; + UINT8 ca; int cccc = (data >> 2) & 0x0f; if (line_counter < UNDERLINE) @@ -448,7 +448,7 @@ void i8275_device::device_timer(emu_timer &timer, device_timer_id id, int param, READ8_MEMBER( i8275_device::read ) { - UINT8 data = 0; + UINT8 data; if (offset & 0x01) { diff --git a/src/devices/video/mc6847.h b/src/devices/video/mc6847.h index 26eeb048afe..a4bdb715923 100644 --- a/src/devices/video/mc6847.h +++ b/src/devices/video/mc6847.h @@ -411,7 +411,7 @@ protected: UINT32 emit_mc6847_samples(UINT8 mode, const UINT8 *data, int length, pixel_t *RESTRICT pixels, const pixel_t *RESTRICT palette, mc6847_get_char_rom_delegate get_char_rom, int x, int y) { - UINT32 result = 0; + UINT32 result; if (mode & MODE_AG) { /* graphics */ diff --git a/src/devices/video/tms3556.cpp b/src/devices/video/tms3556.cpp index b007d2fe137..716b1c0269d 100644 --- a/src/devices/video/tms3556.cpp +++ b/src/devices/video/tms3556.cpp @@ -557,8 +557,8 @@ void tms3556_device::draw_line_mixed(UINT16 *ln) void tms3556_device::draw_line(bitmap_ind16 &bmp, int line) { - int double_lines = 0; - UINT16 *ln, *ln2 = nullptr; + int double_lines; + UINT16 *ln, *ln2; // if (m_control_regs[4] & 0x??) // { // interlaced mode