diff options
author | 2013-01-06 19:14:29 +0000 | |
---|---|---|
committer | 2013-01-06 19:14:29 +0000 | |
commit | 670a36cbcd2c66f6e8af4167269cc5b030ebf05b (patch) | |
tree | ecb597e4b80d36bf45df012d8e423a3e60bb4d29 /src/lib | |
parent | de7371dc0938afede2ec8fa955cb32b78dd7a14d (diff) |
fixed some cppcheck warnings about format identifiers and duplicated enum (nw)
Diffstat (limited to 'src/lib')
-rw-r--r-- | src/lib/formats/atarist_dsk.c | 2 | ||||
-rw-r--r-- | src/lib/formats/csw_cas.c | 12 | ||||
-rw-r--r-- | src/lib/formats/d64_dsk.c | 12 | ||||
-rw-r--r-- | src/lib/formats/fdi_dsk.c | 2 | ||||
-rw-r--r-- | src/lib/formats/primoptp.c | 14 | ||||
-rw-r--r-- | src/lib/util/chdcd.c | 6 | ||||
-rw-r--r-- | src/lib/util/jedparse.c | 4 |
7 files changed, 26 insertions, 26 deletions
diff --git a/src/lib/formats/atarist_dsk.c b/src/lib/formats/atarist_dsk.c index 797ca32aac4..7901ba2a55d 100644 --- a/src/lib/formats/atarist_dsk.c +++ b/src/lib/formats/atarist_dsk.c @@ -65,7 +65,7 @@ static FLOPPY_CONSTRUCT( atarist_st_construct ) geometry.tracks = tracks; 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); } diff --git a/src/lib/formats/csw_cas.c b/src/lib/formats/csw_cas.c index 13ba77faca6..575e0e80499 100644 --- a/src/lib/formats/csw_cas.c +++ b/src/lib/formats/csw_cas.c @@ -77,17 +77,17 @@ int bsize=0; } SampleRate=get_leuint32(casdata+0x19); - LOG_FORMATS("Sample rate %d\n",SampleRate); + LOG_FORMATS("Sample rate %u\n",SampleRate); NumberOfPulses=get_leuint32(casdata+0x1d); - LOG_FORMATS("Number Of Pulses %d\n",NumberOfPulses); + LOG_FORMATS("Number Of Pulses %u\n",NumberOfPulses); CompressionType=casdata[0x21]; Flags=casdata[0x22]; 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; //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); SampleRate=get_leuint32(bytes+0x19); - LOG_FORMATS("Sample rate %d\n",SampleRate); + LOG_FORMATS("Sample rate %u\n",SampleRate); NumberOfPulses=get_leuint32(bytes+0x1d); - LOG_FORMATS("Number Of Pulses %d\n",NumberOfPulses); + LOG_FORMATS("Number Of Pulses %u\n",NumberOfPulses); CompressionType=bytes[0x21]; Flags=bytes[0x22]; @@ -205,7 +205,7 @@ int i; 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. diff --git a/src/lib/formats/d64_dsk.c b/src/lib/formats/d64_dsk.c index b631f9490e6..aa5936ebce7 100644 --- a/src/lib/formats/d64_dsk.c +++ b/src/lib/formats/d64_dsk.c @@ -279,7 +279,7 @@ static int get_sector_error_code(floppy_image_legacy *floppy, int head, int dos_ 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; @@ -725,8 +725,8 @@ FLOPPY_CONSTRUCT( d64_dsk_construct ) tag->has_errors = has_errors; LOG_FORMATS("D64 size: %04x\n", (UINT32)floppy_image_size(floppy)); - LOG_FORMATS("D64 heads: %u\n", heads); - LOG_FORMATS("D64 tracks: %u\n", dos_tracks); + LOG_FORMATS("D64 heads: %d\n", heads); + LOG_FORMATS("D64 tracks: %d\n", dos_tracks); LOG_FORMATS("D64 DOS version: %s\n", DOS_VERSION[dos]); 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 */ 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]); 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]; } - 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]); LOG_FORMATS(" speed %u\n", tag->speed_zone[track]); } @@ -821,7 +821,7 @@ FLOPPY_CONSTRUCT( d64_dsk_construct ) /* read 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); } else diff --git a/src/lib/formats/fdi_dsk.c b/src/lib/formats/fdi_dsk.c index d431be0fd1f..04ec14357df 100644 --- a/src/lib/formats/fdi_dsk.c +++ b/src/lib/formats/fdi_dsk.c @@ -261,7 +261,7 @@ FLOPPY_CONSTRUCT( fdi_dsk_construct ) UINT8 type = header.track[track].type; 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_type[track] = type; diff --git a/src/lib/formats/primoptp.c b/src/lib/formats/primoptp.c index 8d7d40883ef..b145aa1d7b0 100644 --- a/src/lib/formats/primoptp.c +++ b/src/lib/formats/primoptp.c @@ -90,15 +90,15 @@ static int primo_cassette_calculate_size_in_samples(const UINT8 *bytes, int leng while (i < 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; - 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 = *(b+1) + *(b+2)*256; 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 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) { 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 = *(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_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; @@ -169,7 +169,7 @@ static int primo_cassette_fill_wave(INT16 *buffer, int length, UINT8 *bytes) file_size = *(b+1) + *(b+2)*256; 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 it means first byte (block type) of block header */ diff --git a/src/lib/util/chdcd.c b/src/lib/util/chdcd.c index 12b61259f6d..3a6c272a22a 100644 --- a/src/lib/util/chdcd.c +++ b/src/lib/util/chdcd.c @@ -229,7 +229,7 @@ static UINT32 parse_wav_sample(const char *filename, UINT32 *dataoffs) if (temp16 != 1) { 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; } @@ -240,7 +240,7 @@ static UINT32 parse_wav_sample(const char *filename, UINT32 *dataoffs) if (temp16 != 2) { 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; } @@ -265,7 +265,7 @@ static UINT32 parse_wav_sample(const char *filename, UINT32 *dataoffs) if (bits != 16) { 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; } diff --git a/src/lib/util/jedparse.c b/src/lib/util/jedparse.c index fef7d2894ba..e2eb36f7ea5 100644 --- a/src/lib/util/jedparse.c +++ b/src/lib/util/jedparse.c @@ -181,14 +181,14 @@ static void process_field(jed_data *data, const UINT8 *cursrc, const UINT8 *srce /* read the fuse 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 */ for ( ; cursrc < srcend; cursrc++) if (*cursrc == '0' || *cursrc == '1') { 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) data->numfuses = curfuse + 1; curfuse++; |