Eliminated many warnings

This commit is contained in:
fabio.olimpieri 2011-11-06 17:40:21 +00:00
parent 00cae640b6
commit 02d1afc023
10 changed files with 52 additions and 50 deletions

View File

@ -162,6 +162,7 @@ dist:uae.dol
echo "dummy" > $@/uae/roms/put-your-kick-dot-rom-here
echo "dummy" > $@/uae/floppies/dummy
echo "dummy" > $@/uae/harddisks/dummy
echo "dummy" > $@/uae/harddir/dummy
echo "dummy" > $@/uae/saves/dummy
cp $< $@/apps/uae/boot.dol
cp meta.xml $@/apps/uae/

View File

@ -228,10 +228,10 @@ void build_blitfilltable (void)
static void blitter_dump (void)
{
write_log ("APT=%08.8X BPT=%08.8X CPT=%08.8X DPT=%08.8X\n", bltapt, bltbpt, bltcpt, bltdpt);
write_log ("CON0=%04.4X CON1=%04.4X ADAT=%04.4X BDAT=%04.4X CDAT=%04.4X\n",
write_log ("APT=%#8.8X BPT=%#8.8X CPT=%#8.8X DPT=%#8.8X\n", bltapt, bltbpt, bltcpt, bltdpt);
write_log ("CON0=%#4.4X CON1=%#4.4X ADAT=%#4.4X BDAT=%#4.4X CDAT=%#4.4X\n",
bltcon0, bltcon1, blt_info.bltadat, blt_info.bltbdat, blt_info.bltcdat);
write_log ("AFWM=%04.4X ALWM=%04.4X AMOD=%04.4X BMOD=%04.4X CMOD=%04.4X DMOD=%04.4X\n",
write_log ("AFWM=%#4.4X ALWM=%#4.4X AMOD=%#4.4X BMOD=%#4.4X CMOD=%#4.4X DMOD=%#4.4X\n",
blt_info.bltafwm, blt_info.bltalwm,
blt_info.bltamod & 0xffff, blt_info.bltbmod & 0xffff, blt_info.bltcmod & 0xffff, blt_info.bltdmod & 0xffff);
}
@ -928,7 +928,7 @@ static void blit_bltset (unsigned int con)
if (blitline) {
if (blt_info.hblitsize != 2)
write_log ("weird hblitsize in linemode: %d vsize=%d PC%=%x\n",
write_log ("weird hblitsize in linemode: %d vsize=%d PC=%x\n",
blt_info.hblitsize, blt_info.vblitsize, m68k_getpc (&regs));
blit_diag = blit_cycle_diagram_line;
} else {

View File

@ -427,7 +427,7 @@ void CIA_vsync_handler ()
if (tod_hack_delay == 0) {
tod_hack_reset ();
tod_hack_delay = 0;
write_log ("TOD_HACK re-initialized CIATOD=%06.6X\n", ciaatod);
write_log ("TOD_HACK re-initialized CIATOD=%#6.6lX\n", ciaatod);
}
}
if (tod_hack_delay == 0) {
@ -1027,13 +1027,13 @@ void CIA_reset (void)
void dumpcia (void)
{
write_log ("A: CRA %02x CRB %02x ICR %02x IM %02x TA %04x (%04x) TB %04x (%04x)\n",
write_log ("A: CRA %02x CRB %02x ICR %02x IM %02x TA %04lx (%04lx) TB %04lx (%04lx)\n",
ciaacra, ciaacrb, ciaaicr, ciaaimask, ciaata, ciaala, ciaatb, ciaalb);
write_log ("TOD %06x ALARM %06x %c%c\n",
write_log ("TOD %06lx ALARM %06lx %c%c\n",
ciaatod, ciaaalarm, ciaatlatch ? 'L' : ' ', ciaatodon ? ' ' : 'S');
write_log ("B: CRA %02x CRB %02x ICR %02x IM %02x TA %04x (%04x) TB %04x (%04x)\n",
write_log ("B: CRA %02x CRB %02x ICR %02x IM %02x TA %04lx (%04lx) TB %04lx (%04lx)\n",
ciabcra, ciabcrb, ciaaicr, ciabimask, ciabta, ciabla, ciabtb, ciablb);
write_log ("TOD %06x ALARM %06x %c%c\n",
write_log ("TOD %06lx ALARM %06lx %c%c\n",
ciabtod, ciabalarm, ciabtlatch ? 'L' : ' ', ciabtodon ? ' ' : 'S');
}

View File

@ -2206,10 +2206,10 @@ static void dumpsync (void)
if (cnt < 0)
return;
cnt--;
write_log ("BEAMCON0 = %04.4X VTOTAL=%04.4X HTOTAL=%04.4X\n", new_beamcon0, vtotal, htotal);
write_log ("HSSTOP=%04.4X HBSTRT=%04.4X HBSTOP=%04.4X\n", hsstop, hbstrt, hbstop);
write_log ("VSSTOP=%04.4X VBSTRT=%04.4X VBSTOP=%04.4X\n", vsstop, vbstrt, vbstop);
write_log ("HSSTRT=%04.4X VSSTRT=%04.4X HCENTER=%04.4X\n", hsstrt, vsstrt, hcenter);
write_log ("BEAMCON0 = %#4.4X VTOTAL=%#4.4X HTOTAL=%#4.4X\n", new_beamcon0, vtotal, htotal);
write_log ("HSSTOP=%#4.4X HBSTRT=%#4.4X HBSTOP=%#4.4X\n", hsstop, hbstrt, hbstop);
write_log ("VSSTOP=%#4.4X VBSTRT=%#4.4X VBSTOP=%#4.4X\n", vsstop, vbstrt, vbstop);
write_log ("HSSTRT=%#4.4X VSSTRT=%#4.4X HCENTER=%#4.4X\n", hsstrt, vsstrt, hcenter);
}
/* set PAL or NTSC timing variables */
@ -2715,7 +2715,7 @@ static void BEAMCON0 (uae_u16 v)
if (v != new_beamcon0) {
new_beamcon0 = v;
if (v & ~0x20)
write_log ("warning: %04.4X written to BEAMCON0\n", v);
write_log ("warning: %#4.4X written to BEAMCON0\n", v);
}
}
}
@ -3450,9 +3450,9 @@ static void dump_copper (const char *error, unsigned int until_hpos)
warned--;
write_log("%s: vpos=%d until_hpos=%d\n",
error, vpos, until_hpos);
write_log("cvcmp=%d chcmp=%d chpos=%d cvpos=%d ci1=%04.4X ci2=%04.4X\n",
write_log("cvcmp=%d chcmp=%d chpos=%d cvpos=%d ci1=%#4.4X ci2=%#4.4X\n",
cop_state.vcmp,cop_state.hcmp,cop_state.hpos,cop_state.vpos,cop_state.saved_i1,cop_state.saved_i2);
write_log("cstate=%d ip=%08.8X ev_copper=%d\n",
write_log("cstate=%d ip=%#8.8X ev_copper=%d\n",
cop_state.state,cop_state.ip,eventtab[ev_copper].active);
}
@ -5138,7 +5138,7 @@ void REGPARAM2 custom_bput (uaecptr addr, uae_u32 value)
custom_wput (addr & ~1, rval);
if (warned < 10) {
if (m68k_getpc (&regs) < 0xe00000 || m68k_getpc (&regs) >= 0x10000000) {
write_log ("Byte put to custom register %04.4X PC=%08.8X\n", addr, m68k_getpc (&regs));
write_log ("Byte put to custom register %#4.4X PC=%#8.8X\n", addr, m68k_getpc (&regs));
warned++;
}
}

View File

@ -1676,7 +1676,7 @@ static int drive_write_pcdos (drive *drv)
continue;
}
if (mark != 0xfb) {
write_log ("PCDOS: track %d: unknown address mark %02.2X\n", drv->cyl * 2 + side, mark);
write_log ("PCDOS: track %d: unknown address mark %#2.2X\n", drv->cyl * 2 + side, mark);
continue;
}
if (sector < 0)
@ -2133,7 +2133,7 @@ void DISK_select (uae_u8 data)
static unsigned int step;
if (disk_debug_logging > 1)
write_log ("%08.8X %02.2X %s", m68k_getpc (&regs), data, tobin (data));
write_log ("%#8.8X %#2.2X %s", m68k_getpc (&regs), data, tobin (data));
lastselected = selected;
selected = (data >> 3) & 15;
@ -2152,7 +2152,7 @@ void DISK_select (uae_u8 data)
}
if (disk_debug_logging > 1) {
write_log (" %d%d%d%d% ", (selected & 1) ? 0 : 1, (selected & 2) ? 0 : 1, (selected & 4) ? 0 : 1, (selected & 8) ? 0 : 1);
write_log (" %d%d%d%d ", (selected & 1) ? 0 : 1, (selected & 2) ? 0 : 1, (selected & 4) ? 0 : 1, (selected & 8) ? 0 : 1);
if ((prevdata & 0x80) != (data & 0x80))
write_log (" dskmotor %d ", (data & 0x80) ? 1 : 0);
if ((prevdata & 0x02) != (data & 0x02))
@ -2294,7 +2294,7 @@ void dumpdisk (void)
drive_writeprotected (drv) ? "ro" : "rw", drv->mfmpos, drv->tracklen);
w = word;
for (j = 0; j < 15; j++) {
write_log ("%04.4X ", w);
write_log ("%#4.4X ", w);
for (k = 0; k < 16; k++) {
w <<= 1;
w |= getonebit (drv->bigmfmbuf, drv->mfmpos + j * 16 + k);
@ -2303,7 +2303,7 @@ void dumpdisk (void)
write_log ("\n");
}
}
write_log ("side %d, dma %d, bitoffset %d, word %04.4X, dskbytr %04.4X adkcon %04.4X dsksync %04.4X\n", side, dskdmaen, bitoffset, word, dskbytr_val, adkcon, dsksync);
write_log ("side %d, dma %d, bitoffset %d, word %#4.4X, dskbytr %#4.4X adkcon %#4.4X dsksync %#4.4X\n", side, dskdmaen, bitoffset, word, dskbytr_val, adkcon, dsksync);
}
static void disk_dmafinished (void)
@ -2313,7 +2313,7 @@ static void disk_dmafinished (void)
dskdmaen = 0;
if (disk_debug_logging > 0) {
unsigned int dr;
write_log ("disk dma finished %08.8X MFMpos=", dskpt);
write_log ("disk dma finished %#8.8X MFMpos=", dskpt);
for (dr = 0; dr < MAX_FLOPPY_DRIVES; dr++)
write_log ("%d%s", floppy[dr].mfmpos, dr < MAX_FLOPPY_DRIVES - 1 ? "," : "");
write_log ("\n");
@ -2596,7 +2596,7 @@ static void disk_doupdate_read (drive * drv, int floppybits)
static void disk_dma_debugmsg (void)
{
write_log ("LEN=%04.4X (%d) SYNC=%04.4X PT=%08.8X ADKCON=%04.4X PC=%08.8X\n",
write_log ("LEN=%#4.4X (%d) SYNC=%#4.4X PT=%#8.8X ADKCON=%#4.4X PC=%#8.8X\n",
dsklength, dsklength, (adkcon & 0x400) ? dsksync : 0xffff, dskpt, adkcon, m68k_getpc (&regs));
}
@ -2634,7 +2634,7 @@ uae_u16 DSKBYTR (unsigned int hpos)
if (dsklen & 0x4000)
v |= 0x2000;
if (disk_debug_logging > 1)
write_log ("DSKBYTR=%04.4X hpos=%d\n", v, hpos);
write_log ("DSKBYTR=%#4.4X hpos=%d\n", v, hpos);
#ifdef DEBUGGER
if (disk_debug_mode & DISK_DEBUG_PIO) {
unsigned int dr;
@ -2921,7 +2921,7 @@ void DSKDAT (uae_u16 v)
static int count = 0;
if (count < 5) {
count++;
write_log ("%04.4X written to DSKDAT. Not good. PC=%08.8X", v, m68k_getpc (&regs));
write_log ("%#4.4X written to DSKDAT. Not good. PC=%#8.8X", v, m68k_getpc (&regs));
if (count == 5)
write_log ("(further messages suppressed)");

View File

@ -290,30 +290,30 @@ static USHORT Process_Track(struct zfile *fi, struct zfile *fo, UCHAR *b1, UCHAR
if ((cmd == CMD_UNPACK) && (number<80) && (unpklen>2048)) {
r = Unpack_Track(b1, b2, pklen2, unpklen, cmode, flags);
if (r != NO_PROBLEM)
if (pwd)
{if (pwd)
return ERR_BADPASSWD;
else
return r;
return r;}
if (usum != Calc_CheckSum(b2,(ULONG)unpklen))
if (pwd)
{if (pwd)
return ERR_BADPASSWD;
else
return ERR_CSUM;
return ERR_CSUM;}
if (zfile_fwrite(b2,1,(size_t)unpklen,fo) != unpklen) return ERR_CANTWRITE;
}
if ((cmd == CMD_SHOWBANNER) && (number == 0xffff)){
r = Unpack_Track(b1, b2, pklen2, unpklen, cmode, flags);
if (r != NO_PROBLEM)
if (pwd)
{if (pwd)
return ERR_BADPASSWD;
else
return r;
return r;}
if (usum != Calc_CheckSum(b2,(ULONG)unpklen))
if (pwd)
{if (pwd)
return ERR_BADPASSWD;
else
return ERR_CSUM;
return ERR_CSUM;}
printbandiz(b2,unpklen);
}

View File

@ -905,7 +905,7 @@ static const char *menu_select_file_internal(const char *dir_path,
const char **file_list = get_file_list(dir_path);
char *sel;
char *out;
char *ptr_selected_file;
const char *ptr_selected_file;
int opt;
int i;
char buf[64];

View File

@ -264,7 +264,7 @@ static int handle_scsi (uaecptr request, struct hardfiledata *hfd)
break;
default:
lr = -1;
write_log ("UAEHF: unsupported scsi command 0x%02.2X\n", cmd);
write_log ("UAEHF: unsupported scsi command %#2.2X\n", cmd);
status = 2; /* CHECK CONDITION */
s[0] = 0x70;
s[2] = 5; /* ILLEGAL REQUEST */
@ -492,13 +492,13 @@ static void getchs (struct hardfiledata *hfd, int *cyl, int *cylsec, int *head,
static void outofbounds (int cmd, uae_u64 offset, uae_u64 len, uae_u64 max)
{
write_log ("UAEHF: cmd %d: out of bounds, %08.8X-%08.8X + %08.8X-%08.8X > %08.8X-%08.8X\n", cmd,
write_log ("UAEHF: cmd %d: out of bounds, %#8.8X-%#8.8X + %#8.8X-%#8.8X > %#8.8X-%#8.8X\n", cmd,
(uae_u32)(offset >> 32),(uae_u32)offset,(uae_u32)(len >> 32),(uae_u32)len,
(uae_u32)(max >> 32),(uae_u32)max);
}
static void unaligned (int cmd, uae_u64 offset, uae_u64 len, int blocksize)
{
write_log ("UAEHF: cmd %d: unaligned access, %08.8X-%08.8X, %08.8X-%08.8X, %08.8X\n", cmd,
write_log ("UAEHF: cmd %d: unaligned access, %#8.8X-%#8.8X, %#8.8X-%#8.8X, %#8.8X\n", cmd,
(uae_u32)(offset >> 32),(uae_u32)offset,(uae_u32)(len >> 32),(uae_u32)len,
blocksize);
}

View File

@ -884,9 +884,9 @@ uae_u8 REGPARAM2 *default_xlate (uaecptr a)
write_log ("Your Amiga program just did something terribly stupid %p PC=%p\n", a, m68k_getpc (&regs));
m68k_dumpstate (0, 0);
for (i = 0; i < 10; i++) {
write_log ("%08.8X ", i >= 5 ? a3 : a2);
write_log ("%#8.8X ", i >= 5 ? a3 : a2);
for (j = 0; j < 16; j += 2) {
write_log (" %04.4X", get_word (i >= 5 ? a3 : a2));
write_log (" %#4.4X", get_word (i >= 5 ? a3 : a2));
if (i >= 5) a3 +=2; else a2 += 2;
}
write_log ("\n");
@ -1191,7 +1191,7 @@ static int load_kickstart (void)
!memcmp (kickmemory + i, kickshift2, sizeof (kickshift2)) ||
!memcmp (kickmemory + i, kickshift3, sizeof (kickshift3))) {
kickmemory[i + 2] = 0x30;
write_log ("Kickstart KickShifted @%04.4X\n", i);
write_log ("Kickstart KickShifted @ %#4.4X\n", i);
}
}
kickstart_fix_checksum (kickmemory, kickmem_size);

View File

@ -164,7 +164,7 @@ local int unzlocal_getShort (fin,pX)
uLong x ;
int i;
int err;
i=0;
err = unzlocal_getByte(fin,&i);
x = (uLong)i;
@ -186,6 +186,7 @@ local int unzlocal_getLong (fin,pX)
uLong x ;
int i;
int err;
i=0;
err = unzlocal_getByte(fin,&i);
x = (uLong)i;
@ -528,10 +529,10 @@ local int unzlocal_GetCurrentFileInfoInternal (file,
/* we check the magic */
if (err==UNZ_OK)
if (unzlocal_getLong(s->file,&uMagic) != UNZ_OK)
{if (unzlocal_getLong(s->file,&uMagic) != UNZ_OK)
err=UNZ_ERRNO;
else if (uMagic!=0x02014b50)
err=UNZ_BADZIPFILE;
err=UNZ_BADZIPFILE;}
if (unzlocal_getShort(s->file,&file_info.version) != UNZ_OK)
err=UNZ_ERRNO;
@ -608,10 +609,10 @@ local int unzlocal_GetCurrentFileInfoInternal (file,
uSizeRead = extraFieldBufferSize;
if (lSeek!=0)
if (zfile_fseek(s->file,lSeek,SEEK_CUR)==0)
{if (zfile_fseek(s->file,lSeek,SEEK_CUR)==0)
lSeek=0;
else
err=UNZ_ERRNO;
err=UNZ_ERRNO;}
if ((file_info.size_file_extra>0) && (extraFieldBufferSize>0))
if (zfile_fread(extraField,(uInt)uSizeRead,1,s->file)!=1)
err=UNZ_ERRNO;
@ -633,10 +634,10 @@ local int unzlocal_GetCurrentFileInfoInternal (file,
uSizeRead = commentBufferSize;
if (lSeek!=0)
if (zfile_fseek(s->file,lSeek,SEEK_CUR)==0)
{if (zfile_fseek(s->file,lSeek,SEEK_CUR)==0)
lSeek=0;
else
err=UNZ_ERRNO;
err=UNZ_ERRNO;}
if ((file_info.size_file_comment>0) && (commentBufferSize>0))
if (zfile_fread(szComment,(uInt)uSizeRead,1,s->file)!=1)
err=UNZ_ERRNO;
@ -817,10 +818,10 @@ local int unzlocal_CheckCurrentFileCoherencyHeader (s,piSizeVar,
if (err==UNZ_OK)
if (unzlocal_getLong(s->file,&uMagic) != UNZ_OK)
{if (unzlocal_getLong(s->file,&uMagic) != UNZ_OK)
err=UNZ_ERRNO;
else if (uMagic!=0x04034b50)
err=UNZ_BADZIPFILE;
err=UNZ_BADZIPFILE;}
if (unzlocal_getShort(s->file,&uData) != UNZ_OK)
err=UNZ_ERRNO;