shut up some compiler warnings

This commit is contained in:
Alug 2024-12-31 16:56:35 +01:00
parent 46a7bcad6f
commit 4cb315bfe7
9 changed files with 32 additions and 35 deletions

View file

@ -153,7 +153,7 @@ static boolean cl_redownloadinggamestate = false;
static UINT8 localtextcmd[MAXSPLITSCREENPLAYERS][MAXTEXTCMD];
static tic_t neededtic;
SINT8 servernode = 0; // the number of the server node
char connectedservername[MAXSERVERNAME];
char connectedservername[MAXSERVERNAME+1];
/// \brief do we accept new players?
/// \todo WORK!
boolean acceptnewnode = true;

View file

@ -439,7 +439,7 @@ extern boolean dedicated; // For dedicated server
extern UINT16 software_MAXPACKETLENGTH;
extern boolean acceptnewnode;
extern SINT8 servernode;
extern char connectedservername[MAXSERVERNAME];
extern char connectedservername[MAXSERVERNAME+1];
void Command_Ping_f(void);
extern tic_t connectiontimeout;

View file

@ -75,8 +75,6 @@
#include "discord.h"
#endif
extern consvar_t cv_showgremlins;
// ------
// protos
// ------

View file

@ -21,6 +21,8 @@
extern "C" {
#endif
extern consvar_t cv_showgremlins;
// console vars
extern consvar_t cv_playername[MAXSPLITSCREENPLAYERS];
extern consvar_t cv_playercolor[MAXSPLITSCREENPLAYERS];

View file

@ -3827,9 +3827,6 @@ void G_SaveDemo(void)
{
UINT8 *p = demobuf.buffer+16; // after version
UINT32 length;
#ifdef NOMD5
UINT8 i;
#endif
// Ensure extrainfo pointer is always available, even if no info is present.
if (demoinfo_p && *(UINT32 *)demoinfo_p == 0)
@ -3886,7 +3883,7 @@ void G_SaveDemo(void)
// Doesn't seem like I can use WriteDemoChecksum here, correct me if I'm wrong -Sal
#ifdef NOMD5
for (i = 0; i < 16; i++, p++)
for (UINT8 i = 0; i < 16; i++, p++)
*p = M_RandomByte(); // This MD5 was chosen by fair dice roll and most likely < 50% correct.
#else
// Make a checksum of everything after the checksum in the file up to the end of the standard data. Extrainfo is freely modifiable.

View file

@ -3603,8 +3603,6 @@ papercollision:
static void P_BouncePlayerMove(mobj_t *mo, TryMoveResult_t *result)
{
extern consvar_t cv_showgremlins;
fixed_t mmomx = 0, mmomy = 0;
fixed_t oldmomx = mo->momx, oldmomy = mo->momy;

View file

@ -3011,10 +3011,12 @@ boolean P_ProcessSpecial(activator_t *activator, INT16 special, INT32 *args, cha
case 423: // Change Sky
if ((mo && mo->player && P_IsLocalPlayer(mo->player)) || args[1])
{
if (udmf)
P_SetupLevelSky(stringargs[0], args[1]);
else
P_SetupLevelSky(va("SKY%d", args[0]), args[1]);
}
break;
case 424: // Change Weather

View file

@ -3381,30 +3381,30 @@ void R_ClipVisSprite(vissprite_t *spr, INT32 x1, INT32 x2, portal_t* portal)
if (ds->portalpass > 0 && ds->portalpass <= portalrender)
continue; // is a portal
if (ds->scale1 > ds->scale2)
{
lowscale = ds->scale2;
scale = ds->scale1;
}
else
{
lowscale = ds->scale1;
scale = ds->scale2;
}
if (ds->scale1 > ds->scale2)
{
lowscale = ds->scale2;
scale = ds->scale1;
}
else
{
lowscale = ds->scale1;
scale = ds->scale2;
}
if (scale < spr->sortscale ||
(lowscale < spr->sortscale &&
!R_PointOnSegSide (spr->gx, spr->gy, ds->curline)))
{
// masked mid texture?
/*
* if (ds->maskedtexturecol)
* R_RenderMaskedSegRange (ds, r1, r2);
*/
if (scale < spr->sortscale ||
(lowscale < spr->sortscale &&
!R_PointOnSegSide (spr->gx, spr->gy, ds->curline)))
{
// masked mid texture?
/*
* if (ds->maskedtexturecol)
* R_RenderMaskedSegRange (ds, r1, r2);
*/
// seg is behind sprite
continue;
}
// seg is behind sprite
continue;
}
}
r1 = ds->x1 < x1 ? x1 : ds->x1;

View file

@ -377,7 +377,7 @@ static void ST_pushDebugString(INT32 *height, const char *string)
*height -= 8;
}
static void ST_pushDebugTimeMS(INT32 *height, const char *label, UINT32 ms)
/*static void ST_pushDebugTimeMS(INT32 *height, const char *label, UINT32 ms)
{
ST_pushDebugString(height, va("%s%02d:%05.2f", label,
ms / 60000, ms % 60000 / 1000.f));
@ -423,7 +423,7 @@ static void ST_drawMusicDebug(INT32 *height)
}
ST_pushDebugString(height, va(" Song: %8s", mname));
}
}*/
static void ST_drawRenderDebug(INT32 *height)
{
@ -437,7 +437,7 @@ static void ST_drawRenderDebug(INT32 *height)
ST_pushDebugString(height, va("Skybox Portals: %4s", sizeu1(i->skybox_portals)));
}
void ST_drawDebugInfo(void)
static void ST_drawDebugInfo(void)
{
INT32 height = 192;