Previous 199869 Revisions Next

r20110 Sunday 6th January, 2013 at 19:14:29 UTC by Oliver Stöneberg
fixed some cppcheck warnings about format identifiers and duplicated enum (nw)
[src/emu]emualloc.c
[src/emu/cpu/esrip]esrip.c
[src/lib/formats]atarist_dsk.c csw_cas.c d64_dsk.c fdi_dsk.c primoptp.c
[src/lib/util]chdcd.c jedparse.c

trunk/src/emu/cpu/esrip/esrip.c
r20109r20110
992992      TODI  = 0x5
993993   };
994994
995   enum
996   {
997      NRY = 0,
998      NRA = 1,
999      NRS = 4,
1000      NRAS = 5,
1001   };
1002
1003995   UINT16 r = 0;
1004996   UINT16 s = 0;
1005997   UINT16   res = 0;
trunk/src/emu/emualloc.c
r20109r20110
610610   release_lock();
611611
612612   if (total > 0)
613      fprintf(stderr, "a total of %d bytes were not freed\n", total);
613      fprintf(stderr, "a total of %u bytes were not freed\n", total);
614614}
trunk/src/lib/formats/fdi_dsk.c
r20109r20110
261261      UINT8 type = header.track[track].type;
262262      int size = header.track[track].size * 256;
263263
264      if (LOG) LOG_FORMATS("FDI track %u type %02x size %u offset %u\n", track, type, size, offset);
264      if (LOG) LOG_FORMATS("FDI track %d type %02x size %d offset %d\n", track, type, size, offset);
265265
266266      tag->track_offset[track] = offset;
267267      tag->track_type[track] = type;
trunk/src/lib/formats/atarist_dsk.c
r20109r20110
6565   geometry.tracks = tracks;
6666   geometry.sectors = sectors;
6767
68   if (LOG) LOG_FORMATS("ST Heads %u Tracks %u Sectors %u\n", heads, tracks, sectors);
68   if (LOG) LOG_FORMATS("ST Heads %d Tracks %d Sectors %d\n", heads, tracks, sectors);
6969
7070   return basicdsk_construct(floppy, &geometry);
7171}
trunk/src/lib/formats/primoptp.c
r20109r20110
9090   while (i < length)
9191   {
9292      size_in_samples += PRIMO_PAUSE_LENGTH;
93      LOG_FORMATS ("Samples (pause): %d\n", size_in_samples);
93      LOG_FORMATS ("Samples (pause): %u\n", size_in_samples);
9494
9595      size_in_samples += PRIMO_FILE_PILOT_LENGTH;
96      LOG_FORMATS ("Samples (file pilot): %d\n", size_in_samples);
96      LOG_FORMATS ("Samples (file pilot): %u\n", size_in_samples);
9797
9898      /* file size with header */
9999      file_size = *(b+1) + *(b+2)*256;
100100      b += 3;
101      LOG_FORMATS ("File size (with header): %d\n", file_size);
101      LOG_FORMATS ("File size (with header): %u\n", file_size);
102102
103103      /* b is now set on the first data byte of file
104104           it means first byte (type) of block */
r20109r20110
107107      while (j < file_size-3)
108108      {
109109         size_in_samples += PRIMO_BLOCK_PILOT_LENGTH;
110         LOG_FORMATS ("Samples (block pilot): %d\n", size_in_samples);
110         LOG_FORMATS ("Samples (block pilot): %u\n", size_in_samples);
111111
112112         /* block size without header but including CRC byte */
113113         block_size = *(b+1) + *(b+2)*256;
r20109r20110
121121         size_in_samples += number_of_1 * PRIMO_BIT_1_LENGTH;
122122         size_in_samples += number_of_0 * PRIMO_BIT_0_LENGTH;
123123
124         LOG_FORMATS ("Samples (block data): %d\n", size_in_samples);
124         LOG_FORMATS ("Samples (block data): %u\n", size_in_samples);
125125
126         LOG_FORMATS ("\tBlock size: %d\n", block_size);
126         LOG_FORMATS ("\tBlock size: %u\n", block_size);
127127
128128         b += block_size;
129129
r20109r20110
169169      file_size = *(b+1) + *(b+2)*256;
170170      b += 3;
171171
172      LOG_FORMATS ("File size: %d\n", file_size);
172      LOG_FORMATS ("File size: %u\n", file_size);
173173
174174      /* b is now set on the first data byte of file
175175           it means first byte (block type) of block header */
trunk/src/lib/formats/csw_cas.c
r20109r20110
7777   }
7878
7979   SampleRate=get_leuint32(casdata+0x19);
80   LOG_FORMATS("Sample rate %d\n",SampleRate);
80   LOG_FORMATS("Sample rate %u\n",SampleRate);
8181
8282   NumberOfPulses=get_leuint32(casdata+0x1d);
83   LOG_FORMATS("Number Of Pulses %d\n",NumberOfPulses);
83   LOG_FORMATS("Number Of Pulses %u\n",NumberOfPulses);
8484
8585
8686   CompressionType=casdata[0x21];
8787   Flags=casdata[0x22];
8888   HeaderExtensionLength=casdata[0x23];
8989
90   LOG_FORMATS("CompressionType %d   Flast %d   HeaderExtensionLength %d\n",CompressionType,Flags,HeaderExtensionLength);
90   LOG_FORMATS("CompressionType %u   Flast %u   HeaderExtensionLength %u\n",CompressionType,Flags,HeaderExtensionLength);
9191
9292   mycaslen=caslen;
9393   //from here on down for now I am assuming it is compressed csw file.
r20109r20110
189189   LOG_FORMATS("Length %d\n",length);
190190
191191   SampleRate=get_leuint32(bytes+0x19);
192   LOG_FORMATS("Sample rate %d\n",SampleRate);
192   LOG_FORMATS("Sample rate %u\n",SampleRate);
193193
194194   NumberOfPulses=get_leuint32(bytes+0x1d);
195   LOG_FORMATS("Number Of Pulses %d\n",NumberOfPulses);
195   LOG_FORMATS("Number Of Pulses %u\n",NumberOfPulses);
196196
197197   CompressionType=bytes[0x21];
198198   Flags=bytes[0x22];
r20109r20110
205205      Bit=100;
206206   }
207207
208   LOG_FORMATS("CompressionType %d   Flast %d   HeaderExtensionLength %d\n",CompressionType,Flags,HeaderExtensionLength);
208   LOG_FORMATS("CompressionType %u   Flast %u   HeaderExtensionLength %u\n",CompressionType,Flags,HeaderExtensionLength);
209209
210210
211211   //from here on down for now I am assuming it is compressed csw file.
trunk/src/lib/formats/d64_dsk.c
r20109r20110
279279
280280   if (sector_error != ERROR_00)
281281   {
282      LOG_FORMATS("D64 error %s head %u track %u sector %u\n", ERROR_CODE[sector_error], head, dos_track, sector);
282      LOG_FORMATS("D64 error %s head %d track %d sector %d\n", ERROR_CODE[sector_error], head, dos_track, sector);
283283   }
284284
285285   return sector_error;
r20109r20110
725725   tag->has_errors = has_errors;
726726
727727   LOG_FORMATS("D64 size: %04x\n", (UINT32)floppy_image_size(floppy));
728   LOG_FORMATS("D64 heads: %u\n", heads);
729   LOG_FORMATS("D64 tracks: %u\n", dos_tracks);
728   LOG_FORMATS("D64 heads: %d\n", heads);
729   LOG_FORMATS("D64 tracks: %d\n", dos_tracks);
730730   LOG_FORMATS("D64 DOS version: %s\n", DOS_VERSION[dos]);
731731   LOG_FORMATS("D64 error codes: %s\n", has_errors ? "yes" : "no");
732732
r20109r20110
761761               /* also store an error entry for each sector */
762762               errors_size += DOS25_SECTORS_PER_TRACK[track];
763763
764               LOG_FORMATS("D64 head %u track %u offset %05x", head, track + 1, tag->track_offset[head][track]);
764               LOG_FORMATS("D64 head %d track %d offset %05x", head, track + 1, tag->track_offset[head][track]);
765765               if (has_errors) LOG_FORMATS(" errors %05x", tag->error_offset[head][track]);
766766               LOG_FORMATS(" speed %u\n", tag->speed_zone[track]);
767767            }
r20109r20110
793793                  errors_size += DOS2_SECTORS_PER_TRACK[track / 2];
794794               }
795795
796               LOG_FORMATS("D64 head %u track %.1f offset %05x", head, get_dos_track(track), tag->track_offset[head][track]);
796               LOG_FORMATS("D64 head %d track %.1f offset %05x", head, get_dos_track(track), tag->track_offset[head][track]);
797797               if (has_errors) LOG_FORMATS(" errors %05x", tag->error_offset[head][track]);
798798               LOG_FORMATS(" speed %u\n", tag->speed_zone[track]);
799799            }
r20109r20110
821821   /* read errors */
822822   if (tag->has_errors)
823823   {
824      LOG_FORMATS("D64 error blocks: %u %u\n", errors_size, track_offset);
824      LOG_FORMATS("D64 error blocks: %d %d\n", errors_size, track_offset);
825825      floppy_image_read(floppy, tag->error, track_offset, errors_size);
826826   }
827827   else
trunk/src/lib/util/jedparse.c
r20109r20110
181181         /* read the fuse number */
182182         cursrc++;
183183         curfuse = suck_number(&cursrc);
184         if (LOG_PARSE) printf("L%d\n", curfuse);
184         if (LOG_PARSE) printf("L%u\n", curfuse);
185185
186186         /* read digits, skipping delimiters */
187187         for ( ; cursrc < srcend; cursrc++)
188188            if (*cursrc == '0' || *cursrc == '1')
189189            {
190190               jed_set_fuse(data, curfuse, *cursrc - '0');
191               if (LOG_PARSE) printf("  fuse %d = %d\n", curfuse, 0);
191               if (LOG_PARSE) printf("  fuse %u = %d\n", curfuse, 0);
192192               if (curfuse >= data->numfuses)
193193                  data->numfuses = curfuse + 1;
194194               curfuse++;
trunk/src/lib/util/chdcd.c
r20109r20110
229229   if (temp16 != 1)
230230   {
231231      osd_close(file);
232      printf("ERROR: unsupported format %d - only PCM is supported (%s)\n", temp16, filename);
232      printf("ERROR: unsupported format %u - only PCM is supported (%s)\n", temp16, filename);
233233      return 0;
234234   }
235235
r20109r20110
240240   if (temp16 != 2)
241241   {
242242      osd_close(file);
243      printf("ERROR: unsupported number of channels %d - only stereo is supported (%s)\n", temp16, filename);
243      printf("ERROR: unsupported number of channels %u - only stereo is supported (%s)\n", temp16, filename);
244244      return 0;
245245   }
246246
r20109r20110
265265   if (bits != 16)
266266   {
267267      osd_close(file);
268      printf("ERROR: unsupported bits/sample %d - only 16 is supported (%s)\n", bits, filename);
268      printf("ERROR: unsupported bits/sample %u - only 16 is supported (%s)\n", bits, filename);
269269      return 0;
270270   }
271271

Previous 199869 Revisions Next


© 1997-2024 The MAME Team