summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Sevakis <jethead71@rockbox.org>2006-12-17 14:47:12 +0000
committerMichael Sevakis <jethead71@rockbox.org>2006-12-17 14:47:12 +0000
commit84a013ea419efd0373846741b812d7ccf78881b9 (patch)
tree3546180752780ff810ccb529c43f9101548cbc43
parentd4a46cba3018d6f3ebf440d41d7b9014a8e405df (diff)
downloadrockbox-84a013ea419efd0373846741b812d7ccf78881b9.tar.gz
rockbox-84a013ea419efd0373846741b812d7ccf78881b9.zip
Attempt at fixing 64-bit sim warning.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11788 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r--apps/playback.c15
-rwxr-xr-xapps/plugins/doom/d_deh.c4
-rw-r--r--firmware/include/inttypes.h4
3 files changed, 14 insertions, 9 deletions
diff --git a/apps/playback.c b/apps/playback.c
index 23d68f4be9..f2e029ba30 100644
--- a/apps/playback.c
+++ b/apps/playback.c
@@ -1576,8 +1576,8 @@ static void codec_advance_buffer_callback(size_t amount)
1576 int result; 1576 int result;
1577 LOGFQUEUE("codec >| audio Q_AUDIO_REBUFFER_SEEK"); 1577 LOGFQUEUE("codec >| audio Q_AUDIO_REBUFFER_SEEK");
1578 1578
1579 result = (int)queue_send(&audio_queue, Q_AUDIO_REBUFFER_SEEK, 1579 result = (int)(intptr_t)queue_send(&audio_queue, Q_AUDIO_REBUFFER_SEEK,
1580 (void *)(ci.curpos + amount)); 1580 (void *)(uintptr_t)(ci.curpos + amount));
1581 1581
1582 switch (result) 1582 switch (result)
1583 { 1583 {
@@ -1719,8 +1719,8 @@ static bool codec_seek_buffer_callback(size_t newpos)
1719 int result; 1719 int result;
1720 1720
1721 LOGFQUEUE("codec >| audio Q_AUDIO_REBUFFER_SEEK"); 1721 LOGFQUEUE("codec >| audio Q_AUDIO_REBUFFER_SEEK");
1722 result = (int)queue_send(&audio_queue, Q_AUDIO_REBUFFER_SEEK, 1722 result = (int)(intptr_t)queue_send(&audio_queue, Q_AUDIO_REBUFFER_SEEK,
1723 (void *)newpos); 1723 (void *)(uintptr_t)newpos);
1724 1724
1725 switch (result) 1725 switch (result)
1726 { 1726 {
@@ -1855,7 +1855,8 @@ static bool codec_load_next_track(void)
1855 1855
1856 trigger_cpu_boost(); 1856 trigger_cpu_boost();
1857 LOGFQUEUE("codec >| audio Q_AUDIO_CHECK_NEW_TRACK"); 1857 LOGFQUEUE("codec >| audio Q_AUDIO_CHECK_NEW_TRACK");
1858 result = (int)queue_send(&audio_queue, Q_AUDIO_CHECK_NEW_TRACK, NULL); 1858 result = (int)(intptr_t)queue_send(&audio_queue, Q_AUDIO_CHECK_NEW_TRACK,
1859 NULL);
1859 1860
1860#if 0 /* Q_CODEC_REQUEST_PENDING never posted anyway */ 1861#if 0 /* Q_CODEC_REQUEST_PENDING never posted anyway */
1861 while (1) 1862 while (1)
@@ -3625,12 +3626,12 @@ static void audio_thread(void)
3625 3626
3626 case Q_AUDIO_REBUFFER_SEEK: 3627 case Q_AUDIO_REBUFFER_SEEK:
3627 LOGFQUEUE("audio < Q_AUDIO_REBUFFER_SEEK"); 3628 LOGFQUEUE("audio < Q_AUDIO_REBUFFER_SEEK");
3628 result = (void *)audio_rebuffer_and_seek((size_t)ev.data); 3629 result = (void *)(intptr_t)audio_rebuffer_and_seek((size_t)ev.data);
3629 break; 3630 break;
3630 3631
3631 case Q_AUDIO_CHECK_NEW_TRACK: 3632 case Q_AUDIO_CHECK_NEW_TRACK:
3632 LOGFQUEUE("audio < Q_AUDIO_CHECK_NEW_TRACK"); 3633 LOGFQUEUE("audio < Q_AUDIO_CHECK_NEW_TRACK");
3633 result = (void *)audio_check_new_track(); 3634 result = (void *)(intptr_t)audio_check_new_track();
3634 break; 3635 break;
3635 3636
3636 case Q_AUDIO_DIR_SKIP: 3637 case Q_AUDIO_DIR_SKIP:
diff --git a/apps/plugins/doom/d_deh.c b/apps/plugins/doom/d_deh.c
index 2aa9b83422..632146868e 100755
--- a/apps/plugins/doom/d_deh.c
+++ b/apps/plugins/doom/d_deh.c
@@ -1466,7 +1466,7 @@ void ProcessDehFile(const char *filename, const char *outfilename, int lumpnum)
1466 // killough 10/98: allow DEH files to come from wad lumps 1466 // killough 10/98: allow DEH files to come from wad lumps
1467 if (filename) 1467 if (filename)
1468 { 1468 {
1469 if ((int)(infile.inp = (void *) open(filename,O_RDONLY))<0) 1469 if ((intptr_t)(infile.inp = (void *)(intptr_t)open(filename,O_RDONLY))<0)
1470 { 1470 {
1471 printf( "-deh file %s not found\n",filename); 1471 printf( "-deh file %s not found\n",filename);
1472 return; // should be checked up front anyway 1472 return; // should be checked up front anyway
@@ -1558,7 +1558,7 @@ void ProcessDehFile(const char *filename, const char *outfilename, int lumpnum)
1558 if (infile.lump) 1558 if (infile.lump)
1559 W_UnlockLumpNum(lumpnum); // Mark purgable 1559 W_UnlockLumpNum(lumpnum); // Mark purgable
1560 else 1560 else
1561 close((int) infile.inp); // Close real file 1561 close((int)(intptr_t) infile.inp); // Close real file
1562 1562
1563 close(fileout); 1563 close(fileout);
1564} 1564}
diff --git a/firmware/include/inttypes.h b/firmware/include/inttypes.h
index 6127485a8a..e23e1da960 100644
--- a/firmware/include/inttypes.h
+++ b/firmware/include/inttypes.h
@@ -36,6 +36,8 @@
36#if ULONG_MAX == 0xfffffffful 36#if ULONG_MAX == 0xfffffffful
37#define int32_t long 37#define int32_t long
38#define uint32_t unsigned long 38#define uint32_t unsigned long
39#define intptr_t long
40#define uintptr_t unsigned long
39#elif UINT_MAX == 0xffffffffu 41#elif UINT_MAX == 0xffffffffu
40#define int32_t int 42#define int32_t int
41#define uint32_t unsigned int 43#define uint32_t unsigned int
@@ -45,6 +47,8 @@
45#if ULONG_MAX == 0xffffffffffffffffull 47#if ULONG_MAX == 0xffffffffffffffffull
46#define int64_t long 48#define int64_t long
47#define uint64_t unsigned long 49#define uint64_t unsigned long
50#define intptr_t long
51#define uintptr_t unsigned long
48#else 52#else
49#define int64_t long long 53#define int64_t long long
50#define uint64_t unsigned long long 54#define uint64_t unsigned long long