GCC 4.6 "variable assigned but not used" fixes, part 1 (no whatsnew)

This commit is contained in:
R. Belmont 2011-05-30 02:30:20 +00:00
parent 1a23f8659b
commit 9bb0a24eb1
8 changed files with 38 additions and 34 deletions

View File

@ -1513,10 +1513,10 @@ error:
static avi_error parse_indx_chunk(avi_file *file, avi_stream *stream, avi_chunk *strf)
{
UINT32 entries, entry, id;
UINT32 entries, entry;
UINT8 *chunkdata = NULL;
UINT16 longs_per_entry;
UINT8 subtype, type;
UINT8 type;
UINT64 baseoffset;
avi_error avierr;
@ -1527,10 +1527,10 @@ static avi_error parse_indx_chunk(avi_file *file, avi_stream *stream, avi_chunk
/* extract the data */
longs_per_entry = fetch_16bits(&chunkdata[0]);
subtype = chunkdata[2];
//subtype = chunkdata[2];
type = chunkdata[3];
entries = fetch_32bits(&chunkdata[4]);
id = fetch_32bits(&chunkdata[8]);
//id = fetch_32bits(&chunkdata[8]);
baseoffset = fetch_64bits(&chunkdata[12]);
/* if this is a superindex, loop over entries and call ourselves recursively */

View File

@ -435,7 +435,6 @@ UINT64 core_fsize(core_file *file)
UINT32 core_fread(core_file *file, void *buffer, UINT32 length)
{
file_error filerr;
UINT32 bytes_read = 0;
/* flush any buffered char */
@ -457,7 +456,7 @@ UINT32 core_fread(core_file *file, void *buffer, UINT32 length)
/* read as much as makes sense into the buffer */
file->bufferbase = file->offset + bytes_read;
file->bufferbytes = 0;
filerr = osd_or_zlib_read(file, file->buffer, file->bufferbase, sizeof(file->buffer), &file->bufferbytes);
osd_or_zlib_read(file, file->buffer, file->bufferbase, sizeof(file->buffer), &file->bufferbytes);
/* do a bounded copy from the buffer to the destination */
bytes_read += safe_buffer_copy(file->buffer, 0, file->bufferbytes, buffer, bytes_read, length);
@ -467,7 +466,7 @@ UINT32 core_fread(core_file *file, void *buffer, UINT32 length)
else
{
UINT32 new_bytes_read = 0;
filerr = osd_or_zlib_read(file, (UINT8 *)buffer + bytes_read, file->offset + bytes_read, length - bytes_read, &new_bytes_read);
osd_or_zlib_read(file, (UINT8 *)buffer + bytes_read, file->offset + bytes_read, length - bytes_read, &new_bytes_read);
bytes_read += new_bytes_read;
}
}
@ -771,7 +770,6 @@ file_error core_fload(const char *filename, void **data, UINT32 *length)
UINT32 core_fwrite(core_file *file, const void *buffer, UINT32 length)
{
UINT32 bytes_written = 0;
file_error filerr;
/* can't write to RAM-based stuff */
if (file->data != NULL)
@ -785,7 +783,7 @@ UINT32 core_fwrite(core_file *file, const void *buffer, UINT32 length)
file->bufferbytes = 0;
/* do the write */
filerr = osd_or_zlib_write(file, buffer, file->offset, length, &bytes_written);
osd_or_zlib_write(file, buffer, file->offset, length, &bytes_written);
/* return the number of bytes read */
file->offset += bytes_written;

View File

@ -1076,9 +1076,9 @@ static SCREEN_UPDATE(cps3)
//int endline;
//int height = (value3 & 0x7f000000)>>24;
int uu;
UINT32* tmapregs[4] = { state->m_tilemap20_regs_base, state->m_tilemap30_regs_base, state->m_tilemap40_regs_base, state->m_tilemap50_regs_base };
UINT32* regs;
regs = tmapregs[tilemapnum];
// UINT32* tmapregs[4] = { state->m_tilemap20_regs_base, state->m_tilemap30_regs_base, state->m_tilemap40_regs_base, state->m_tilemap50_regs_base };
// UINT32* regs;
// regs = tmapregs[tilemapnum];
//endline = value2;
//startline = endline - height;

View File

@ -1153,7 +1153,7 @@ static int jvs_decode_data(UINT8 *in, UINT8 *out, int length)
static void jamma_jvs_cmd_exec(running_machine &machine)
{
hornet_state *state = machine.driver_data<hornet_state>();
UINT8 sync, node, byte_num;
UINT8 byte_num;
UINT8 data[1024], rdata[1024];
#if 0
int length;
@ -1161,8 +1161,8 @@ static void jamma_jvs_cmd_exec(running_machine &machine)
int rdata_ptr;
int sum;
sync = state->m_jvs_sdata[0];
node = state->m_jvs_sdata[1];
// sync = state->m_jvs_sdata[0];
// node = state->m_jvs_sdata[1];
byte_num = state->m_jvs_sdata[2];
#if 0

View File

@ -1002,9 +1002,9 @@ The physical page is encoded differently depending on the page size :
WRITE32_HANDLER(archimedes_memc_page_w)
{
UINT32 log, phys, memc, perms;
UINT32 log, phys, memc;
perms = (data & 0x300)>>8;
// perms = (data & 0x300)>>8;
log = phys = memc = 0;
switch (memc_pagesize)

View File

@ -624,7 +624,7 @@ void amiga_render_scanline(running_machine &machine, bitmap_t *bitmap, int scanl
amiga_state *state = machine.driver_data<amiga_state>();
UINT16 save_color0 = CUSTOM_REG(REG_COLOR00);
int ddf_start_pixel = 0, ddf_stop_pixel = 0;
int hires = 0, dualpf = 0, lace = 0, ham = 0;
int hires = 0, dualpf = 0, ham = 0;
int hstart = 0, hstop = 0;
int vstart = 0, vstop = 0;
int pf1pri = 0, pf2pri = 0;
@ -683,7 +683,7 @@ void amiga_render_scanline(running_machine &machine, bitmap_t *bitmap, int scanl
hires = CUSTOM_REG(REG_BPLCON0) & BPLCON0_HIRES;
ham = CUSTOM_REG(REG_BPLCON0) & BPLCON0_HOMOD;
dualpf = CUSTOM_REG(REG_BPLCON0) & BPLCON0_DBLPF;
lace = CUSTOM_REG(REG_BPLCON0) & BPLCON0_LACE;
// lace = CUSTOM_REG(REG_BPLCON0) & BPLCON0_LACE;
/* compute the pixel fetch parameters */
ddf_start_pixel = ( CUSTOM_REG(REG_DDFSTRT) & 0xfc ) * 2 + (hires ? 9 : 17);

View File

@ -449,7 +449,7 @@ void amiga_aga_render_scanline(running_machine &machine, bitmap_t *bitmap, int s
amiga_state *state = machine.driver_data<amiga_state>();
UINT16 save_color0 = CUSTOM_REG(REG_COLOR00);
int ddf_start_pixel = 0, ddf_stop_pixel = 0;
int hires = 0, dualpf = 0, lace = 0, ham = 0;
int hires = 0, dualpf = 0, ham = 0;
int hstart = 0, hstop = 0;
int vstart = 0, vstop = 0;
int pf1pri = 0, pf2pri = 0;
@ -512,7 +512,7 @@ void amiga_aga_render_scanline(running_machine &machine, bitmap_t *bitmap, int s
hires = CUSTOM_REG(REG_BPLCON0) & BPLCON0_HIRES;
ham = CUSTOM_REG(REG_BPLCON0) & BPLCON0_HOMOD;
dualpf = CUSTOM_REG(REG_BPLCON0) & BPLCON0_DBLPF;
lace = CUSTOM_REG(REG_BPLCON0) & BPLCON0_LACE;
// lace = CUSTOM_REG(REG_BPLCON0) & BPLCON0_LACE;
/* get default bitoffset */
switch(CUSTOM_REG(REG_FMODE) & 0x3)

View File

@ -34,8 +34,11 @@ static void gtia_state_postload(running_machine &machine);
/**********************************************
* split a color into hue and luminance values
**********************************************/
#define SPLIT_HUE_LUM(data,hue,lum) \
hue = (data & HUE); lum = (data & LUM)
#define SPLIT_HUE(data,hue) \
hue = (data & HUE)
#define SPLIT_LUM(data,lum) \
lum = (data & LUM)
/**********************************************
* set both color clocks equal for one color
@ -384,10 +387,13 @@ static void recalc_m3(void)
WRITE8_HANDLER( atari_gtia_w )
{
/* used for mixing hue/lum of different colors */
static UINT8 lumpm0=0,lumpm1=0,lumpm2=0,lumpm3=0,lumpm4=0;
static UINT8 lumpf1=0,lumpf2=0,lumbk= 0;
// static UINT8 lumpm0=0,lumpm1=0,lumpm2=0,lumpm3=0,lumpm4=0;
static UINT8 lumpf1=0;
// static UINT8 lumpf2=0;
// static UINT8 lumbk= 0;
static UINT8 huepm0=0,huepm1=0,huepm2=0,huepm3=0,huepm4=0;
static UINT8 huepf1=0,huepf2=0,huebk= 0;
// static UINT8 huepf1=0;
static UINT8 huepf2=0,huebk= 0;
switch (offset & 31)
{
@ -493,7 +499,7 @@ WRITE8_HANDLER( atari_gtia_w )
SETCOL_B(P000,data); /* set player 0 both pixels 0 */
SETCOL_L(P001,data); /* set player 0 left pixel 0 */
SETCOL_R(P010,data); /* set player 0 right pixel 0 */
SPLIT_HUE_LUM(data,huepm0,lumpm0);
SPLIT_HUE(data,huepm0);
data = huepm0 | lumpf1;
SETCOL_R(P001,data); /* set player 0 right pixel 1 */
SETCOL_L(P010,data); /* set player 0 left pixel 1 */
@ -513,7 +519,7 @@ WRITE8_HANDLER( atari_gtia_w )
SETCOL_B(P100,data); /* set player 1 both pixels 0 */
SETCOL_L(P101,data); /* set player 1 left pixel 0 */
SETCOL_R(P110,data); /* set player 1 right pixel 0 */
SPLIT_HUE_LUM(data,huepm1,lumpm1);
SPLIT_HUE(data,huepm1);
data = huepm1 | lumpf1;
SETCOL_R(P101,data); /* set player 1 right pixel 1 */
SETCOL_L(P110,data); /* set player 1 left pixel 1 */
@ -533,7 +539,7 @@ WRITE8_HANDLER( atari_gtia_w )
SETCOL_B(P200,data); /* set player 2 both pixels 0 */
SETCOL_L(P201,data); /* set player 2 left pixel 0 */
SETCOL_R(P210,data); /* set player 2 right pixel 0 */
SPLIT_HUE_LUM(data,huepm2,lumpm2);
SPLIT_HUE(data,huepm2);
data = huepm2 | lumpf1;
SETCOL_R(P201,data); /* set player 2 right pixel 1 */
SETCOL_L(P210,data); /* set player 2 left pixel 1 */
@ -553,7 +559,7 @@ WRITE8_HANDLER( atari_gtia_w )
SETCOL_B(P300,data); /* set player 3 both pixels 0 */
SETCOL_L(P301,data); /* set player 3 left pixel 0 */
SETCOL_R(P310,data); /* set player 3 right pixel 0 */
SPLIT_HUE_LUM(data,huepm3,lumpm3);
SPLIT_HUE(data,huepm3);
data = huepm3 | lumpf1;
SETCOL_R(P301,data); /* set player 3 right pixel 1 */
SETCOL_L(P310,data); /* set player 3 left pixel 1 */
@ -580,7 +586,7 @@ WRITE8_HANDLER( atari_gtia_w )
SETCOL_B(PF1,data); /* set playfield 1 color */
SETCOL_B(GT2+5,data); /* set GTIA mode 2 color 5 */
SPLIT_HUE_LUM(data,huepf1,lumpf1);
SPLIT_LUM(data,lumpf1);
data = huepf2 | lumpf1;
SETCOL_R(T01,data); /* set text mode right pixel 1 */
SETCOL_L(T10,data); /* set text mode left pixel 1 */
@ -623,7 +629,7 @@ WRITE8_HANDLER( atari_gtia_w )
SETCOL_B(T00,data); /* set text mode both pixels 0 */
SETCOL_L(T01,data); /* set text mode left pixel 0 */
SETCOL_R(T10,data); /* set text mode right pixel 0 */
SPLIT_HUE_LUM(data,huepf2,lumpf2);
SPLIT_HUE(data,huepf2);
data = huepf2 | lumpf1;
SETCOL_R(T01,data); /* set text mode right pixel 1 */
SETCOL_L(T10,data); /* set text mode left pixel 1 */
@ -642,7 +648,7 @@ WRITE8_HANDLER( atari_gtia_w )
SETCOL_B(P400,data); /* set p/m xor mode both pixels 0 */
SETCOL_L(P401,data); /* set p/m xor mode left pixel 0 */
SETCOL_R(P410,data); /* set p/m xor mode right pixel 0 */
SPLIT_HUE_LUM(data,huepm4,lumpm4);
SPLIT_HUE(data,huepm4);
data = huepm4 | lumpf1;
SETCOL_R(P401,data); /* set p/m xor mode right pixel 1 */
SETCOL_L(P410,data); /* set p/m xor mode left pixel 1 */
@ -668,7 +674,7 @@ WRITE8_HANDLER( atari_gtia_w )
SETCOL_B(G00,data); /* set 2 color graphics both pixels 0 */
SETCOL_L(G01,data); /* set 2 color graphics left pixel 0 */
SETCOL_R(G10,data); /* set 2 color graphics right pixel 0 */
SPLIT_HUE_LUM(data,huebk,lumbk);
SPLIT_HUE(data,huebk);
data = huebk | lumpf1;
SETCOL_R(G01,data); /* set 2 color graphics right pixel 1 */
SETCOL_L(G10,data); /* set 2 color graphics left pixel 1 */