Fix various warnings

This commit is contained in:
Tim Angus committed 2025-09-07 17:03:20 +01:00
1 parent 549b686e22
commit f976711fb4
58 files changed
+384 -425

No files matched your search

+2 -2
View File
@@ -79,9 +79,9 @@ static int bufIndex;
SafeFS_Write
===============
*/
static ID_INLINE void SafeFS_Write( const void *buffer, int len, fileHandle_t f )
static ID_INLINE void SafeFS_Write( const void *buf, int len, fileHandle_t f )
{
if( FS_Write( buffer, len, f ) < len )
if( FS_Write( buf, len, f ) < len )
Com_Error( ERR_DROP, "Failed to write avi file" );
}
+3 -1
View File
@@ -934,7 +934,9 @@ static void setupQuad( long xOff, long yOff )
long numQuadCels, i,x,y;
byte *temp;
if (xOff == cin.oldXOff && yOff == cin.oldYOff && cinTable[currentHandle].ysize == cin.oldysize && cinTable[currentHandle].xsize == cin.oldxsize) {
if (xOff == cin.oldXOff && yOff == cin.oldYOff &&
(long)cinTable[currentHandle].ysize == cin.oldysize &&
(long)cinTable[currentHandle].xsize == cin.oldxsize) {
return;
}
+2 -2
View File
@@ -103,7 +103,7 @@ static void *GPA(char *str)
CL_HTTP_Init
=================
*/
qboolean CL_HTTP_Init()
qboolean CL_HTTP_Init(void)
{
if(cURLLib)
return qtrue;
@@ -158,7 +158,7 @@ qboolean CL_HTTP_Init()
CL_HTTP_Available
=================
*/
qboolean CL_HTTP_Available()
qboolean CL_HTTP_Available(void)
{
return cURLLib != NULL;
}
+2 -2
View File
@@ -104,7 +104,7 @@ void CL_HTTP_BeginDownload(const char *remoteURL)
BOOL success;
hUrl = InternetOpenUrlA(hInternet, remoteURL,
va("Referer: ioQ3://%s\r\n", NET_AdrToString(clc.serverAddress)), -1,
va("Referer: ioQ3://%s\r\n", NET_AdrToString(clc.serverAddress)), (DWORD)-1,
INTERNET_FLAG_HYPERLINK |
INTERNET_FLAG_NO_CACHE_WRITE |
INTERNET_FLAG_NO_COOKIES |
@@ -149,7 +149,7 @@ qboolean CL_HTTP_PerformDownload(void)
clc.downloadCount += bytesRead;
Cvar_SetValue("cl_downloadCount", clc.downloadCount);
int bytesWritten = FS_Write(readBuffer, bytesRead, clc.download);
DWORD bytesWritten = (DWORD)FS_Write(readBuffer, bytesRead, clc.download);
DropIf(bytesWritten != bytesRead, "bytesWritten != bytesRead");
return qfalse;
+1 -1
View File
@@ -168,7 +168,7 @@ void mumble_set_description(const char* description)
mbstowcs(lm->description, description, len);
}
void mumble_unlink()
void mumble_unlink(void)
{
if(!lm)
return;
+2 -2
View File
@@ -120,7 +120,7 @@ static void *S_CodecGetSound(const char *filename, snd_info_t *info)
S_CodecInit
=================
*/
void S_CodecInit()
void S_CodecInit(void)
{
codecs = NULL;
@@ -141,7 +141,7 @@ void S_CodecInit()
S_CodecShutdown
=================
*/
void S_CodecShutdown()
void S_CodecShutdown(void)
{
codecs = NULL;
}
+7 -7
View File
@@ -951,7 +951,7 @@ If raw data has been loaded in little endien binary form, this must be done.
If raw data was calculated, as with ADPCM, this should not be called.
=================
*/
void S_ByteSwapRawSamples( int samples, int width, int s_channels, const byte *data ) {
void S_ByteSwapRawSamples( int samples, int width, int numChannels, const byte *data ) {
int i;
if ( width != 2 ) {
@@ -961,7 +961,7 @@ void S_ByteSwapRawSamples( int samples, int width, int s_channels, const byte *d
return;
}
if ( s_channels == 2 ) {
if ( numChannels == 2 ) {
samples <<= 1;
}
for ( i = 0 ; i < samples ; i++ ) {
@@ -976,7 +976,7 @@ S_Base_RawSamples
Music streaming
============
*/
void S_Base_RawSamples( int stream, int samples, int rate, int width, int s_channels, const byte *data, float volume, int entityNum)
void S_Base_RawSamples( int stream, int samples, int rate, int width, int numChannels, const byte *data, float volume, int entityNum)
{
int i;
int src, dst;
@@ -1018,7 +1018,7 @@ void S_Base_RawSamples( int stream, int samples, int rate, int width, int s_chan
scale = (float)rate / dma.speed;
//Com_Printf ("%i < %i < %i\n", s_soundtime, s_paintedtime, s_rawend[stream]);
if (s_channels == 2 && width == 2)
if (numChannels == 2 && width == 2)
{
if (scale == 1.0)
{ // optimized case
@@ -1044,7 +1044,7 @@ void S_Base_RawSamples( int stream, int samples, int rate, int width, int s_chan
}
}
}
else if (s_channels == 1 && width == 2)
else if (numChannels == 1 && width == 2)
{
for (i=0 ; ; i++)
{
@@ -1057,7 +1057,7 @@ void S_Base_RawSamples( int stream, int samples, int rate, int width, int s_chan
rawsamples[dst].right = ((short *)data)[src] * intVolumeRight;
}
}
else if (s_channels == 2 && width == 1)
else if (numChannels == 2 && width == 1)
{
intVolumeLeft *= 256;
intVolumeRight *= 256;
@@ -1073,7 +1073,7 @@ void S_Base_RawSamples( int stream, int samples, int rate, int width, int s_chan
rawsamples[dst].right = ((char *)data)[src*2+1] * intVolumeRight;
}
}
else if (s_channels == 1 && width == 1)
else if (numChannels == 1 && width == 1)
{
intVolumeLeft *= 256;
intVolumeRight *= 256;
+26 -26
View File
@@ -41,35 +41,35 @@ static soundInterface_t si;
S_ValidateInterface
=================
*/
static qboolean S_ValidSoundInterface( soundInterface_t *si )
static qboolean S_ValidSoundInterface( soundInterface_t *pSi )
{
if( !si->Shutdown ) return qfalse;
if( !si->StartSound ) return qfalse;
if( !si->StartLocalSound ) return qfalse;
if( !si->StartBackgroundTrack ) return qfalse;
if( !si->StopBackgroundTrack ) return qfalse;
if( !si->RawSamples ) return qfalse;
if( !si->StopAllSounds ) return qfalse;
if( !si->ClearLoopingSounds ) return qfalse;
if( !si->AddLoopingSound ) return qfalse;
if( !si->AddRealLoopingSound ) return qfalse;
if( !si->StopLoopingSound ) return qfalse;
if( !si->Respatialize ) return qfalse;
if( !si->UpdateEntityPosition ) return qfalse;
if( !si->Update ) return qfalse;
if( !si->DisableSounds ) return qfalse;
if( !si->BeginRegistration ) return qfalse;
if( !si->RegisterSound ) return qfalse;
if( !si->ClearSoundBuffer ) return qfalse;
if( !si->SoundInfo ) return qfalse;
if( !si->SoundList ) return qfalse;
if( !pSi->Shutdown ) return qfalse;
if( !pSi->StartSound ) return qfalse;
if( !pSi->StartLocalSound ) return qfalse;
if( !pSi->StartBackgroundTrack ) return qfalse;
if( !pSi->StopBackgroundTrack ) return qfalse;
if( !pSi->RawSamples ) return qfalse;
if( !pSi->StopAllSounds ) return qfalse;
if( !pSi->ClearLoopingSounds ) return qfalse;
if( !pSi->AddLoopingSound ) return qfalse;
if( !pSi->AddRealLoopingSound ) return qfalse;
if( !pSi->StopLoopingSound ) return qfalse;
if( !pSi->Respatialize ) return qfalse;
if( !pSi->UpdateEntityPosition ) return qfalse;
if( !pSi->Update ) return qfalse;
if( !pSi->DisableSounds ) return qfalse;
if( !pSi->BeginRegistration ) return qfalse;
if( !pSi->RegisterSound ) return qfalse;
if( !pSi->ClearSoundBuffer ) return qfalse;
if( !pSi->SoundInfo ) return qfalse;
if( !pSi->SoundList ) return qfalse;
#ifdef USE_VOIP
if( !si->StartCapture ) return qfalse;
if( !si->AvailableCaptureSamples ) return qfalse;
if( !si->Capture ) return qfalse;
if( !si->StopCapture ) return qfalse;
if( !si->MasterGain ) return qfalse;
if( !pSi->StartCapture ) return qfalse;
if( !pSi->AvailableCaptureSamples ) return qfalse;
if( !pSi->Capture ) return qfalse;
if( !pSi->StopCapture ) return qfalse;
if( !pSi->MasterGain ) return qfalse;
#endif
return qtrue;
+1 -1
View File
@@ -649,7 +649,7 @@ Adapt the gain if necessary to get a quicker fadeout when the source is too far
static void S_AL_ScaleGain(src_t *chksrc, vec3_t origin)
{
float distance;
float distance = 0.0f;
if(!chksrc->local)
distance = Distance(origin, lastListenerOrigin);