From 6f1a375e765245065e64ce8e75808bef358311f4 Mon Sep 17 00:00:00 2001 From: "R. Belmont" Date: Mon, 30 May 2011 04:09:45 +0000 Subject: [PATCH] GCC 4.6 "Variable assigned but not used" fixes part 7 (no whatsnew) --- src/emu/machine/53c810.c | 20 ++++++++++---------- src/emu/machine/smc91c9x.c | 4 ++-- src/emu/screen.c | 4 ++-- src/emu/sound/rf5c400.c | 4 ++-- src/emu/video/hd63484.c | 6 +++--- src/emu/video/tlc34076.c | 4 ++-- src/emu/video/vooddefs.h | 21 +++++++++++++++++++++ src/emu/video/voodoo.c | 8 ++++---- 8 files changed, 46 insertions(+), 25 deletions(-) diff --git a/src/emu/machine/53c810.c b/src/emu/machine/53c810.c index d450047912a..f1bf5d29d2e 100644 --- a/src/emu/machine/53c810.c +++ b/src/emu/machine/53c810.c @@ -148,9 +148,9 @@ static OPCODE_HANDLER( dmaop_block_move ) static OPCODE_HANDLER( dmaop_select ) { - UINT32 operand; +// UINT32 operand; - operand = FETCH(machine); +// operand = FETCH(machine); if (lsi810.scntl0 & 0x01) { @@ -173,9 +173,9 @@ static OPCODE_HANDLER( dmaop_select ) static OPCODE_HANDLER( dmaop_wait_disconnect ) { - UINT32 operand; +// UINT32 operand; - operand = FETCH(machine); +// operand = FETCH(machine); if (lsi810.scntl0 & 0x01) { @@ -191,9 +191,9 @@ static OPCODE_HANDLER( dmaop_wait_disconnect ) static OPCODE_HANDLER( dmaop_wait_reselect ) { - UINT32 operand; + // UINT32 operand; - operand = FETCH(machine); +// operand = FETCH(machine); if (lsi810.scntl0 & 0x01) { @@ -209,9 +209,9 @@ static OPCODE_HANDLER( dmaop_wait_reselect ) static OPCODE_HANDLER( dmaop_set ) { - UINT32 operand; +// UINT32 operand; - operand = FETCH(machine); +// operand = FETCH(machine); /* initiator mode */ if (lsi810.dcmd & 0x8) @@ -238,9 +238,9 @@ static OPCODE_HANDLER( dmaop_set ) static OPCODE_HANDLER( dmaop_clear ) { - UINT32 operand; +// UINT32 operand; - operand = FETCH(machine); +// operand = FETCH(machine); /* initiator mode */ if (lsi810.dcmd & 0x8) diff --git a/src/emu/machine/smc91c9x.c b/src/emu/machine/smc91c9x.c index 194654ce0fa..6236a7defe3 100644 --- a/src/emu/machine/smc91c9x.c +++ b/src/emu/machine/smc91c9x.c @@ -388,7 +388,7 @@ READ16_DEVICE_HANDLER( smc91c9x_r ) WRITE16_DEVICE_HANDLER( smc91c9x_w ) { smc91c9x_state *smc = get_safe_token(device); - UINT16 olddata; +// UINT16 olddata; /* determine the effective register */ offset %= 8; @@ -396,7 +396,7 @@ WRITE16_DEVICE_HANDLER( smc91c9x_w ) offset += 8 * (smc->reg[EREG_BANK] & 7); /* update the data generically */ - olddata = smc->reg[offset]; +// olddata = smc->reg[offset]; mem_mask &= smc->regmask[offset]; COMBINE_DATA(&smc->reg[offset]); diff --git a/src/emu/screen.c b/src/emu/screen.c index e3cdb6595a5..8ca39ee9638 100644 --- a/src/emu/screen.c +++ b/src/emu/screen.c @@ -1026,7 +1026,7 @@ void screen_device::finalize_burnin() if (filerr == FILERR_NONE) { png_info pnginfo = { 0 }; - png_error pngerr; +// png_error pngerr; char text[256]; // add two text entries describing the image @@ -1036,7 +1036,7 @@ void screen_device::finalize_burnin() png_add_text(&pnginfo, "System", text); // now do the actual work - pngerr = png_write_bitmap(file, &pnginfo, finalmap, 0, NULL); + png_write_bitmap(file, &pnginfo, finalmap, 0, NULL); // free any data allocated png_free(&pnginfo); diff --git a/src/emu/sound/rf5c400.c b/src/emu/sound/rf5c400.c index 65ff5be839f..4da3757694e 100644 --- a/src/emu/sound/rf5c400.c +++ b/src/emu/sound/rf5c400.c @@ -118,7 +118,7 @@ static STREAM_UPDATE( rf5c400_update ) int i, ch; rf5c400_state *info = (rf5c400_state *)param; INT16 *rom = info->rom; - UINT32 start, end, loop; + UINT32 end, loop; UINT64 pos; UINT8 vol, lvol, rvol, type; UINT8 env_phase; @@ -133,7 +133,7 @@ static STREAM_UPDATE( rf5c400_update ) stream_sample_t *buf0 = outputs[0]; stream_sample_t *buf1 = outputs[1]; - start = ((channel->startH & 0xFF00) << 8) | channel->startL; +// start = ((channel->startH & 0xFF00) << 8) | channel->startL; end = ((channel->endHloopH & 0xFF) << 16) | channel->endL; loop = ((channel->endHloopH & 0xFF00) << 8) | channel->loopL; pos = channel->pos; diff --git a/src/emu/video/hd63484.c b/src/emu/video/hd63484.c index 67aa9679455..0bf6e5e1a31 100644 --- a/src/emu/video/hd63484.c +++ b/src/emu/video/hd63484.c @@ -677,7 +677,7 @@ static void ptn( device_t *device, int opcode, int src_x, int src_y, INT16 _ax, int src_step1_x,src_step1_y,src_step2_x,src_step2_y; int ax = _ax; int ay = _ay; - int ax_neg,ay_neg; + int ax_neg; //,ay_neg; int xxs = src_x; int yys = src_y; int xxd = hd63484->cpx; @@ -688,10 +688,10 @@ static void ptn( device_t *device, int opcode, int src_x, int src_y, INT16 _ax, ax_neg = -1; else ax_neg = 1; - if (ay < 0) +/* if (ay < 0) ay_neg = -1; else - ay_neg = 1; + ay_neg = 1;*/ if (opcode & 0x0800) switch (opcode & 0x0700) diff --git a/src/emu/video/tlc34076.c b/src/emu/video/tlc34076.c index fea2408f96c..21b9a2869d5 100644 --- a/src/emu/video/tlc34076.c +++ b/src/emu/video/tlc34076.c @@ -163,11 +163,11 @@ READ8_DEVICE_HANDLER( tlc34076_r ) WRITE8_DEVICE_HANDLER( tlc34076_w ) { tlc34076_state *state = get_safe_token(device); - UINT8 oldval; +// UINT8 oldval; /* keep in range */ offset &= 0x0f; - oldval = state->regs[offset]; +// oldval = state->regs[offset]; state->regs[offset] = data; /* switch off the offset */ diff --git a/src/emu/video/vooddefs.h b/src/emu/video/vooddefs.h index f79235bbb18..5ebbfeacf43 100644 --- a/src/emu/video/vooddefs.h +++ b/src/emu/video/vooddefs.h @@ -2079,6 +2079,9 @@ INLINE UINT32 compute_raster_hash(const raster_info *info) const UINT8 *dither4 = NULL; \ const UINT8 *dither = NULL \ +#define DECLARE_DITHER_POINTERS_NO_DITHER_VAR \ + const UINT8 *dither_lookup = NULL; \ + #define COMPUTE_DITHER_POINTERS(FBZMODE, YY) \ do \ { \ @@ -2100,6 +2103,24 @@ do \ } \ while (0) +#define COMPUTE_DITHER_POINTERS_NO_DITHER_VAR(FBZMODE, YY) \ +do \ +{ \ + /* compute the dithering pointers */ \ + if (FBZMODE_ENABLE_DITHERING(FBZMODE)) \ + { \ + if (FBZMODE_DITHER_TYPE(FBZMODE) == 0) \ + { \ + dither_lookup = &dither4_lookup[(YY & 3) << 11]; \ + } \ + else \ + { \ + dither_lookup = &dither2_lookup[(YY & 3) << 11]; \ + } \ + } \ +} \ +while (0) + #define APPLY_DITHER(FBZMODE, XX, DITHER_LOOKUP, RR, GG, BB) \ do \ { \ diff --git a/src/emu/video/voodoo.c b/src/emu/video/voodoo.c index 9279acac2cb..7228d9e034a 100644 --- a/src/emu/video/voodoo.c +++ b/src/emu/video/voodoo.c @@ -3062,7 +3062,7 @@ static INT32 lfb_w(voodoo_state *v, offs_t offset, UINT32 data, UINT32 mem_mask, /* simple case: no pipeline */ if (!LFBMODE_ENABLE_PIXEL_PIPELINE(v->reg[lfbMode].u)) { - DECLARE_DITHER_POINTERS; + DECLARE_DITHER_POINTERS_NO_DITHER_VAR; UINT32 bufoffs; if (LOG_LFB) logerror("VOODOO.%d.LFB:write raw mode %X (%d,%d) = %08X & %08X\n", v->index, LFBMODE_WRITE_FORMAT(v->reg[lfbMode].u), x, y, data, mem_mask); @@ -3076,7 +3076,7 @@ static INT32 lfb_w(voodoo_state *v, offs_t offset, UINT32 data, UINT32 mem_mask, bufoffs = scry * v->fbi.rowpixels + x; /* compute dithering */ - COMPUTE_DITHER_POINTERS(v->reg[fbzMode].u, y); + COMPUTE_DITHER_POINTERS_NO_DITHER_VAR(v->reg[fbzMode].u, y); /* loop over up to two pixels */ for (pix = 0; mask; pix++) @@ -4749,8 +4749,8 @@ static INT32 fastfill(voodoo_state *v) /* determine the dither pattern */ for (y = 0; y < 4; y++) { - DECLARE_DITHER_POINTERS; - COMPUTE_DITHER_POINTERS(v->reg[fbzMode].u, y); + DECLARE_DITHER_POINTERS_NO_DITHER_VAR; + COMPUTE_DITHER_POINTERS_NO_DITHER_VAR(v->reg[fbzMode].u, y); for (x = 0; x < 4; x++) { int r = v->reg[color1].rgb.r;