mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-25 03:00:46 +00:00
Fix some gcc4 warnings
git-svn-id: https://svn.eduke32.com/eduke32@344 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
453c1f9649
commit
80c51ac2de
11 changed files with 57 additions and 71 deletions
|
@ -28,7 +28,7 @@ ifneq (0,$(RELEASE))
|
||||||
debug=-fomit-frame-pointer -O2
|
debug=-fomit-frame-pointer -O2
|
||||||
else
|
else
|
||||||
# debugging enabled
|
# debugging enabled
|
||||||
debug=-ggdb -O0
|
debug=-ggdb -O0 -DDEBUGGINGAIDS
|
||||||
endif
|
endif
|
||||||
|
|
||||||
CC=gcc
|
CC=gcc
|
||||||
|
|
|
@ -57,7 +57,7 @@ $(OBJ)/pitch.$o: $(SRC)/jaudiolib/pitch.c $(SRC)/jaudiolib/pitch.h
|
||||||
$(OBJ)/multivoc.$o: $(SRC)/jaudiolib/multivoc.c $(SRC)/jaudiolib/usrhooks.h $(SRC)/jaudiolib/linklist.h $(SRC)/jaudiolib/pitch.h $(SRC)/jaudiolib/multivoc.h $(SRC)/jaudiolib/_multivc.h
|
$(OBJ)/multivoc.$o: $(SRC)/jaudiolib/multivoc.c $(SRC)/jaudiolib/usrhooks.h $(SRC)/jaudiolib/linklist.h $(SRC)/jaudiolib/pitch.h $(SRC)/jaudiolib/multivoc.h $(SRC)/jaudiolib/_multivc.h
|
||||||
$(OBJ)/fx_man.$o: $(SRC)/jaudiolib/fx_man.c $(SRC)/jaudiolib/multivoc.h $(SRC)/jaudiolib/ll_man.h $(SRC)/jaudiolib/fx_man.h
|
$(OBJ)/fx_man.$o: $(SRC)/jaudiolib/fx_man.c $(SRC)/jaudiolib/multivoc.h $(SRC)/jaudiolib/ll_man.h $(SRC)/jaudiolib/fx_man.h
|
||||||
$(OBJ)/dsoundout.$o: $(SRC)/jaudiolib/dsoundout.c $(SRC)/jaudiolib/dsoundout.h
|
$(OBJ)/dsoundout.$o: $(SRC)/jaudiolib/dsoundout.c $(SRC)/jaudiolib/dsoundout.h
|
||||||
$(OBJ)/dsl.$o: $(SRC)/jaudiolib/dsl.c $(SRC)/jaudiolib/util.h
|
$(OBJ)/dsl.$o: $(SRC)/jaudiolib/dsl.c $(EINC)/compat.h
|
||||||
|
|
||||||
$(OBJ)/midi.$o: $(SRC)/jaudiolib/midi.c $(SRC)/jaudiolib/standard.h $(SRC)/jaudiolib/usrhooks.h $(SRC)/jaudiolib/music.h $(SRC)/jaudiolib/_midi.h $(SRC)/jaudiolib/midi.h
|
$(OBJ)/midi.$o: $(SRC)/jaudiolib/midi.c $(SRC)/jaudiolib/standard.h $(SRC)/jaudiolib/usrhooks.h $(SRC)/jaudiolib/music.h $(SRC)/jaudiolib/_midi.h $(SRC)/jaudiolib/midi.h
|
||||||
$(OBJ)/mpu401.$o: $(SRC)/jaudiolib/mpu401.c $(SRC)/jaudiolib/mpu401.h
|
$(OBJ)/mpu401.$o: $(SRC)/jaudiolib/mpu401.c $(SRC)/jaudiolib/mpu401.h
|
||||||
|
|
|
@ -345,7 +345,7 @@ const char *ExtGetSectorCaption(short sectnum)
|
||||||
case 32767:
|
case 32767:
|
||||||
Bsprintf(lo,"32767 SECRET ROOM");
|
Bsprintf(lo,"32767 SECRET ROOM");
|
||||||
break;
|
break;
|
||||||
case 65535 :
|
case -1:
|
||||||
Bsprintf(lo,"65535 END OF LEVEL");
|
Bsprintf(lo,"65535 END OF LEVEL");
|
||||||
break;
|
break;
|
||||||
default :
|
default :
|
||||||
|
|
|
@ -8205,8 +8205,7 @@ char rancid_ip_strings[MAXPLAYERS][32], rancid_local_port_string[8];
|
||||||
|
|
||||||
static tokenlist rancidtokens[] =
|
static tokenlist rancidtokens[] =
|
||||||
{
|
{
|
||||||
{ "interface", T_INTERFACE
|
{ "interface", T_INTERFACE },
|
||||||
},
|
|
||||||
{ "mode", T_MODE },
|
{ "mode", T_MODE },
|
||||||
{ "allow", T_ALLOW },
|
{ "allow", T_ALLOW },
|
||||||
};
|
};
|
||||||
|
@ -8277,8 +8276,7 @@ static int stringsort(const char *p1, const char *p2)
|
||||||
|
|
||||||
static tokenlist grptokens[] =
|
static tokenlist grptokens[] =
|
||||||
{
|
{
|
||||||
{ "loadgrp", T_LOADGRP
|
{ "loadgrp", T_LOADGRP },
|
||||||
},
|
|
||||||
};
|
};
|
||||||
|
|
||||||
int loadgroupfiles(char *fn)
|
int loadgroupfiles(char *fn)
|
||||||
|
|
|
@ -142,7 +142,7 @@ int ScanGroups(void)
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
b = read(fh, buf, sizeof(buf));
|
b = read(fh, buf, sizeof(buf));
|
||||||
if (b > 0) crc32block((unsigned long *)&crcval, buf, b);
|
if (b > 0) crc32block((unsigned long *)&crcval, (unsigned char *)buf, b);
|
||||||
}
|
}
|
||||||
while (b == sizeof(buf));
|
while (b == sizeof(buf));
|
||||||
crc32finish((unsigned long *)&crcval);
|
crc32finish((unsigned long *)&crcval);
|
||||||
|
|
|
@ -214,7 +214,7 @@ static playbackstatus MV_GetNextDemandFeedBlock( VoiceNode *voice );
|
||||||
static playbackstatus MV_GetNextRawBlock( VoiceNode *voice );
|
static playbackstatus MV_GetNextRawBlock( VoiceNode *voice );
|
||||||
static playbackstatus MV_GetNextWAVBlock( VoiceNode *voice );
|
static playbackstatus MV_GetNextWAVBlock( VoiceNode *voice );
|
||||||
|
|
||||||
static void MV_ServiceRecord( void );
|
// static void MV_ServiceRecord( void );
|
||||||
static VoiceNode *MV_GetVoice( int handle );
|
static VoiceNode *MV_GetVoice( int handle );
|
||||||
static VoiceNode *MV_AllocVoice( int priority );
|
static VoiceNode *MV_AllocVoice( int priority );
|
||||||
|
|
||||||
|
|
|
@ -38,9 +38,10 @@ Modifications for JonoF's port by Jonathon Fowler (jonof@edgenetwk.com)
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
#include "dsoundout.h"
|
#include "dsoundout.h"
|
||||||
#else
|
#else
|
||||||
#include "util.h"
|
#include "compat.h"
|
||||||
#include "dsl.h"
|
#include "dsl.h"
|
||||||
#endif
|
#endif
|
||||||
|
#include "baselayer.h"
|
||||||
#include "usrhooks.h"
|
#include "usrhooks.h"
|
||||||
#include "linklist.h"
|
#include "linklist.h"
|
||||||
#include "pitch.h"
|
#include "pitch.h"
|
||||||
|
@ -464,11 +465,11 @@ int MV_ServiceVoc( int buffer)
|
||||||
{
|
{
|
||||||
if (MV_ReverbTable != NULL)
|
if (MV_ReverbTable != NULL)
|
||||||
{
|
{
|
||||||
MV_8BitReverb(source, dest, MV_ReverbTable, count);
|
MV_8BitReverb((signed char *)source, (signed char *)dest, MV_ReverbTable, count);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
MV_8BitReverbFast(source, dest, count, MV_ReverbLevel);
|
MV_8BitReverbFast((signed char *)source, (signed char *)dest, count, MV_ReverbLevel);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -522,9 +523,9 @@ playbackstatus MV_GetNextVOCBlock( VoiceNode *voice)
|
||||||
unsigned char *ptr;
|
unsigned char *ptr;
|
||||||
int blocktype;
|
int blocktype;
|
||||||
int lastblocktype;
|
int lastblocktype;
|
||||||
unsigned long blocklength;
|
unsigned long blocklength = 0;
|
||||||
unsigned long samplespeed;
|
unsigned long samplespeed = 0;
|
||||||
unsigned int tc;
|
unsigned int tc = 0;
|
||||||
int packtype;
|
int packtype;
|
||||||
int voicemode;
|
int voicemode;
|
||||||
int done;
|
int done;
|
||||||
|
@ -585,8 +586,7 @@ playbackstatus MV_GetNextVOCBlock( VoiceNode *voice)
|
||||||
{
|
{
|
||||||
case 0 :
|
case 0 :
|
||||||
// End of data
|
// End of data
|
||||||
if ((voice->LoopStart == NULL) ||
|
if ((voice->LoopStart == NULL) || ((unsigned long *)voice->LoopStart >= (unsigned long *)(ptr - 4)))
|
||||||
(voice->LoopStart >= (ptr - 4)))
|
|
||||||
{
|
{
|
||||||
voice->Playing = FALSE;
|
voice->Playing = FALSE;
|
||||||
done = TRUE;
|
done = TRUE;
|
||||||
|
@ -658,7 +658,7 @@ playbackstatus MV_GetNextVOCBlock( VoiceNode *voice)
|
||||||
if (voice->LoopEnd == NULL)
|
if (voice->LoopEnd == NULL)
|
||||||
{
|
{
|
||||||
voice->LoopCount = *(unsigned short *)ptr;
|
voice->LoopCount = *(unsigned short *)ptr;
|
||||||
voice->LoopStart = ptr + blocklength;
|
voice->LoopStart = (char *)(ptr + blocklength);
|
||||||
}
|
}
|
||||||
ptr += blocklength;
|
ptr += blocklength;
|
||||||
break;
|
break;
|
||||||
|
@ -674,7 +674,7 @@ playbackstatus MV_GetNextVOCBlock( VoiceNode *voice)
|
||||||
{
|
{
|
||||||
if ((voice->LoopCount > 0) && (voice->LoopStart != NULL))
|
if ((voice->LoopCount > 0) && (voice->LoopStart != NULL))
|
||||||
{
|
{
|
||||||
ptr = voice->LoopStart;
|
ptr = (unsigned char *)voice->LoopStart;
|
||||||
if (voice->LoopCount < 0xffff)
|
if (voice->LoopCount < 0xffff)
|
||||||
{
|
{
|
||||||
voice->LoopCount--;
|
voice->LoopCount--;
|
||||||
|
@ -737,8 +737,8 @@ playbackstatus MV_GetNextVOCBlock( VoiceNode *voice)
|
||||||
|
|
||||||
if (voice->Playing)
|
if (voice->Playing)
|
||||||
{
|
{
|
||||||
voice->NextBlock = ptr + blocklength;
|
voice->NextBlock = (char *)(ptr + blocklength);
|
||||||
voice->sound = ptr;
|
voice->sound = (char *)ptr;
|
||||||
|
|
||||||
voice->SamplingRate = samplespeed;
|
voice->SamplingRate = samplespeed;
|
||||||
voice->RateScale = (voice->SamplingRate * voice->PitchScale) / MV_MixRate;
|
voice->RateScale = (voice->SamplingRate * voice->PitchScale) / MV_MixRate;
|
||||||
|
@ -902,7 +902,7 @@ playbackstatus MV_GetNextWAVBlock( VoiceNode *voice)
|
||||||
|
|
||||||
Starts recording of the waiting buffer.
|
Starts recording of the waiting buffer.
|
||||||
---------------------------------------------------------------------*/
|
---------------------------------------------------------------------*/
|
||||||
|
#if 0
|
||||||
static void MV_ServiceRecord( void)
|
static void MV_ServiceRecord( void)
|
||||||
|
|
||||||
{
|
{
|
||||||
|
@ -919,7 +919,7 @@ static void MV_ServiceRecord( void)
|
||||||
MV_MixPage = 0;
|
MV_MixPage = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
/*---------------------------------------------------------------------
|
/*---------------------------------------------------------------------
|
||||||
Function: MV_GetVoice
|
Function: MV_GetVoice
|
||||||
|
@ -1639,7 +1639,7 @@ void MV_SetReverbDelay( int delay)
|
||||||
int maxdelay;
|
int maxdelay;
|
||||||
|
|
||||||
maxdelay = MV_GetMaxReverbDelay();
|
maxdelay = MV_GetMaxReverbDelay();
|
||||||
MV_ReverbDelay = max(MixBufferSize, min(delay, maxdelay));
|
MV_ReverbDelay = max((signed)MixBufferSize, min(delay, maxdelay));
|
||||||
MV_ReverbDelay *= MV_SampleSize;
|
MV_ReverbDelay *= MV_SampleSize;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1751,7 +1751,7 @@ int MV_StartPlayback( void)
|
||||||
#else
|
#else
|
||||||
status = DSL_BeginBufferedPlayback(MV_MixBuffer[ 0 ],
|
status = DSL_BeginBufferedPlayback(MV_MixBuffer[ 0 ],
|
||||||
TotalBufferSize, MV_NumberOfBuffers,
|
TotalBufferSize, MV_NumberOfBuffers,
|
||||||
MV_RequestedMixRate, MV_MixMode, MV_ServiceVoc);
|
MV_RequestedMixRate, MV_MixMode, (void *)MV_ServiceVoc);
|
||||||
|
|
||||||
if (status != DSL_Ok)
|
if (status != DSL_Ok)
|
||||||
{
|
{
|
||||||
|
@ -2173,7 +2173,7 @@ int MV_PlayLoopedWAV( char *ptr,
|
||||||
return(MV_Error);
|
return(MV_Error);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (strncmp(data->DATA, "data", 4) != 0)
|
if (strncmp((char *)data->DATA, "data", 4) != 0)
|
||||||
{
|
{
|
||||||
MV_SetErrorCode(MV_InvalidWAVFile);
|
MV_SetErrorCode(MV_InvalidWAVFile);
|
||||||
return(MV_Error);
|
return(MV_Error);
|
||||||
|
@ -2202,7 +2202,7 @@ int MV_PlayLoopedWAV( char *ptr,
|
||||||
length /= 2;
|
length /= 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
loopend = min(loopend, data->size);
|
loopend = min(loopend, (signed)data->size);
|
||||||
absloopend = min(absloopend, length);
|
absloopend = min(absloopend, length);
|
||||||
|
|
||||||
voice->Playing = TRUE;
|
voice->Playing = TRUE;
|
||||||
|
@ -2221,7 +2221,7 @@ int MV_PlayLoopedWAV( char *ptr,
|
||||||
voice->LoopEnd = voice->NextBlock + loopend;
|
voice->LoopEnd = voice->NextBlock + loopend;
|
||||||
voice->LoopSize = absloopend - absloopstart;
|
voice->LoopSize = absloopend - absloopstart;
|
||||||
|
|
||||||
if ((loopstart >= data->size) || (loopstart < 0))
|
if ((loopstart >= (signed)data->size) || (loopstart < 0))
|
||||||
{
|
{
|
||||||
voice->LoopStart = NULL;
|
voice->LoopStart = NULL;
|
||||||
voice->LoopEnd = NULL;
|
voice->LoopEnd = NULL;
|
||||||
|
|
|
@ -1,12 +0,0 @@
|
||||||
#ifndef AUDIOLIB__UTIL_H
|
|
||||||
#define AUDIOLIB__UTIL_H
|
|
||||||
|
|
||||||
#ifndef min
|
|
||||||
#define min(a, b) ((a) < (b) ? (a) : (b))
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef max
|
|
||||||
#define max(a, b) ((a) > (b) ? (a) : (b))
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif
|
|
|
@ -229,7 +229,7 @@ void renderframe (uint16 framenumber, uint16 *pagepointer)
|
||||||
ppointer+=4;
|
ppointer+=4;
|
||||||
}
|
}
|
||||||
|
|
||||||
CPlayRunSkipDump (ppointer, anim->imagebuffer);
|
CPlayRunSkipDump ((char *)ppointer, (char *)anim->imagebuffer);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -264,7 +264,7 @@ void ANIM_LoadAnim (char * buffer)
|
||||||
Anim_Started = true;
|
Anim_Started = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
anim->buffer = buffer;
|
anim->buffer = (unsigned char *)buffer;
|
||||||
anim->curlpnum = 0xffff;
|
anim->curlpnum = 0xffff;
|
||||||
anim->currentframe = -1;
|
anim->currentframe = -1;
|
||||||
size = sizeof(lpfileheader);
|
size = sizeof(lpfileheader);
|
||||||
|
|
|
@ -3122,13 +3122,13 @@ cheat_for_port_credits:
|
||||||
minitextshade(70,34+l*8,tempbuf,(m+l == probey)?0:16,1,10+16);
|
minitextshade(70,34+l*8,tempbuf,(m+l == probey)?0:16,1,10+16);
|
||||||
|
|
||||||
//strcpy(tempbuf, KB_ScanCodeToString(KeyboardKeys[m+l][0]));
|
//strcpy(tempbuf, KB_ScanCodeToString(KeyboardKeys[m+l][0]));
|
||||||
strcpy(tempbuf, getkeyname(KeyboardKeys[m+l][0]));
|
strcpy(tempbuf, (char *)getkeyname(KeyboardKeys[m+l][0]));
|
||||||
if (!tempbuf[0]) strcpy(tempbuf, " -");
|
if (!tempbuf[0]) strcpy(tempbuf, " -");
|
||||||
minitextshade(70+100,34+l*8,tempbuf,
|
minitextshade(70+100,34+l*8,tempbuf,
|
||||||
(m+l == probey && !currentlist?0:16),2,10+16);
|
(m+l == probey && !currentlist?0:16),2,10+16);
|
||||||
|
|
||||||
//strcpy(tempbuf, KB_ScanCodeToString(KeyboardKeys[m+l][1]));
|
//strcpy(tempbuf, KB_ScanCodeToString(KeyboardKeys[m+l][1]));
|
||||||
strcpy(tempbuf, getkeyname(KeyboardKeys[m+l][1]));
|
strcpy(tempbuf, (char *)getkeyname(KeyboardKeys[m+l][1]));
|
||||||
if (!tempbuf[0]) strcpy(tempbuf, " -");
|
if (!tempbuf[0]) strcpy(tempbuf, " -");
|
||||||
minitextshade(70+120+34,34+l*8,tempbuf,
|
minitextshade(70+120+34,34+l*8,tempbuf,
|
||||||
(m+l == probey && currentlist?0:16),2,10+16);
|
(m+l == probey && currentlist?0:16),2,10+16);
|
||||||
|
@ -3771,11 +3771,11 @@ cheat_for_port_credits:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
Bsprintf(tempbuf,getjoyname(0,thispage*2));
|
Bsprintf(tempbuf,(char *)getjoyname(0,thispage*2));
|
||||||
menutext(42,32,0,0,tempbuf);
|
menutext(42,32,0,0,tempbuf);
|
||||||
if (twothispage)
|
if (twothispage)
|
||||||
{
|
{
|
||||||
Bsprintf(tempbuf,getjoyname(0,thispage*2+1));
|
Bsprintf(tempbuf,(char *)getjoyname(0,thispage*2+1));
|
||||||
menutext(42,32+64,0,0,tempbuf);
|
menutext(42,32+64,0,0,tempbuf);
|
||||||
}
|
}
|
||||||
gametext(76,38,"SCALE",0,2+8+16);
|
gametext(76,38,"SCALE",0,2+8+16);
|
||||||
|
@ -3899,7 +3899,7 @@ cheat_for_port_credits:
|
||||||
for (m=first;m<last;m++)
|
for (m=first;m<last;m++)
|
||||||
{
|
{
|
||||||
unsigned short odx,dx,ody,dy;
|
unsigned short odx,dx,ody,dy;
|
||||||
Bsprintf(tempbuf,getjoyname(0,m));
|
Bsprintf(tempbuf,(char *)getjoyname(0,m));
|
||||||
menutext(32,48+30*(m-first),0,0,tempbuf);
|
menutext(32,48+30*(m-first),0,0,tempbuf);
|
||||||
|
|
||||||
gametext(128,48+30*(m-first)-8,"DEAD",0,2+8+16);
|
gametext(128,48+30*(m-first)-8,"DEAD",0,2+8+16);
|
||||||
|
@ -3908,8 +3908,8 @@ cheat_for_port_credits:
|
||||||
dx = odx = min(64,64l*JoystickAnalogueDead[m]/10000l);
|
dx = odx = min(64,64l*JoystickAnalogueDead[m]/10000l);
|
||||||
dy = ody = min(64,64l*JoystickAnalogueSaturate[m]/10000l);
|
dy = ody = min(64,64l*JoystickAnalogueSaturate[m]/10000l);
|
||||||
|
|
||||||
bar(217,48+30*(m-first),&dx,4,x==((m-first)*2),0,0);
|
bar(217,48+30*(m-first),(short *)&dx,4,x==((m-first)*2),0,0);
|
||||||
bar(217,48+30*(m-first)+15,&dy,4,x==((m-first)*2+1),0,0);
|
bar(217,48+30*(m-first)+15,(short *)&dy,4,x==((m-first)*2+1),0,0);
|
||||||
|
|
||||||
Bsprintf(tempbuf,"%3d%%",100*dx/64);
|
Bsprintf(tempbuf,"%3d%%",100*dx/64);
|
||||||
gametext(217-49,48+30*(m-first)-8,tempbuf,0,2+8+16);
|
gametext(217-49,48+30*(m-first)-8,tempbuf,0,2+8+16);
|
||||||
|
|
|
@ -223,7 +223,7 @@ int osdcmd_fileinfo(const osdfuncparm_t *parm)
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
j = kread(i,buf,256);
|
j = kread(i,buf,256);
|
||||||
crc32block(&crc,buf,j);
|
crc32block(&crc,(unsigned char *)buf,j);
|
||||||
}
|
}
|
||||||
while (j == 256);
|
while (j == 256);
|
||||||
crc32finish(&crc);
|
crc32finish(&crc);
|
||||||
|
|
Loading…
Reference in a new issue