Cast some more to keep both 32 bit and 64 bit simulator platforms happy.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12819 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
341b03a242
commit
bd5c0ad7bb
10 changed files with 39 additions and 27 deletions
|
@ -83,7 +83,7 @@ next_track:
|
|||
}
|
||||
bufsize = n;
|
||||
bufoff = 0;
|
||||
DEBUGF("ADX: read size = %x\n",bufsize);
|
||||
DEBUGF("ADX: read size = %lx\n",(unsigned long)bufsize);
|
||||
|
||||
/* Get file header for starting offset, channel count */
|
||||
|
||||
|
@ -92,7 +92,7 @@ next_track:
|
|||
|
||||
/* useful for seeking and reporting current playback position */
|
||||
avgbytespersec = ci->id3->frequency * 18 * channels / 32;
|
||||
DEBUGF("avgbytespersec=%ld\n",avgbytespersec);
|
||||
DEBUGF("avgbytespersec=%ld\n",(unsigned long)avgbytespersec);
|
||||
|
||||
/* Get loop data */
|
||||
|
||||
|
@ -232,14 +232,14 @@ next_track:
|
|||
ci->seek_buffer(bufoff);
|
||||
buf = ci->request_buffer(&n, ci->filesize-bufoff);
|
||||
bufsize = n;
|
||||
DEBUGF("ADX: read size = %x\n",bufsize);
|
||||
DEBUGF("ADX: read size = %lx\n",(unsigned long)bufsize);
|
||||
if ((off_t)bufsize < channels*18) {
|
||||
/* if we can't get a full frame, just request a single
|
||||
frame (should be able to fit it in the guard buffer) */
|
||||
DEBUGF("ADX: requesting single frame at %lx\n",bufoff);
|
||||
buf = ci->request_buffer(&n, channels*18);
|
||||
bufsize=n;
|
||||
DEBUGF("ADX: read size = %x\n",bufsize);
|
||||
DEBUGF("ADX: read size = %lx\n",(unsigned long)bufsize);
|
||||
}
|
||||
if (!buf) {
|
||||
DEBUGF("ADX: couldn't get buffer at %lx size %lx\n",
|
||||
|
|
|
@ -99,7 +99,8 @@ next_track:
|
|||
i = ((buf[4]<<24)|(buf[5]<<16)|(buf[6]<<8)|buf[7]);
|
||||
if (memcmp(buf, "COMM", 4) == 0) {
|
||||
if (i != 18) {
|
||||
DEBUGF("CODEC_ERROR: 'COMM' chunk size=%lu != 18\n", i);
|
||||
DEBUGF("CODEC_ERROR: 'COMM' chunk size=%lu != 18\n",
|
||||
(unsigned long)i);
|
||||
i = CODEC_ERROR;
|
||||
goto done;
|
||||
}
|
||||
|
@ -136,7 +137,7 @@ next_track:
|
|||
i = 8 + offset2snd; /* advance to the beginning of data */
|
||||
} else {
|
||||
DEBUGF("unsupported AIFF chunk: '%c%c%c%c', size=%lu\n",
|
||||
buf[0], buf[1], buf[2], buf[3], i);
|
||||
buf[0], buf[1], buf[2], buf[3], (unsigned long)i);
|
||||
}
|
||||
|
||||
if (i & 0x01) /* odd chunk sizes must be padded */
|
||||
|
|
|
@ -139,7 +139,8 @@ static bool read_chunk_esds(qtmovie_t *qtmovie, size_t chunk_len)
|
|||
temp=stream_read_int32(qtmovie->stream);//0x15000414 ????
|
||||
maxBitrate = stream_read_int32(qtmovie->stream);
|
||||
avgBitrate = stream_read_int32(qtmovie->stream);
|
||||
DEBUGF("audioType=%d, maxBitrate=%ld, avgBitrate=%ld\n",audioType,maxBitrate,avgBitrate);
|
||||
DEBUGF("audioType=%d, maxBitrate=%ld, avgBitrate=%ld\n",audioType,
|
||||
(long)maxBitrate,(long)avgBitrate);
|
||||
|
||||
/* get and verify DecSpecificInfoTag */
|
||||
if (stream_read_uint8(qtmovie->stream) != 0x05)
|
||||
|
@ -257,7 +258,8 @@ static bool read_chunk_stsd(qtmovie_t *qtmovie, size_t chunk_len)
|
|||
sub_chunk_len = stream_read_uint32(qtmovie->stream);
|
||||
if (sub_chunk_len <= 1 || sub_chunk_len > entry_remaining)
|
||||
{
|
||||
DEBUGF("strange size (%u) for chunk inside mp4a\n", sub_chunk_len);
|
||||
DEBUGF("strange size (%lu) for chunk inside mp4a\n",
|
||||
(unsigned long)sub_chunk_len);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -281,7 +283,7 @@ static bool read_chunk_stsd(qtmovie_t *qtmovie, size_t chunk_len)
|
|||
return false;
|
||||
}
|
||||
|
||||
DEBUGF("entry_remaining=%ld\n",entry_remaining);
|
||||
DEBUGF("entry_remaining=%ld\n",(long)entry_remaining);
|
||||
stream_skip(qtmovie->stream,entry_remaining);
|
||||
|
||||
} else {
|
||||
|
@ -379,7 +381,7 @@ static bool read_chunk_stsz(qtmovie_t *qtmovie, size_t chunk_len)
|
|||
|
||||
if (v > 0x0000ffff)
|
||||
{
|
||||
DEBUGF("stsz[%d] > 65 kB (%ld)\n", i, v);
|
||||
DEBUGF("stsz[%d] > 65 kB (%ld)\n", i, (long)v);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -488,7 +490,8 @@ static bool read_chunk_stbl(qtmovie_t *qtmovie, size_t chunk_len)
|
|||
sub_chunk_len = stream_read_uint32(qtmovie->stream);
|
||||
if (sub_chunk_len <= 1 || sub_chunk_len > size_remaining)
|
||||
{
|
||||
DEBUGF("strange size (%u) for chunk inside stbl\n", sub_chunk_len);
|
||||
DEBUGF("strange size (%lu) for chunk inside stbl\n",
|
||||
(unsigned long)sub_chunk_len);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -545,7 +548,7 @@ static bool read_chunk_minf(qtmovie_t *qtmovie, size_t chunk_len)
|
|||
|
||||
if ((i = stream_read_uint32(qtmovie->stream)) != 16)
|
||||
{
|
||||
DEBUGF("unexpected size in media info: %ld\n",i);
|
||||
DEBUGF("unexpected size in media info: %ld\n", (long)i);
|
||||
stream_skip(qtmovie->stream, size_remaining-4);
|
||||
return true;
|
||||
}
|
||||
|
@ -569,7 +572,8 @@ static bool read_chunk_minf(qtmovie_t *qtmovie, size_t chunk_len)
|
|||
|
||||
if (sub_chunk_len <= 1 || sub_chunk_len > size_remaining)
|
||||
{
|
||||
DEBUGF("strange size (%u) for chunk inside minf\n", sub_chunk_len);
|
||||
DEBUGF("strange size (%lu) for chunk inside minf\n",
|
||||
(unsigned long)sub_chunk_len);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -606,7 +610,8 @@ static bool read_chunk_mdia(qtmovie_t *qtmovie, size_t chunk_len)
|
|||
sub_chunk_len = stream_read_uint32(qtmovie->stream);
|
||||
if (sub_chunk_len <= 1 || sub_chunk_len > size_remaining)
|
||||
{
|
||||
DEBUGF("strange size (%u) for chunk inside mdia\n", sub_chunk_len);
|
||||
DEBUGF("strange size (%lu) for chunk inside mdia\n",
|
||||
(unsigned long)sub_chunk_len);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -644,7 +649,8 @@ static bool read_chunk_trak(qtmovie_t *qtmovie, size_t chunk_len)
|
|||
sub_chunk_len = stream_read_uint32(qtmovie->stream);
|
||||
if (sub_chunk_len <= 1 || sub_chunk_len > size_remaining)
|
||||
{
|
||||
DEBUGF("strange size (%u) for chunk inside trak\n", sub_chunk_len);
|
||||
DEBUGF("strange size (%lu) for chunk inside trak\n",
|
||||
(unsigned long)sub_chunk_len);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -682,7 +688,8 @@ static bool read_chunk_moov(qtmovie_t *qtmovie, size_t chunk_len)
|
|||
sub_chunk_len = stream_read_uint32(qtmovie->stream);
|
||||
if (sub_chunk_len <= 1 || sub_chunk_len > size_remaining)
|
||||
{
|
||||
DEBUGF("strange size (%u) for chunk inside moov\n", sub_chunk_len);
|
||||
DEBUGF("strange size (%lu) for chunk inside moov\n",
|
||||
(unsigned long)sub_chunk_len);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
@ -859,7 +859,7 @@ enum codec_status codec_main(void)
|
|||
return CODEC_ERROR;
|
||||
}
|
||||
|
||||
DEBUGF("SPC: read size = 0x%x\n",buffersize);
|
||||
DEBUGF("SPC: read size = 0x%lx\n",(unsigned long)buffersize);
|
||||
do
|
||||
{
|
||||
SPC_Init(&spc_emu);
|
||||
|
|
|
@ -298,7 +298,8 @@ static void decode_brr( struct Spc_Dsp* this, unsigned start_addr,
|
|||
if ( addr == loop_ptr )
|
||||
{
|
||||
loop_start = out;
|
||||
DEBUGF( "loop at %08x (wave #%d)\n", addr - RAM, raw_voice->waveform );
|
||||
DEBUGF( "loop at %08lx (wave #%d)\n",
|
||||
(unsigned long)(addr - RAM), raw_voice->waveform );
|
||||
}
|
||||
|
||||
/* header */
|
||||
|
@ -398,7 +399,8 @@ static void decode_brr( struct Spc_Dsp* this, unsigned start_addr,
|
|||
}
|
||||
}
|
||||
|
||||
DEBUGF( "end at %08x (wave #%d)\n", addr - RAM, raw_voice->waveform );
|
||||
DEBUGF( "end at %08lx (wave #%d)\n",
|
||||
(unsigned long)(addr - RAM), raw_voice->waveform );
|
||||
|
||||
/* add to cache */
|
||||
this->wave_entry_old [this->oldsize++] = *wave_entry;
|
||||
|
|
|
@ -276,7 +276,8 @@ next_track:
|
|||
i = (buf[4]|(buf[5]<<8)|(buf[6]<<16)|(buf[7]<<24));
|
||||
if (memcmp(buf, "fmt ", 4) == 0) {
|
||||
if (i < 16) {
|
||||
DEBUGF("CODEC_ERROR: 'fmt ' chunk size=%lu < 16\n", i);
|
||||
DEBUGF("CODEC_ERROR: 'fmt ' chunk size=%lu < 16\n",
|
||||
(unsigned long)i);
|
||||
i = CODEC_ERROR;
|
||||
goto done;
|
||||
}
|
||||
|
@ -298,7 +299,7 @@ next_track:
|
|||
* we'll see later if we can't decode it */
|
||||
DEBUGF("CODEC_WARNING: non-PCM WAVE (formattag=0x%x) "
|
||||
"doesn't have ext. fmt descr (chunksize=%ld<18).\n",
|
||||
formattag, i);
|
||||
formattag, (long)i);
|
||||
}
|
||||
size = buf[24]|(buf[25]<<8);
|
||||
if (formattag == WAVE_FORMAT_DVI_ADPCM) {
|
||||
|
@ -335,7 +336,7 @@ next_track:
|
|||
totalsamples = (buf[8]|(buf[9]<<8)|(buf[10]<<16)|(buf[11]<<24));
|
||||
} else {
|
||||
DEBUGF("unknown WAVE chunk: '%c%c%c%c', size=%lu\n",
|
||||
buf[0], buf[1], buf[2], buf[3], i);
|
||||
buf[0], buf[1], buf[2], buf[3], (unsigned long)i);
|
||||
}
|
||||
|
||||
/* go to next chunk (even chunk sizes must be padded) */
|
||||
|
|
|
@ -179,7 +179,7 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter)
|
|||
filesize = rb->filesize(fIndex); /* get filesize */
|
||||
|
||||
DEBUGF("Filesize: %d bytes = %d words \n", filesize,
|
||||
(filesize / sizeof(struct stWord)));
|
||||
(filesize / (int)sizeof(struct stWord)));
|
||||
|
||||
/* for the searching algorithm */
|
||||
high = filesize / sizeof( struct stWord );
|
||||
|
|
|
@ -80,7 +80,8 @@ static void wvupdate (int32_t start_tick,
|
|||
compression = (int)(((int64_t)(bytes_read - bytes_written) * 100 +
|
||||
(bytes_read/2)) / bytes_read);
|
||||
|
||||
rb->snprintf(buf, 32, "elapsed time: %ld secs", (elapsed_ticks + (HZ/2)) / HZ);
|
||||
rb->snprintf(buf, 32, "elapsed time: %ld secs",
|
||||
(long)(elapsed_ticks + (HZ/2)) / HZ);
|
||||
rb->lcd_puts(0, 2, (unsigned char *)buf);
|
||||
|
||||
rb->snprintf(buf, 32, "progress: %d%%", progress);
|
||||
|
|
|
@ -221,7 +221,7 @@ static int wpsscrn(void* param)
|
|||
{
|
||||
DEBUGF("Resume index %X offset %lX\n",
|
||||
global_status.resume_index,
|
||||
global_status.resume_offset);
|
||||
(unsigned long)global_status.resume_offset);
|
||||
if (playlist_resume() != -1)
|
||||
{
|
||||
playlist_start(global_status.resume_index,
|
||||
|
|
|
@ -331,8 +331,8 @@ void fat_size(unsigned int* size, unsigned int* free)
|
|||
struct statfs fs;
|
||||
|
||||
if (!statfs(".", &fs)) {
|
||||
DEBUGF("statfs: bsize=%d blocks=%d free=%d\n",
|
||||
fs.f_bsize, fs.f_blocks, fs.f_bfree);
|
||||
DEBUGF("statfs: bsize=%d blocks=%ld free=%ld\n",
|
||||
(int)fs.f_bsize, fs.f_blocks, fs.f_bfree);
|
||||
if (size)
|
||||
*size = fs.f_blocks * (fs.f_bsize / 1024);
|
||||
if (free)
|
||||
|
|
Loading…
Reference in a new issue