Attempt at fixing 64-bit sim warning.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11788 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
d4a46cba30
commit
84a013ea41
3 changed files with 14 additions and 9 deletions
|
@ -1576,8 +1576,8 @@ static void codec_advance_buffer_callback(size_t amount)
|
|||
int result;
|
||||
LOGFQUEUE("codec >| audio Q_AUDIO_REBUFFER_SEEK");
|
||||
|
||||
result = (int)queue_send(&audio_queue, Q_AUDIO_REBUFFER_SEEK,
|
||||
(void *)(ci.curpos + amount));
|
||||
result = (int)(intptr_t)queue_send(&audio_queue, Q_AUDIO_REBUFFER_SEEK,
|
||||
(void *)(uintptr_t)(ci.curpos + amount));
|
||||
|
||||
switch (result)
|
||||
{
|
||||
|
@ -1719,8 +1719,8 @@ static bool codec_seek_buffer_callback(size_t newpos)
|
|||
int result;
|
||||
|
||||
LOGFQUEUE("codec >| audio Q_AUDIO_REBUFFER_SEEK");
|
||||
result = (int)queue_send(&audio_queue, Q_AUDIO_REBUFFER_SEEK,
|
||||
(void *)newpos);
|
||||
result = (int)(intptr_t)queue_send(&audio_queue, Q_AUDIO_REBUFFER_SEEK,
|
||||
(void *)(uintptr_t)newpos);
|
||||
|
||||
switch (result)
|
||||
{
|
||||
|
@ -1855,7 +1855,8 @@ static bool codec_load_next_track(void)
|
|||
|
||||
trigger_cpu_boost();
|
||||
LOGFQUEUE("codec >| audio Q_AUDIO_CHECK_NEW_TRACK");
|
||||
result = (int)queue_send(&audio_queue, Q_AUDIO_CHECK_NEW_TRACK, NULL);
|
||||
result = (int)(intptr_t)queue_send(&audio_queue, Q_AUDIO_CHECK_NEW_TRACK,
|
||||
NULL);
|
||||
|
||||
#if 0 /* Q_CODEC_REQUEST_PENDING never posted anyway */
|
||||
while (1)
|
||||
|
@ -3625,12 +3626,12 @@ static void audio_thread(void)
|
|||
|
||||
case Q_AUDIO_REBUFFER_SEEK:
|
||||
LOGFQUEUE("audio < Q_AUDIO_REBUFFER_SEEK");
|
||||
result = (void *)audio_rebuffer_and_seek((size_t)ev.data);
|
||||
result = (void *)(intptr_t)audio_rebuffer_and_seek((size_t)ev.data);
|
||||
break;
|
||||
|
||||
case Q_AUDIO_CHECK_NEW_TRACK:
|
||||
LOGFQUEUE("audio < Q_AUDIO_CHECK_NEW_TRACK");
|
||||
result = (void *)audio_check_new_track();
|
||||
result = (void *)(intptr_t)audio_check_new_track();
|
||||
break;
|
||||
|
||||
case Q_AUDIO_DIR_SKIP:
|
||||
|
|
|
@ -1466,7 +1466,7 @@ void ProcessDehFile(const char *filename, const char *outfilename, int lumpnum)
|
|||
// killough 10/98: allow DEH files to come from wad lumps
|
||||
if (filename)
|
||||
{
|
||||
if ((int)(infile.inp = (void *) open(filename,O_RDONLY))<0)
|
||||
if ((intptr_t)(infile.inp = (void *)(intptr_t)open(filename,O_RDONLY))<0)
|
||||
{
|
||||
printf( "-deh file %s not found\n",filename);
|
||||
return; // should be checked up front anyway
|
||||
|
@ -1558,7 +1558,7 @@ void ProcessDehFile(const char *filename, const char *outfilename, int lumpnum)
|
|||
if (infile.lump)
|
||||
W_UnlockLumpNum(lumpnum); // Mark purgable
|
||||
else
|
||||
close((int) infile.inp); // Close real file
|
||||
close((int)(intptr_t) infile.inp); // Close real file
|
||||
|
||||
close(fileout);
|
||||
}
|
||||
|
|
|
@ -36,6 +36,8 @@
|
|||
#if ULONG_MAX == 0xfffffffful
|
||||
#define int32_t long
|
||||
#define uint32_t unsigned long
|
||||
#define intptr_t long
|
||||
#define uintptr_t unsigned long
|
||||
#elif UINT_MAX == 0xffffffffu
|
||||
#define int32_t int
|
||||
#define uint32_t unsigned int
|
||||
|
@ -45,6 +47,8 @@
|
|||
#if ULONG_MAX == 0xffffffffffffffffull
|
||||
#define int64_t long
|
||||
#define uint64_t unsigned long
|
||||
#define intptr_t long
|
||||
#define uintptr_t unsigned long
|
||||
#else
|
||||
#define int64_t long long
|
||||
#define uint64_t unsigned long long
|
||||
|
|
Loading…
Reference in a new issue