mirror of
https://github.com/holub/mame
synced 2025-10-06 09:00:04 +03:00
fixed some cppcheck warnings about format identifiers and duplicated enum (nw)
This commit is contained in:
parent
de7371dc09
commit
670a36cbcd
@ -992,14 +992,6 @@ void esrip_device::tonr(UINT16 inst)
|
|||||||
TODI = 0x5
|
TODI = 0x5
|
||||||
};
|
};
|
||||||
|
|
||||||
enum
|
|
||||||
{
|
|
||||||
NRY = 0,
|
|
||||||
NRA = 1,
|
|
||||||
NRS = 4,
|
|
||||||
NRAS = 5,
|
|
||||||
};
|
|
||||||
|
|
||||||
UINT16 r = 0;
|
UINT16 r = 0;
|
||||||
UINT16 s = 0;
|
UINT16 s = 0;
|
||||||
UINT16 res = 0;
|
UINT16 res = 0;
|
||||||
|
@ -610,5 +610,5 @@ void memory_entry::report_unfreed()
|
|||||||
release_lock();
|
release_lock();
|
||||||
|
|
||||||
if (total > 0)
|
if (total > 0)
|
||||||
fprintf(stderr, "a total of %d bytes were not freed\n", total);
|
fprintf(stderr, "a total of %u bytes were not freed\n", total);
|
||||||
}
|
}
|
||||||
|
@ -65,7 +65,7 @@ static FLOPPY_CONSTRUCT( atarist_st_construct )
|
|||||||
geometry.tracks = tracks;
|
geometry.tracks = tracks;
|
||||||
geometry.sectors = sectors;
|
geometry.sectors = sectors;
|
||||||
|
|
||||||
if (LOG) LOG_FORMATS("ST Heads %u Tracks %u Sectors %u\n", heads, tracks, sectors);
|
if (LOG) LOG_FORMATS("ST Heads %d Tracks %d Sectors %d\n", heads, tracks, sectors);
|
||||||
|
|
||||||
return basicdsk_construct(floppy, &geometry);
|
return basicdsk_construct(floppy, &geometry);
|
||||||
}
|
}
|
||||||
|
@ -77,17 +77,17 @@ int bsize=0;
|
|||||||
}
|
}
|
||||||
|
|
||||||
SampleRate=get_leuint32(casdata+0x19);
|
SampleRate=get_leuint32(casdata+0x19);
|
||||||
LOG_FORMATS("Sample rate %d\n",SampleRate);
|
LOG_FORMATS("Sample rate %u\n",SampleRate);
|
||||||
|
|
||||||
NumberOfPulses=get_leuint32(casdata+0x1d);
|
NumberOfPulses=get_leuint32(casdata+0x1d);
|
||||||
LOG_FORMATS("Number Of Pulses %d\n",NumberOfPulses);
|
LOG_FORMATS("Number Of Pulses %u\n",NumberOfPulses);
|
||||||
|
|
||||||
|
|
||||||
CompressionType=casdata[0x21];
|
CompressionType=casdata[0x21];
|
||||||
Flags=casdata[0x22];
|
Flags=casdata[0x22];
|
||||||
HeaderExtensionLength=casdata[0x23];
|
HeaderExtensionLength=casdata[0x23];
|
||||||
|
|
||||||
LOG_FORMATS("CompressionType %d Flast %d HeaderExtensionLength %d\n",CompressionType,Flags,HeaderExtensionLength);
|
LOG_FORMATS("CompressionType %u Flast %u HeaderExtensionLength %u\n",CompressionType,Flags,HeaderExtensionLength);
|
||||||
|
|
||||||
mycaslen=caslen;
|
mycaslen=caslen;
|
||||||
//from here on down for now I am assuming it is compressed csw file.
|
//from here on down for now I am assuming it is compressed csw file.
|
||||||
@ -189,10 +189,10 @@ int i;
|
|||||||
LOG_FORMATS("Length %d\n",length);
|
LOG_FORMATS("Length %d\n",length);
|
||||||
|
|
||||||
SampleRate=get_leuint32(bytes+0x19);
|
SampleRate=get_leuint32(bytes+0x19);
|
||||||
LOG_FORMATS("Sample rate %d\n",SampleRate);
|
LOG_FORMATS("Sample rate %u\n",SampleRate);
|
||||||
|
|
||||||
NumberOfPulses=get_leuint32(bytes+0x1d);
|
NumberOfPulses=get_leuint32(bytes+0x1d);
|
||||||
LOG_FORMATS("Number Of Pulses %d\n",NumberOfPulses);
|
LOG_FORMATS("Number Of Pulses %u\n",NumberOfPulses);
|
||||||
|
|
||||||
CompressionType=bytes[0x21];
|
CompressionType=bytes[0x21];
|
||||||
Flags=bytes[0x22];
|
Flags=bytes[0x22];
|
||||||
@ -205,7 +205,7 @@ int i;
|
|||||||
Bit=100;
|
Bit=100;
|
||||||
}
|
}
|
||||||
|
|
||||||
LOG_FORMATS("CompressionType %d Flast %d HeaderExtensionLength %d\n",CompressionType,Flags,HeaderExtensionLength);
|
LOG_FORMATS("CompressionType %u Flast %u HeaderExtensionLength %u\n",CompressionType,Flags,HeaderExtensionLength);
|
||||||
|
|
||||||
|
|
||||||
//from here on down for now I am assuming it is compressed csw file.
|
//from here on down for now I am assuming it is compressed csw file.
|
||||||
|
@ -279,7 +279,7 @@ static int get_sector_error_code(floppy_image_legacy *floppy, int head, int dos_
|
|||||||
|
|
||||||
if (sector_error != ERROR_00)
|
if (sector_error != ERROR_00)
|
||||||
{
|
{
|
||||||
LOG_FORMATS("D64 error %s head %u track %u sector %u\n", ERROR_CODE[sector_error], head, dos_track, sector);
|
LOG_FORMATS("D64 error %s head %d track %d sector %d\n", ERROR_CODE[sector_error], head, dos_track, sector);
|
||||||
}
|
}
|
||||||
|
|
||||||
return sector_error;
|
return sector_error;
|
||||||
@ -725,8 +725,8 @@ FLOPPY_CONSTRUCT( d64_dsk_construct )
|
|||||||
tag->has_errors = has_errors;
|
tag->has_errors = has_errors;
|
||||||
|
|
||||||
LOG_FORMATS("D64 size: %04x\n", (UINT32)floppy_image_size(floppy));
|
LOG_FORMATS("D64 size: %04x\n", (UINT32)floppy_image_size(floppy));
|
||||||
LOG_FORMATS("D64 heads: %u\n", heads);
|
LOG_FORMATS("D64 heads: %d\n", heads);
|
||||||
LOG_FORMATS("D64 tracks: %u\n", dos_tracks);
|
LOG_FORMATS("D64 tracks: %d\n", dos_tracks);
|
||||||
LOG_FORMATS("D64 DOS version: %s\n", DOS_VERSION[dos]);
|
LOG_FORMATS("D64 DOS version: %s\n", DOS_VERSION[dos]);
|
||||||
LOG_FORMATS("D64 error codes: %s\n", has_errors ? "yes" : "no");
|
LOG_FORMATS("D64 error codes: %s\n", has_errors ? "yes" : "no");
|
||||||
|
|
||||||
@ -761,7 +761,7 @@ FLOPPY_CONSTRUCT( d64_dsk_construct )
|
|||||||
/* also store an error entry for each sector */
|
/* also store an error entry for each sector */
|
||||||
errors_size += DOS25_SECTORS_PER_TRACK[track];
|
errors_size += DOS25_SECTORS_PER_TRACK[track];
|
||||||
|
|
||||||
LOG_FORMATS("D64 head %u track %u offset %05x", head, track + 1, tag->track_offset[head][track]);
|
LOG_FORMATS("D64 head %d track %d offset %05x", head, track + 1, tag->track_offset[head][track]);
|
||||||
if (has_errors) LOG_FORMATS(" errors %05x", tag->error_offset[head][track]);
|
if (has_errors) LOG_FORMATS(" errors %05x", tag->error_offset[head][track]);
|
||||||
LOG_FORMATS(" speed %u\n", tag->speed_zone[track]);
|
LOG_FORMATS(" speed %u\n", tag->speed_zone[track]);
|
||||||
}
|
}
|
||||||
@ -793,7 +793,7 @@ FLOPPY_CONSTRUCT( d64_dsk_construct )
|
|||||||
errors_size += DOS2_SECTORS_PER_TRACK[track / 2];
|
errors_size += DOS2_SECTORS_PER_TRACK[track / 2];
|
||||||
}
|
}
|
||||||
|
|
||||||
LOG_FORMATS("D64 head %u track %.1f offset %05x", head, get_dos_track(track), tag->track_offset[head][track]);
|
LOG_FORMATS("D64 head %d track %.1f offset %05x", head, get_dos_track(track), tag->track_offset[head][track]);
|
||||||
if (has_errors) LOG_FORMATS(" errors %05x", tag->error_offset[head][track]);
|
if (has_errors) LOG_FORMATS(" errors %05x", tag->error_offset[head][track]);
|
||||||
LOG_FORMATS(" speed %u\n", tag->speed_zone[track]);
|
LOG_FORMATS(" speed %u\n", tag->speed_zone[track]);
|
||||||
}
|
}
|
||||||
@ -821,7 +821,7 @@ FLOPPY_CONSTRUCT( d64_dsk_construct )
|
|||||||
/* read errors */
|
/* read errors */
|
||||||
if (tag->has_errors)
|
if (tag->has_errors)
|
||||||
{
|
{
|
||||||
LOG_FORMATS("D64 error blocks: %u %u\n", errors_size, track_offset);
|
LOG_FORMATS("D64 error blocks: %d %d\n", errors_size, track_offset);
|
||||||
floppy_image_read(floppy, tag->error, track_offset, errors_size);
|
floppy_image_read(floppy, tag->error, track_offset, errors_size);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -261,7 +261,7 @@ FLOPPY_CONSTRUCT( fdi_dsk_construct )
|
|||||||
UINT8 type = header.track[track].type;
|
UINT8 type = header.track[track].type;
|
||||||
int size = header.track[track].size * 256;
|
int size = header.track[track].size * 256;
|
||||||
|
|
||||||
if (LOG) LOG_FORMATS("FDI track %u type %02x size %u offset %u\n", track, type, size, offset);
|
if (LOG) LOG_FORMATS("FDI track %d type %02x size %d offset %d\n", track, type, size, offset);
|
||||||
|
|
||||||
tag->track_offset[track] = offset;
|
tag->track_offset[track] = offset;
|
||||||
tag->track_type[track] = type;
|
tag->track_type[track] = type;
|
||||||
|
@ -90,15 +90,15 @@ static int primo_cassette_calculate_size_in_samples(const UINT8 *bytes, int leng
|
|||||||
while (i < length)
|
while (i < length)
|
||||||
{
|
{
|
||||||
size_in_samples += PRIMO_PAUSE_LENGTH;
|
size_in_samples += PRIMO_PAUSE_LENGTH;
|
||||||
LOG_FORMATS ("Samples (pause): %d\n", size_in_samples);
|
LOG_FORMATS ("Samples (pause): %u\n", size_in_samples);
|
||||||
|
|
||||||
size_in_samples += PRIMO_FILE_PILOT_LENGTH;
|
size_in_samples += PRIMO_FILE_PILOT_LENGTH;
|
||||||
LOG_FORMATS ("Samples (file pilot): %d\n", size_in_samples);
|
LOG_FORMATS ("Samples (file pilot): %u\n", size_in_samples);
|
||||||
|
|
||||||
/* file size with header */
|
/* file size with header */
|
||||||
file_size = *(b+1) + *(b+2)*256;
|
file_size = *(b+1) + *(b+2)*256;
|
||||||
b += 3;
|
b += 3;
|
||||||
LOG_FORMATS ("File size (with header): %d\n", file_size);
|
LOG_FORMATS ("File size (with header): %u\n", file_size);
|
||||||
|
|
||||||
/* b is now set on the first data byte of file
|
/* b is now set on the first data byte of file
|
||||||
it means first byte (type) of block */
|
it means first byte (type) of block */
|
||||||
@ -107,7 +107,7 @@ static int primo_cassette_calculate_size_in_samples(const UINT8 *bytes, int leng
|
|||||||
while (j < file_size-3)
|
while (j < file_size-3)
|
||||||
{
|
{
|
||||||
size_in_samples += PRIMO_BLOCK_PILOT_LENGTH;
|
size_in_samples += PRIMO_BLOCK_PILOT_LENGTH;
|
||||||
LOG_FORMATS ("Samples (block pilot): %d\n", size_in_samples);
|
LOG_FORMATS ("Samples (block pilot): %u\n", size_in_samples);
|
||||||
|
|
||||||
/* block size without header but including CRC byte */
|
/* block size without header but including CRC byte */
|
||||||
block_size = *(b+1) + *(b+2)*256;
|
block_size = *(b+1) + *(b+2)*256;
|
||||||
@ -121,9 +121,9 @@ static int primo_cassette_calculate_size_in_samples(const UINT8 *bytes, int leng
|
|||||||
size_in_samples += number_of_1 * PRIMO_BIT_1_LENGTH;
|
size_in_samples += number_of_1 * PRIMO_BIT_1_LENGTH;
|
||||||
size_in_samples += number_of_0 * PRIMO_BIT_0_LENGTH;
|
size_in_samples += number_of_0 * PRIMO_BIT_0_LENGTH;
|
||||||
|
|
||||||
LOG_FORMATS ("Samples (block data): %d\n", size_in_samples);
|
LOG_FORMATS ("Samples (block data): %u\n", size_in_samples);
|
||||||
|
|
||||||
LOG_FORMATS ("\tBlock size: %d\n", block_size);
|
LOG_FORMATS ("\tBlock size: %u\n", block_size);
|
||||||
|
|
||||||
b += block_size;
|
b += block_size;
|
||||||
|
|
||||||
@ -169,7 +169,7 @@ static int primo_cassette_fill_wave(INT16 *buffer, int length, UINT8 *bytes)
|
|||||||
file_size = *(b+1) + *(b+2)*256;
|
file_size = *(b+1) + *(b+2)*256;
|
||||||
b += 3;
|
b += 3;
|
||||||
|
|
||||||
LOG_FORMATS ("File size: %d\n", file_size);
|
LOG_FORMATS ("File size: %u\n", file_size);
|
||||||
|
|
||||||
/* b is now set on the first data byte of file
|
/* b is now set on the first data byte of file
|
||||||
it means first byte (block type) of block header */
|
it means first byte (block type) of block header */
|
||||||
|
@ -229,7 +229,7 @@ static UINT32 parse_wav_sample(const char *filename, UINT32 *dataoffs)
|
|||||||
if (temp16 != 1)
|
if (temp16 != 1)
|
||||||
{
|
{
|
||||||
osd_close(file);
|
osd_close(file);
|
||||||
printf("ERROR: unsupported format %d - only PCM is supported (%s)\n", temp16, filename);
|
printf("ERROR: unsupported format %u - only PCM is supported (%s)\n", temp16, filename);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -240,7 +240,7 @@ static UINT32 parse_wav_sample(const char *filename, UINT32 *dataoffs)
|
|||||||
if (temp16 != 2)
|
if (temp16 != 2)
|
||||||
{
|
{
|
||||||
osd_close(file);
|
osd_close(file);
|
||||||
printf("ERROR: unsupported number of channels %d - only stereo is supported (%s)\n", temp16, filename);
|
printf("ERROR: unsupported number of channels %u - only stereo is supported (%s)\n", temp16, filename);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -265,7 +265,7 @@ static UINT32 parse_wav_sample(const char *filename, UINT32 *dataoffs)
|
|||||||
if (bits != 16)
|
if (bits != 16)
|
||||||
{
|
{
|
||||||
osd_close(file);
|
osd_close(file);
|
||||||
printf("ERROR: unsupported bits/sample %d - only 16 is supported (%s)\n", bits, filename);
|
printf("ERROR: unsupported bits/sample %u - only 16 is supported (%s)\n", bits, filename);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -181,14 +181,14 @@ static void process_field(jed_data *data, const UINT8 *cursrc, const UINT8 *srce
|
|||||||
/* read the fuse number */
|
/* read the fuse number */
|
||||||
cursrc++;
|
cursrc++;
|
||||||
curfuse = suck_number(&cursrc);
|
curfuse = suck_number(&cursrc);
|
||||||
if (LOG_PARSE) printf("L%d\n", curfuse);
|
if (LOG_PARSE) printf("L%u\n", curfuse);
|
||||||
|
|
||||||
/* read digits, skipping delimiters */
|
/* read digits, skipping delimiters */
|
||||||
for ( ; cursrc < srcend; cursrc++)
|
for ( ; cursrc < srcend; cursrc++)
|
||||||
if (*cursrc == '0' || *cursrc == '1')
|
if (*cursrc == '0' || *cursrc == '1')
|
||||||
{
|
{
|
||||||
jed_set_fuse(data, curfuse, *cursrc - '0');
|
jed_set_fuse(data, curfuse, *cursrc - '0');
|
||||||
if (LOG_PARSE) printf(" fuse %d = %d\n", curfuse, 0);
|
if (LOG_PARSE) printf(" fuse %u = %d\n", curfuse, 0);
|
||||||
if (curfuse >= data->numfuses)
|
if (curfuse >= data->numfuses)
|
||||||
data->numfuses = curfuse + 1;
|
data->numfuses = curfuse + 1;
|
||||||
curfuse++;
|
curfuse++;
|
||||||
|
Loading…
Reference in New Issue
Block a user