summaryrefslogtreecommitdiff
path: root/apps
diff options
context:
space:
mode:
authorFrank Gevaerts <frank@gevaerts.be>2010-05-14 22:19:45 +0000
committerFrank Gevaerts <frank@gevaerts.be>2010-05-14 22:19:45 +0000
commited566826f50be17b7414dc6481c42929138f2aa8 (patch)
treed06ff3bce4d44b8ec542d7eed32a6cb7f47db902 /apps
parent9e974e4590aa32036ea45c8662d9293982192a48 (diff)
downloadrockbox-ed566826f50be17b7414dc6481c42929138f2aa8.tar.gz
rockbox-ed566826f50be17b7414dc6481c42929138f2aa8.zip
Fix various size_t related warnings and errors
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26035 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps')
-rw-r--r--apps/buffering.c4
-rw-r--r--apps/plugins/mpegplayer/audio_thread.c2
-rw-r--r--apps/plugins/mpegplayer/disk_buf.c4
-rw-r--r--apps/plugins/mpegplayer/mpeg_parser.c14
-rw-r--r--apps/plugins/mpegplayer/pcm_output.c2
5 files changed, 13 insertions, 13 deletions
diff --git a/apps/buffering.c b/apps/buffering.c
index f194e2b82d..451fa661ee 100644
--- a/apps/buffering.c
+++ b/apps/buffering.c
@@ -685,8 +685,8 @@ static bool buffer_handle(int handle_id)
685 /* stop buffering data for now and post-pone buffering the rest */ 685 /* stop buffering data for now and post-pone buffering the rest */
686 stop = true; 686 stop = true;
687 DEBUGF( "%s(): Preventing handle corruption: h1.id:%d h2.id:%d" 687 DEBUGF( "%s(): Preventing handle corruption: h1.id:%d h2.id:%d"
688 " copy_n:%lu overlap:%ld h1.filerem:%lu\n", __func__, 688 " copy_n:%zu overlap:%ld h1.filerem:%lu\n", __func__,
689 h->id, h->next->id, (unsigned long)copy_n, (long)overlap, 689 h->id, h->next->id, (unsigned long)copy_n, overlap,
690 (unsigned long)h->filerem); 690 (unsigned long)h->filerem);
691 copy_n -= overlap; 691 copy_n -= overlap;
692 } 692 }
diff --git a/apps/plugins/mpegplayer/audio_thread.c b/apps/plugins/mpegplayer/audio_thread.c
index c9252f5890..e80239096e 100644
--- a/apps/plugins/mpegplayer/audio_thread.c
+++ b/apps/plugins/mpegplayer/audio_thread.c
@@ -279,7 +279,7 @@ static int audio_sync(struct audio_thread_data *td,
279 { 279 {
280 if (audio_buffer(str, STREAM_PM_RANDOM_ACCESS) == STREAM_DATA_END) 280 if (audio_buffer(str, STREAM_PM_RANDOM_ACCESS) == STREAM_DATA_END)
281 { 281 {
282 DEBUGF("audio_sync:STR_DATA_END\n aqu:%ld swl:%ld swr:%ld\n", 282 DEBUGF("audio_sync:STR_DATA_END\n aqu:%zd swl:%ld swr:%ld\n",
283 audio_queue.used, str->hdr.win_left, str->hdr.win_right); 283 audio_queue.used, str->hdr.win_left, str->hdr.win_right);
284 if (audio_queue.used <= MAD_BUFFER_GUARD) 284 if (audio_queue.used <= MAD_BUFFER_GUARD)
285 goto sync_data_end; 285 goto sync_data_end;
diff --git a/apps/plugins/mpegplayer/disk_buf.c b/apps/plugins/mpegplayer/disk_buf.c
index 398c205fc6..07b68af96b 100644
--- a/apps/plugins/mpegplayer/disk_buf.c
+++ b/apps/plugins/mpegplayer/disk_buf.c
@@ -662,7 +662,7 @@ ssize_t disk_buf_read(void *buffer, size_t size)
662 return size; 662 return size;
663} 663}
664 664
665off_t disk_buf_lseek(off_t offset, int whence) 665ssize_t disk_buf_lseek(off_t offset, int whence)
666{ 666{
667 disk_buf_lock(); 667 disk_buf_lock();
668 668
@@ -881,7 +881,7 @@ bool disk_buf_init(void)
881 881
882 DEBUGF("disk_buf info:\n" 882 DEBUGF("disk_buf info:\n"
883 " page count: %d\n" 883 " page count: %d\n"
884 " size: %ld\n", 884 " size: %zd\n",
885 disk_buf.pgcount, disk_buf.size); 885 disk_buf.pgcount, disk_buf.size);
886 886
887 rb->memset(disk_buf.cache, 0xff, 887 rb->memset(disk_buf.cache, 0xff,
diff --git a/apps/plugins/mpegplayer/mpeg_parser.c b/apps/plugins/mpegplayer/mpeg_parser.c
index e14c51337f..5c0fedfd51 100644
--- a/apps/plugins/mpegplayer/mpeg_parser.c
+++ b/apps/plugins/mpegplayer/mpeg_parser.c
@@ -366,7 +366,7 @@ static off_t mpeg_parser_seek_PTS(uint32_t time, unsigned id)
366 pos = pos_new; 366 pos = pos_new;
367 367
368 DEBUGF("Seeking stream 0x%02x\n", id); 368 DEBUGF("Seeking stream 0x%02x\n", id);
369 DEBUGF("$$ tl:%u t:%u ct:?? tr:%u\n pl:%ld pn:%ld pr:%ld\n", 369 DEBUGF("$$ tl:%u t:%u ct:?? tr:%u\n pl:%zd pn:%zd pr:%zd\n",
370 (unsigned)time_left, (unsigned)time, (unsigned)time_right, 370 (unsigned)time_left, (unsigned)time, (unsigned)time_right,
371 pos_left, pos_new, pos_right); 371 pos_left, pos_new, pos_right);
372 372
@@ -425,7 +425,7 @@ static off_t mpeg_parser_seek_PTS(uint32_t time, unsigned id)
425 state = STATE2; /* Last scan was early */ 425 state = STATE2; /* Last scan was early */
426 sk.dir = SSCAN_REVERSE; 426 sk.dir = SSCAN_REVERSE;
427 427
428 DEBUGF(">> tl:%u t:%u ct:%u tr:%u\n pl:%ld pn:%ld pr:%ld\n", 428 DEBUGF(">> tl:%u t:%u ct:%u tr:%u\n pl:%zd pn:%zd pr:%zd\n",
429 (unsigned)time_left, (unsigned)time, (unsigned)currpts, 429 (unsigned)time_left, (unsigned)time, (unsigned)currpts,
430 (unsigned)time_right, pos_left, pos_new, pos_right); 430 (unsigned)time_right, pos_left, pos_new, pos_right);
431 } 431 }
@@ -453,14 +453,14 @@ static off_t mpeg_parser_seek_PTS(uint32_t time, unsigned id)
453 state = STATE3; /* Last scan was late */ 453 state = STATE3; /* Last scan was late */
454 sk.dir = SSCAN_REVERSE; 454 sk.dir = SSCAN_REVERSE;
455 455
456 DEBUGF("<< tl:%u t:%u ct:%u tr:%u\n pl:%ld pn:%ld pr:%ld\n", 456 DEBUGF("<< tl:%u t:%u ct:%u tr:%u\n pl:%zd pn:%zd pr:%zd\n",
457 (unsigned)time_left, (unsigned)time, (unsigned)currpts, 457 (unsigned)time_left, (unsigned)time, (unsigned)currpts,
458 (unsigned)time_right, pos_left, pos_new, pos_right); 458 (unsigned)time_right, pos_left, pos_new, pos_right);
459 } 459 }
460 else 460 else
461 { 461 {
462 /* Exact match - it happens */ 462 /* Exact match - it happens */
463 DEBUGF("|| tl:%u t:%u ct:%u tr:%u\n pl:%ld pn:%ld pr:%ld\n", 463 DEBUGF("|| tl:%u t:%u ct:%u tr:%u\n pl:%zd pn:%zd pr:%zd\n",
464 (unsigned)time_left, (unsigned)time, (unsigned)currpts, 464 (unsigned)time_left, (unsigned)time, (unsigned)currpts,
465 (unsigned)time_right, pos_left, pos_new, pos_right); 465 (unsigned)time_right, pos_left, pos_new, pos_right);
466 pts = currpts; 466 pts = currpts;
@@ -492,7 +492,7 @@ static off_t mpeg_parser_seek_PTS(uint32_t time, unsigned id)
492 * will find it. */ 492 * will find it. */
493 pos_new = pos_left; 493 pos_new = pos_left;
494 sk.dir = SSCAN_FORWARD; 494 sk.dir = SSCAN_FORWARD;
495 DEBUGF("?? tl:%u t:%u ct:%u tr:%u\n pl:%ld pn:%ld pr:%ld\n", 495 DEBUGF("?? tl:%u t:%u ct:%u tr:%u\n pl:%zd pn:%zd pr:%zd\n",
496 (unsigned)time_left, (unsigned)time, (unsigned)currpts, 496 (unsigned)time_left, (unsigned)time, (unsigned)currpts,
497 (unsigned)time_right, pos_left, pos_new, pos_right); 497 (unsigned)time_right, pos_left, pos_new, pos_right);
498 state = STATE1; 498 state = STATE1;
@@ -521,7 +521,7 @@ static off_t mpeg_parser_seek_PTS(uint32_t time, unsigned id)
521 sk.dir = SSCAN_FORWARD; 521 sk.dir = SSCAN_FORWARD;
522 522
523 uint32_t nextpts = mpeg_parser_scan_pts(&sk, id); 523 uint32_t nextpts = mpeg_parser_scan_pts(&sk, id);
524 DEBUGF("Seek pos:%ld pts:%u t:%u next pts:%u \n", 524 DEBUGF("Seek pos:%zd pts:%u t:%u next pts:%u \n",
525 pos, (unsigned)pts, (unsigned)time, (unsigned)nextpts); 525 pos, (unsigned)pts, (unsigned)time, (unsigned)nextpts);
526 526
527 if (pts <= time && time < nextpts) 527 if (pts <= time && time < nextpts)
@@ -608,7 +608,7 @@ try_again:
608 str_parser.parms.sd.sk.len = 1024*1024; 608 str_parser.parms.sd.sk.len = 1024*1024;
609 str_parser.parms.sd.sk.dir = SSCAN_FORWARD; 609 str_parser.parms.sd.sk.dir = SSCAN_FORWARD;
610 610
611 DEBUGF("thumb pos:%ld len:%ld\n", str_parser.parms.sd.sk.pos, 611 DEBUGF("thumb pos:%ld len:%zd\n", str_parser.parms.sd.sk.pos,
612 str_parser.parms.sd.sk.len); 612 str_parser.parms.sd.sk.len);
613 613
614 result = str_send_msg(&video_str, STREAM_SYNC, 614 result = str_send_msg(&video_str, STREAM_SYNC,
diff --git a/apps/plugins/mpegplayer/pcm_output.c b/apps/plugins/mpegplayer/pcm_output.c
index a5d8f86e5b..cd6c45f712 100644
--- a/apps/plugins/mpegplayer/pcm_output.c
+++ b/apps/plugins/mpegplayer/pcm_output.c
@@ -99,7 +99,7 @@ static void get_more(unsigned char **start, size_t *size)
99 /* Just show a warning about this - will never happen 99 /* Just show a warning about this - will never happen
100 * without a bug in the audio thread code or a clobbered 100 * without a bug in the audio thread code or a clobbered
101 * buffer */ 101 * buffer */
102 DEBUGF("get_more: invalid size (%ld)\n", (long)sz); 102 DEBUGF("get_more: invalid size (%zd)\n", sz);
103 } 103 }
104 104
105 if (offset < -100*CLOCK_RATE/1000) 105 if (offset < -100*CLOCK_RATE/1000)