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

This commit is contained in:
R. Belmont 2011-05-30 03:31:11 +00:00
parent 999394b8f5
commit 601301fc95
8 changed files with 25 additions and 22 deletions

View File

@ -1059,7 +1059,7 @@ static void LOADM(am29000_state *am29000)
static void STORE(am29000_state *am29000)
{
UINT32 addr = INST_M_BIT ? I8: GET_RB_VAL;
UINT32 r;
// UINT32 r;
if (INST_UA_BIT)
fatalerror("Am29000: UA bit set on LOAD\n");
@ -1067,7 +1067,7 @@ static void STORE(am29000_state *am29000)
if (INST_CE_BIT)
{
logerror("Am29000: Attempting a co-processor LOAD!\n");
r = 0;
// r = 0;
}
else
{

View File

@ -791,7 +791,7 @@ static READ32_DEVICE_HANDLER( arm7_rt_r_callback )
UINT32 opcode = offset;
UINT8 cReg = ( opcode & INSN_COPRO_CREG ) >> INSN_COPRO_CREG_SHIFT;
UINT8 op2 = ( opcode & INSN_COPRO_OP2 ) >> INSN_COPRO_OP2_SHIFT;
UINT8 op3 = opcode & INSN_COPRO_OP3;
// UINT8 op3 = opcode & INSN_COPRO_OP3;
UINT8 cpnum = (opcode & INSN_COPRO_CPNUM) >> INSN_COPRO_CPNUM_SHIFT;
UINT32 data = 0;
@ -942,7 +942,7 @@ static READ32_DEVICE_HANDLER( arm7_rt_r_callback )
}
op2 = 0;
op3 = 0;
// op3 = 0;
return data;
}

View File

@ -478,10 +478,10 @@ OP_HANDLER( bra )
}
/* $21 BRN relative ----- */
static UINT8 brn_temp; // hack around GCC 4.6 error because we need the side effects of IMMBYTE
OP_HANDLER( brn )
{
UINT8 t;
IMMBYTE(t);
IMMBYTE(brn_temp);
}
/* $1021 LBRN relative ----- */

View File

@ -1018,7 +1018,7 @@ static void I386OP(repeat)(i386_state *cpustate, int invert_flag)
UINT32 repeated_eip = cpustate->eip;
UINT32 repeated_pc = cpustate->pc;
UINT8 opcode; // = FETCH(cpustate);
UINT32 eas, ead;
// UINT32 eas, ead;
UINT32 count;
INT32 cycle_base = 0, cycle_adjustment = 0;
UINT8 prefix_flag=1;
@ -1068,11 +1068,12 @@ static void I386OP(repeat)(i386_state *cpustate, int invert_flag)
if( cpustate->segment_prefix ) {
// FIXME: the following does not work if both address override and segment override are used
eas = i386_translate(cpustate, cpustate->segment_override, cpustate->sreg[cpustate->segment_prefix].d ? REG32(ESI) : REG16(SI) );
i386_translate(cpustate, cpustate->segment_override, cpustate->sreg[cpustate->segment_prefix].d ? REG32(ESI) : REG16(SI) );
} else {
eas = i386_translate(cpustate, DS, cpustate->address_size ? REG32(ESI) : REG16(SI) );
//eas =
i386_translate(cpustate, DS, cpustate->address_size ? REG32(ESI) : REG16(SI) );
}
ead = i386_translate(cpustate, ES, cpustate->address_size ? REG32(EDI) : REG16(DI) );
i386_translate(cpustate, ES, cpustate->address_size ? REG32(EDI) : REG16(DI) );
switch(opcode)
{
@ -2218,13 +2219,13 @@ static void I386OP(into)(i386_state *cpustate) // Opcode 0xce
}
}
static UINT32 i386_escape_ea; // hack around GCC 4.6 error because we need the side effects of GetEA()
static void I386OP(escape)(i386_state *cpustate) // Opcodes 0xd8 - 0xdf
{
UINT8 modrm = FETCH(cpustate);
if(modrm < 0xc0)
{
UINT32 ea;
ea = GetEA(cpustate,modrm);
i386_escape_ea = GetEA(cpustate,modrm);
}
CYCLES(cpustate,3); // TODO: confirm this
(void) LOAD_RM8(modrm);

View File

@ -27,15 +27,15 @@ static void PREFIX186(_pusha)(i8086_state *cpustate) /* Opcode 0x60 */
PUSH(cpustate->regs.w[DI]);
}
static unsigned i186_popa_tmp; // hack around GCC 4.6 error because we need the side effects of POP
static void PREFIX186(_popa)(i8086_state *cpustate) /* Opcode 0x61 */
{
unsigned tmp;
ICOUNT -= timing.popa;
POP(cpustate->regs.w[DI]);
POP(cpustate->regs.w[SI]);
POP(cpustate->regs.w[BP]);
POP(tmp);
POP(i186_popa_tmp);
POP(cpustate->regs.w[BX]);
POP(cpustate->regs.w[DX]);
POP(cpustate->regs.w[CX]);

View File

@ -1177,8 +1177,8 @@ static void PREFIX86(_cmp_axd16)(i8086_state *cpustate) /* Opcode 0x3d */
static void PREFIX86(_aas)(i8086_state *cpustate) /* Opcode 0x3f */
{
UINT8 ALcarry=1;
if (cpustate->regs.b[AL]>0xf9) ALcarry=2;
// UINT8 ALcarry=1;
// if (cpustate->regs.b[AL]>0xf9) ALcarry=2;
if (AF || ((cpustate->regs.b[AL] & 0xf) > 9))
{

View File

@ -300,10 +300,10 @@ INLINE void bra( konami_state *cpustate )
}
/* $21 BRN relative ----- */
static UINT8 konami_brn_t; // hack around GCC 4.6 error because we need the side effects of IMMBYTE
INLINE void brn( konami_state *cpustate )
{
UINT8 t;
IMMBYTE(cpustate, t);
IMMBYTE(cpustate, konami_brn_t);
}
/* $1021 LBRN relative ----- */

View File

@ -764,7 +764,7 @@ static void memorywin_destroy(GtkObject *obj, gpointer user_data)
static void memorywin_new(running_machine &machine)
{
win_i *mem;
int item, cursel;
int item; //, cursel;
device_t *curcpu = debug_cpu_get_visible_cpu(machine);
GtkComboBox * zone_w;
@ -781,7 +781,8 @@ static void memorywin_new(running_machine &machine)
downcast<debug_view_memory *>(mem->views[0]->view)->set_expression("0");
// populate the combobox
cursel = item = 0;
// cursel = 0;
item = 0;
for (const debug_view_source *source = mem->views[0]->view->source_list().head(); source != NULL; source = source->next())
{
@ -858,7 +859,7 @@ static void disasmwin_destroy(GtkObject *obj, gpointer user_data)
static void disasmwin_new(running_machine &machine)
{
win_i *dis;
int item, cursel;
int item; //, cursel;
device_t *curcpu = debug_cpu_get_visible_cpu(machine);
GtkComboBox *cpu_w;
astring title;
@ -877,7 +878,8 @@ static void disasmwin_new(running_machine &machine)
downcast<debug_view_disasm *>(dis->views[0]->view)->set_expression("curpc");
// populate the combobox
cursel = item = 0;
// cursel = 0;
item = 0;
for (const debug_view_source *source = dis->views[0]->view->source_list().head(); source != NULL; source = source->next())
{
gtk_combo_box_append_text(cpu_w, source->name());