fixed some compiler warnings listed by XCode

This commit is contained in:
Christoph Oelckers 2020-03-05 00:26:37 +01:00
parent 2c50554c6f
commit 822079abe0
9 changed files with 12 additions and 32 deletions

View file

@ -326,7 +326,7 @@ void nnExtInitModernStuff(bool bSaveLoad) {
// the following trigger flags are sensless to have together // the following trigger flags are sensless to have together
if ((pXSprite->Touch && (pXSprite->Proximity || pXSprite->Sight) && pXSprite->DudeLockout) if ((pXSprite->Touch && (pXSprite->Proximity || pXSprite->Sight) && pXSprite->DudeLockout)
|| pXSprite->Touch && pXSprite->Proximity && !pXSprite->Sight) pXSprite->Touch = false; || (pXSprite->Touch && pXSprite->Proximity && !pXSprite->Sight)) pXSprite->Touch = false;
if (pXSprite->Proximity && pXSprite->Sight && pXSprite->DudeLockout) if (pXSprite->Proximity && pXSprite->Sight && pXSprite->DudeLockout)
pXSprite->Proximity = false; pXSprite->Proximity = false;
@ -1734,7 +1734,7 @@ void useEffectGen(XSPRITE* pXSource, spritetype* pSprite) {
break; break;
case 3: case 3:
case 4: case 4:
if (!sectRangeIsFine(pSprite->sectnum)) fallthrough__; // if (!sectRangeIsFine(pSprite->sectnum)) fallthrough__; Code is wrong
pos = (pXSource->data4 == 3) ? sector[pSprite->sectnum].floorz : sector[pSprite->sectnum].ceilingz; pos = (pXSource->data4 == 3) ? sector[pSprite->sectnum].floorz : sector[pSprite->sectnum].ceilingz;
break; break;
default: default:

View file

@ -2094,11 +2094,6 @@ void C_UndefineLevel(int32_t vol, int32_t lev)
gmap.designerTime = 0; gmap.designerTime = 0;
} }
LUNATIC_EXTERN int32_t C_SetDefName(const char *name)
{
return 0;
}
defaultprojectile_t DefaultProjectile; defaultprojectile_t DefaultProjectile;
EDUKE32_STATIC_ASSERT(sizeof(projectile_t) == sizeof(DefaultProjectile)); EDUKE32_STATIC_ASSERT(sizeof(projectile_t) == sizeof(DefaultProjectile));

View file

@ -1045,20 +1045,7 @@ static uint32_t calcsz(const dataspec_t *spec)
return dasiz; return dasiz;
} }
#ifdef USE_OPENGL
static void sv_prespriteextsave();
static void sv_postspriteext();
#endif
#if defined LUNATIC
// Recreate Lua state.
// XXX: It may matter a great deal when this is run from if the Lua code refers
// to C-side data at file scope. Such usage is strongly discouraged though.
static void sv_create_lua_state(void)
{
El_CreateGameState();
G_PostCreateGameState();
}
#endif
static void sv_postactordata(); static void sv_postactordata();
static void sv_preanimateptrsave(); static void sv_preanimateptrsave();
static void sv_postanimateptr(); static void sv_postanimateptr();

View file

@ -34,9 +34,6 @@ extern int32_t user_quote_time[MAXUSERQUOTES];
extern int32_t minitext_lowercase; extern int32_t minitext_lowercase;
extern int32_t minitext_yofs; extern int32_t minitext_yofs;
enum {
};
extern int32_t minitext_(int32_t x, int32_t y, const char *t, int32_t s, int32_t p, int32_t sb); extern int32_t minitext_(int32_t x, int32_t y, const char *t, int32_t s, int32_t p, int32_t sb);
extern void menutext_(int32_t x, int32_t y, int32_t s, char const *t, int32_t o, int32_t f); extern void menutext_(int32_t x, int32_t y, int32_t s, char const *t, int32_t o, int32_t f);
extern void captionmenutext(int32_t x, int32_t y, char const *t); extern void captionmenutext(int32_t x, int32_t y, char const *t);

View file

@ -371,7 +371,7 @@ protected:
class RedneckMainMenu : public RedneckListMenu class RedneckMainMenu : public RedneckListMenu
{ {
virtual void Init(DMenu* parent = NULL, FListMenuDescriptor* desc = NULL) virtual void Init(DMenu* parent = NULL, FListMenuDescriptor* desc = NULL) override
{ {
RedneckListMenu::Init(parent, desc); RedneckListMenu::Init(parent, desc);
Menu_DHLeaonardHeadReset(); Menu_DHLeaonardHeadReset();

View file

@ -2445,6 +2445,9 @@ void Net_Disconnect(void)
myconnectindex = screenpeek = 0; myconnectindex = screenpeek = 0;
G_BackToMenu(); G_BackToMenu();
break; break;
default:
break;
} }
} }
@ -2474,6 +2477,8 @@ void Net_Disconnect(void)
if (event.packet) if (event.packet)
enet_packet_destroy(event.packet); enet_packet_destroy(event.packet);
break; break;
default:
break;
} }
} }
enet_host_destroy(g_netServer); enet_host_destroy(g_netServer);

View file

@ -881,7 +881,7 @@ growspark_rr:
vel = 300; vel = 300;
startPos.z -= (15<<8); startPos.z -= (15<<8);
} }
else if (projecTile == UWHIP) else //if (projecTile == UWHIP)
{ {
vel = 300; vel = 300;
startPos.z += (4<<8); startPos.z += (4<<8);
@ -7213,7 +7213,7 @@ void P_ProcessInput(int playerNum)
} }
else if (pPlayer->moto_speed >= 20 && pPlayer->on_ground == 1 && (pPlayer->moto_on_mud || pPlayer->moto_on_oil)) else if (pPlayer->moto_speed >= 20 && pPlayer->on_ground == 1 && (pPlayer->moto_on_mud || pPlayer->moto_on_oil))
{ {
short var9c, vara0, vara4; short var9c, vara0, vara4 = 0;
var9c = pPlayer->moto_speed; var9c = pPlayer->moto_speed;
vara0 = fix16_to_int(pPlayer->q16ang); vara0 = fix16_to_int(pPlayer->q16ang);
var84 = krand2()&1; var84 = krand2()&1;

View file

@ -794,10 +794,6 @@ static uint32_t calcsz(const dataspec_t *spec)
return dasiz; return dasiz;
} }
#ifdef USE_OPENGL
static void sv_prespriteextsave();
static void sv_postspriteext();
#endif
static void sv_postactordata(); static void sv_postactordata();
static void sv_preanimateptrsave(); static void sv_preanimateptrsave();
static void sv_postanimateptr(); static void sv_postanimateptr();

View file

@ -34,7 +34,7 @@ class DukeSoundEngine : public SoundEngine
{ {
// client specific parts of the sound engine go in this class. // client specific parts of the sound engine go in this class.
void CalcPosVel(int type, const void* source, const float pt[3], int channum, int chanflags, FSoundID chanSound, FVector3* pos, FVector3* vel, FSoundChan* chan) override; void CalcPosVel(int type, const void* source, const float pt[3], int channum, int chanflags, FSoundID chanSound, FVector3* pos, FVector3* vel, FSoundChan* chan) override;
TArray<uint8_t> ReadSound(int lumpnum); TArray<uint8_t> ReadSound(int lumpnum) override;
public: public:
DukeSoundEngine() DukeSoundEngine()