GCC 4.6 "Variable assigned but not used" fixes, part 3 (no whatsnew)

This commit is contained in:
R. Belmont 2011-05-30 02:45:38 +00:00
parent a37912936c
commit c6ff977c4f
8 changed files with 48 additions and 46 deletions

View File

@ -365,7 +365,7 @@ static void jamtable_disasm(running_machine &machine, address_space *space,UINT3
char sop1[16];
char sop2[16];
char pcrel[16];
int prefix;
// int prefix;
addr=address;
while (1)
@ -385,14 +385,14 @@ static void jamtable_disasm(running_machine &machine, address_space *space,UINT3
sprintf(sop2,"%08X",op2);
sprintf(sop1,"ACC");
sprintf(pcrel,"PC+ACC");
prefix=1;
// prefix=1;
}
else
{
sprintf(sop2,"%08X",op2);
sprintf(sop1,"%08X",op1);
sprintf(pcrel,"%08X",base+9+op1);
prefix=0;
// prefix=0;
}
debug_console_printf(machine,"%08X ",base);
// dl=instr ebx=par1 eax=par2

View File

@ -356,11 +356,11 @@ static WRITE16_HANDLER( io_chip_w )
{
segac2_state *state = space->machine().driver_data<segac2_state>();
UINT8 newbank;
UINT8 old;
// UINT8 old;
/* generic implementation */
offset &= 0x1f/2;
old = state->m_misc_io_data[offset];
// old = state->m_misc_io_data[offset];
state->m_misc_io_data[offset] = data;
switch (offset)

View File

@ -994,17 +994,16 @@ static void megadrive_do_insta_68k_to_vsram_dma(running_machine &machine,UINT32
/* This can be simplified quite a lot.. */
static void handle_dma_bits(running_machine &machine)
{
#if 0
if (megadrive_vdp_code&0x20)
{
UINT32 source;
UINT16 length;
source = (MEGADRIVE_REG15_DMASOURCE1 | (MEGADRIVE_REG16_DMASOURCE2<<8) | ((MEGADRIVE_REG17_DMASOURCE3&0xff)<<16))<<1;
length = (MEGADRIVE_REG13_DMALENGTH1 | (MEGADRIVE_REG14_DMALENGTH2<<8))<<1;
// mame_printf_debug("%s 68k DMAtran set source %06x length %04x dest %04x enabled %01x code %02x %02x\n", machine.describe_context(), source, length, megadrive_vdp_address,MEGADRIVE_REG01_DMA_ENABLE, megadrive_vdp_code,MEGADRIVE_REG0F_AUTO_INC);
mame_printf_debug("%s 68k DMAtran set source %06x length %04x dest %04x enabled %01x code %02x %02x\n", machine.describe_context(), source, length, megadrive_vdp_address,MEGADRIVE_REG01_DMA_ENABLE, megadrive_vdp_code,MEGADRIVE_REG0F_AUTO_INC);
}
#endif
if (megadrive_vdp_code==0x20)
{
mame_printf_debug("DMA bit set 0x20 but invalid??\n");
@ -7537,12 +7536,12 @@ static void genesis_render_videoline_to_videobuffer(int scanline)
UINT16 hsize = 64;
UINT16 vsize = 64;
UINT16 window_right;
UINT16 window_hpos;
// UINT16 window_hpos;
UINT16 window_down;
UINT16 window_vpos;
// UINT16 window_vpos;
UINT16 hscroll_base;
UINT8 vscroll_mode;
UINT8 hscroll_mode;
// UINT8 vscroll_mode;
// UINT8 hscroll_mode;
int window_firstline;
int window_lastline;
int window_firstcol;
@ -7587,9 +7586,9 @@ static void genesis_render_videoline_to_videobuffer(int scanline)
base_b = MEGADRIVE_REG04_PATTERN_ADDR_B << 13;
size = MEGADRIVE_REG10_HSCROLL_SIZE | (MEGADRIVE_REG10_VSCROLL_SIZE<<4);
window_right = MEGADRIVE_REG11_WINDOW_RIGHT;
window_hpos = MEGADRIVE_REG11_WINDOW_HPOS;
// window_hpos = MEGADRIVE_REG11_WINDOW_HPOS;
window_down = MEGADRIVE_REG12_WINDOW_DOWN;
window_vpos = MEGADRIVE_REG12_WINDOW_VPOS;
// window_vpos = MEGADRIVE_REG12_WINDOW_VPOS;
screenwidth = MEGADRIVE_REG0C_RS0 | (MEGADRIVE_REG0C_RS1 << 1);
@ -7649,8 +7648,8 @@ static void genesis_render_videoline_to_videobuffer(int scanline)
}
vscroll_mode = MEGADRIVE_REG0B_VSCROLL_MODE;
hscroll_mode = MEGADRIVE_REG0B_HSCROLL_MODE;
// vscroll_mode = MEGADRIVE_REG0B_VSCROLL_MODE;
// hscroll_mode = MEGADRIVE_REG0B_HSCROLL_MODE;
hscroll_base = MEGADRIVE_REG0D_HSCROLL_ADDR<<10;
switch (size)
@ -9488,10 +9487,10 @@ int megadrive_z80irq_hpos = 320;
if (0)
{
//int xxx;
UINT64 frametime;
// UINT64 frametime;
// /* reference */
frametime = ATTOSECONDS_PER_SECOND/megadriv_framerate;
// frametime = ATTOSECONDS_PER_SECOND/megadriv_framerate;
//time_elapsed_since_crap = frame_timer->time_elapsed();
//xxx = machine.device<cpudevice>("maincpu")->attotime_to_cycles(time_elapsed_since_crap);

View File

@ -1047,7 +1047,7 @@ static TGP_FUNCTION( track_lookup )
int offi, offd, len;
float dist;
int i;
UINT32 behaviour, entry;
UINT32 entry;
float height;
logerror("TGP track_lookup %f, 0x%x, %f, %f (%x)\n", a, b, c, d, state->m_pushpc);
@ -1059,7 +1059,7 @@ static TGP_FUNCTION( track_lookup )
dist = -1;
behaviour = 0;
// behaviour = 0;
height = 0.0;
entry = 0;
@ -1080,7 +1080,7 @@ static TGP_FUNCTION( track_lookup )
float d = (a-z)*(a-z);
if(dist == -1 || d<dist) {
dist = d;
behaviour = tgp_data[posd+15];
// behaviour = tgp_data[posd+15];
height = z;
entry = bpos+i;
}

View File

@ -1223,7 +1223,7 @@ WRITE64_DEVICE_HANDLER( naomibd_w )
static void load_rom_gdrom(running_machine& machine, naomibd_state *v)
{
UINT32 result;
// UINT32 result;
cdrom_file *gdromfile;
UINT8 buffer[2048];
UINT8 *ptr;
@ -1262,20 +1262,20 @@ static void load_rom_gdrom(running_machine& machine, naomibd_state *v)
// primary volume descriptor
// read frame 0xb06e (frame=sector+150)
// dimm board firmware starts straight from this frame
result = cdrom_read_data(gdromfile, 0xb06e - 150, buffer, CD_TRACK_MODE1);
cdrom_read_data(gdromfile, 0xb06e - 150, buffer, CD_TRACK_MODE1);
start=((buffer[0x8c+0] << 0) |
(buffer[0x8c+1] << 8) |
(buffer[0x8c+2] << 16) |
(buffer[0x8c+3] << 24));
// path table
result = cdrom_read_data(gdromfile, start, buffer, CD_TRACK_MODE1);
cdrom_read_data(gdromfile, start, buffer, CD_TRACK_MODE1);
start=((buffer[0x2+0] << 0) |
(buffer[0x2+1] << 8) |
(buffer[0x2+2] << 16) |
(buffer[0x2+3] << 24));
dir = start;
// directory
result = cdrom_read_data(gdromfile, dir, buffer, CD_TRACK_MODE1);
cdrom_read_data(gdromfile, dir, buffer, CD_TRACK_MODE1);
// find data of file
start = 0;
size = 0;
@ -1326,14 +1326,14 @@ static void load_rom_gdrom(running_machine& machine, naomibd_state *v)
if ((start != 0) && (size == 0x100))
{
// read file
result = cdrom_read_data(gdromfile, start, buffer, CD_TRACK_MODE1);
cdrom_read_data(gdromfile, start, buffer, CD_TRACK_MODE1);
// get "rom" file name
memset(name,'\0', 128);
memcpy(name, buffer+0xc0, FILENAME_LENGTH-1);
// directory
result = cdrom_read_data(gdromfile, dir, buffer, CD_TRACK_MODE1);
cdrom_read_data(gdromfile, dir, buffer, CD_TRACK_MODE1);
// find data of "rom" file
start = 0;
size = 0;
@ -1388,7 +1388,7 @@ static void load_rom_gdrom(running_machine& machine, naomibd_state *v)
sectors = (size+2047)/2048;
while (sectors > 0)
{
result = cdrom_read_data(gdromfile, start, ptr, CD_TRACK_MODE1);
cdrom_read_data(gdromfile, start, ptr, CD_TRACK_MODE1);
ptr += 2048;
start++;
sectors--;

View File

@ -1013,14 +1013,14 @@ WRITE64_HANDLER( pvr_ta_w )
{
int reg;
UINT64 shift;
UINT32 old,dat;
UINT32 dat;
UINT32 sizera,offsetra;
int a;
int sanitycount;
reg = decode_reg_64(offset, mem_mask, &shift);
dat = (UINT32)(data >> shift);
old = pvrta_regs[reg];
//old = pvrta_regs[reg];
// Dreamcast BIOS attempts to set PVRID to zero and then dies
// if it succeeds. Don't allow.
@ -1632,12 +1632,12 @@ WRITE64_HANDLER( ta_fifo_poly_w )
WRITE64_HANDLER( ta_fifo_yuv_w )
{
int reg;
UINT64 shift;
UINT32 dat;
// int reg;
// UINT64 shift;
// UINT32 dat;
reg = decode_reg_64(offset, mem_mask, &shift);
dat = (UINT32)(data >> shift);
// reg = decode_reg_64(offset, mem_mask, &shift);
// dat = (UINT32)(data >> shift);
// printf("YUV FIFO: [%08x=%x] write %" I64FMT "x to %x, mask %" I64FMT "x %08x\n", 0x10800000+reg*4, dat, data, offset, mem_mask,test);
}

View File

@ -943,15 +943,15 @@ static UINT16 *push_direct(model1_state *state, UINT16 *list)
{
struct view *view = state->m_view;
UINT32 flags;
UINT32 tex_adr, lum, v1, v2;
UINT32 tex_adr, lum; //, v1, v2;
struct point *old_p0, *old_p1, *p0, *p1;
int link, type;
float z;
struct quad_m1 cquad;
tex_adr = readi(list);
v1 = readi(list+2);
v2 = readi(list+10);
// v1 = readi(list+2);
// v2 = readi(list+10);
old_p0 = state->m_pointpt++;
old_p1 = state->m_pointpt++;
@ -999,7 +999,7 @@ static UINT16 *push_direct(model1_state *state, UINT16 *list)
p1 = state->m_pointpt++;
lum = readi(list+2);
v1 = readi(list+4);
// v1 = readi(list+4);
if(type == 2) {
p0->x = readf(list+6);

View File

@ -2501,11 +2501,12 @@ static UINT32 * geo_end( geo_state *geo, UINT32 opcode, UINT32 *input )
/* Command 10: Dummy */
static UINT32 * geo_dummy( geo_state *geo, UINT32 opcode, UINT32 *input )
{
UINT32 data;
// UINT32 data;
(void)opcode;
/* do the dummy read cycle */
data = *input++;
// data = *input++;
input++;
return input;
}
@ -2556,7 +2557,7 @@ static UINT32 * geo_lod( geo_state *geo, UINT32 opcode, UINT32 *input )
/* Command 1D: Code Upload (undocumented, unsupported) */
static UINT32 * geo_code_upload( geo_state *geo, UINT32 opcode, UINT32 *input )
{
UINT32 flags, count, i;
UINT32 count, i;
/*
This command uploads code to program memory and
@ -2570,7 +2571,8 @@ static UINT32 * geo_code_upload( geo_state *geo, UINT32 opcode, UINT32 *input )
(void)opcode;
/* read in the flags */
flags = *input++;
// flags = *input++;
input++;
/* read in the count */
count = *input++;
@ -2604,7 +2606,7 @@ static UINT32 * geo_code_upload( geo_state *geo, UINT32 opcode, UINT32 *input )
/* Command 1E: Code Jump (undocumented, unsupported) */
static UINT32 * geo_code_jump( geo_state *geo, UINT32 opcode, UINT32 *input )
{
UINT32 address;
// UINT32 address;
/*
This command jumps to a specified address in program
@ -2618,7 +2620,8 @@ static UINT32 * geo_code_jump( geo_state *geo, UINT32 opcode, UINT32 *input )
(void)opcode;
address = *input++ & 0x3FF;
// address = *input++ & 0x3FF;
input++;
/*
code_jump( address )