More GCC warnings gone (32 & 64bit)

git-svn-id: https://svn.code.sf.net/p/fteqw/code/branches/wip@3806 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
Lance 2011-06-02 05:16:44 +00:00
parent 21860bd9dc
commit 950f914180
7 changed files with 12 additions and 12 deletions

View File

@ -131,7 +131,7 @@ static void ALSA_RW_Submit (soundcardinfo_t *sc, int start, int end)
frames = end - sc->snd_sent;
if (!frames)
return;
state = psnd_pcm_state (sc->handle);
ringsize = sc->sn.samples / sc->sn.numchannels;
@ -166,8 +166,8 @@ static void ALSA_Shutdown (soundcardinfo_t *sc)
{
psnd_pcm_close (sc->handle);
if (sc->Submit == ALSA_RW_Submit);
free(sc->sn.buffer);
if (sc->Submit == ALSA_RW_Submit)
free(sc->sn.buffer);
}
static void *ALSA_LockBuffer(soundcardinfo_t *sc)
@ -322,7 +322,7 @@ static int ALSA_InitCard (soundcardinfo_t *sc, int cardnum)
}
err = psnd_pcm_hw_params_set_access (pcm, hw, mmap?SND_PCM_ACCESS_MMAP_INTERLEAVED:SND_PCM_ACCESS_RW_INTERLEAVED);
if (0 > err)
if (0 > err)
{
Con_Printf (CON_ERROR "ALSA: Failure to set interleaved PCM access. %s\n",
psnd_strerror (err));
@ -358,7 +358,7 @@ static int ALSA_InitCard (soundcardinfo_t *sc, int cardnum)
// get speaker channels
stereo = sc->sn.numchannels;
err = psnd_pcm_hw_params_set_channels (pcm, hw, stereo);
while (err < 0)
while (err < 0)
{
if (stereo > 2)
stereo = 2;
@ -472,7 +472,7 @@ static int ALSA_InitCard (soundcardinfo_t *sc, int cardnum)
sc->GetDMAPos = ALSA_MMap_GetDMAPos;
sc->Submit = ALSA_MMap_Submit;
sc->GetDMAPos(sc); // sets shm->buffer
//alsa doesn't seem to like high mixahead values
//(maybe it tells us above somehow...)
//so force it lower

View File

@ -298,7 +298,7 @@ static int OSS_InitCard(soundcardinfo_t *sc, int cardnum)
if (alsadetected)
{
char *f, *n;
f = com_argv[0];
f = (char *)com_argv[0];
while((n = strchr(f, '/')))
f = n + 1;
Con_Printf("Your system is running alsa.\nTry: sudo echo \"%s 0 0 direct\" > /proc/asound/card0/pcm0p/oss\n", f);

View File

@ -3173,7 +3173,7 @@ void COM_Version_f (void)
#ifdef _WIN64
Con_Printf("Compiled for 64bit windows\n");
#endif
#ifdef _M_AMD64
#if defined(_M_AMD64) || defined(__amd64__)
Con_Printf("Compiled for AMD64 compatible cpus\n");
#endif

View File

@ -2812,7 +2812,7 @@ void NET_PrintAddresses(ftenet_connections_t *collection)
continue;
if (collection->conn[i]->GetLocalAddress)
{
for (adrno = 0, adrcount=1; adrcount = collection->conn[i]->GetLocalAddress(collection->conn[i], &adr, adrno) && adrno < adrcount; adrno++)
for (adrno = 0, adrcount=1; (adrcount = collection->conn[i]->GetLocalAddress(collection->conn[i], &adr, adrno)) && adrno < adrcount; adrno++)
{
Con_Printf("net address: %s\n", NET_AdrToString(adrbuf, sizeof(adrbuf), adr));
}

View File

@ -265,7 +265,7 @@ int Plug_SystemCallsVM(void *offset, quintptr_t mask, int fn, const int *arg)
fn = fn+1;
if (fn>=0 && fn < numplugbuiltins && plugbuiltins[fn].func!=NULL)
#ifdef _M_AMD64
#if defined(_M_AMD64) || defined(_M_X64) || defined(__amd64__) || defined(_WIN64)
return plugbuiltins[fn].func(offset, mask, (const long long int*)args);
#else
return plugbuiltins[fn].func(offset, mask, (const long int*)args);

View File

@ -362,7 +362,7 @@ qvm_t *QVM_LoadVM(const char *name, sys_callqvm_t syscall)
}
// check file
if(header.vmMagic!=VM_MAGIC && header.vmMagic!=VM_MAGIC2 || header.instructionCount<=0 || header.codeLength<=0)
if( (header.vmMagic!=VM_MAGIC && header.vmMagic!=VM_MAGIC2) || header.instructionCount<=0 || header.codeLength<=0)
{
Con_Printf("%s: invalid qvm file\n", name);
FS_FreeFile(raw);

View File

@ -1103,7 +1103,7 @@ int SV_HullNumForPlayer(int h2hull, float *mins, float *maxs)
}
if (h2hull)
return h2hull-1 | (mins[2]?0:128);
return (h2hull-1) | (mins[2]?0:128);
hullnum = 0;