Skip to content

Commit

Permalink
Fixed|libcommon: Various compiler warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
danij-deng committed Feb 25, 2014
1 parent 48a720b commit 1a0b530
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 18 deletions.
16 changes: 7 additions & 9 deletions doomsday/plugins/common/src/d_netcl.cpp
Expand Up @@ -652,7 +652,7 @@ void NetCl_UpdatePlayerState(Reader *msg, int plrNum)
#endif
}

void NetCl_UpdatePSpriteState(Reader *msg)
void NetCl_UpdatePSpriteState(Reader * /*msg*/)
{
// Not used.
/*
Expand All @@ -664,16 +664,14 @@ void NetCl_UpdatePSpriteState(Reader *msg)
*/
}

void NetCl_Intermission(Reader* msg)
void NetCl_Intermission(Reader *msg)
{
int flags = Reader_ReadByte(msg);

if(flags & IMF_BEGIN)
{
uint i;

// Close any HUDs left open at the end of the previous map.
for(i = 0; i < MAXPLAYERS; ++i)
for(uint i = 0; i < MAXPLAYERS; ++i)
{
ST_AutomapOpen(i, false, true);
#if __JHERETIC__ || __JHEXEN__
Expand All @@ -695,14 +693,14 @@ void NetCl_Intermission(Reader* msg)
wmInfo.nextMap = Reader_ReadByte(msg);
wmInfo.currentMap = Reader_ReadByte(msg);
wmInfo.didSecret = Reader_ReadByte(msg);
wmInfo.episode = gameEpisode;
wmInfo.episode = gameEpisode;

G_PrepareWIData();
#elif __JHERETIC__
wmInfo.episode = gameEpisode;
wmInfo.episode = gameEpisode;
#elif __JHEXEN__
nextMap = Reader_ReadByte(msg);
nextMapEntrance = Reader_ReadByte(msg);
nextMap = Reader_ReadByte(msg);
nextMapEntrance = Reader_ReadByte(msg);
#endif

#if __JDOOM__ || __JDOOM64__
Expand Down
14 changes: 7 additions & 7 deletions doomsday/plugins/common/src/d_netsv.cpp
Expand Up @@ -76,7 +76,7 @@ void NetSv_MapCycleTicker(void);
void NetSv_SendPlayerClass(int pnum, char cls);

char cyclingMaps;
char *mapCycle = "";
char *mapCycle = (char *)"";
char mapCycleNoExit = true;
int netSvAllowSendMsg = true;
int netSvAllowCheats;
Expand Down Expand Up @@ -388,7 +388,7 @@ void NetSv_TellCycleRulesToPlayerAfterTics(int destPlr, int tics)
{
cycleRulesCounter[destPlr] = tics;
}
else if(destPlr == DDSP_ALL_PLAYERS)
else if((unsigned)destPlr == DDSP_ALL_PLAYERS)
{
for(int i = 0; i < MAXPLAYERS; ++i)
{
Expand Down Expand Up @@ -680,7 +680,7 @@ void NetSv_SendGameState(int flags, int to)
for(int i = 0; i < MAXPLAYERS; ++i)
{
if(!players[i].plr->inGame) continue;
if(to != DDSP_ALL_PLAYERS && to != i) continue;
if((unsigned)to != DDSP_ALL_PLAYERS && to != i) continue;

Writer *writer = D_NetWrite();
Writer_WriteByte(writer, flags);
Expand Down Expand Up @@ -1139,9 +1139,9 @@ void NetSv_KillMessage(player_t *killer, player_t *fragged, dd_bool stomping)
tmp[1] = 0;

// Choose the right kill message template.
char *in = GET_TXT(stomping ? TXT_KILLMSG_STOMP : killer ==
fragged ? TXT_KILLMSG_SUICIDE : TXT_KILLMSG_WEAPON0 +
killer->readyWeapon);
char const *in = GET_TXT(stomping ? TXT_KILLMSG_STOMP : killer ==
fragged ? TXT_KILLMSG_SUICIDE : TXT_KILLMSG_WEAPON0 +
killer->readyWeapon);

for(; *in; in++)
{
Expand Down Expand Up @@ -1429,7 +1429,7 @@ void NetSv_SendMessageEx(int plrNum, char const *msg, dd_bool yellow)

App_Log(DE2_DEV_NET_VERBOSE, "NetSv_SendMessageEx: '%s'", msg);

if(plrNum == DDSP_ALL_PLAYERS)
if((unsigned)plrNum == DDSP_ALL_PLAYERS)
{
// Also show locally. No sound is played!
D_NetMessageNoSound(CONSOLEPLAYER, msg);
Expand Down
2 changes: 1 addition & 1 deletion doomsday/plugins/common/src/gamerules.cpp
Expand Up @@ -68,6 +68,7 @@ GameRuleset &GameRuleset::operator = (GameRuleset const &other)
void GameRuleset::write(Writer *writer) const
{
DENG2_ASSERT(writer != 0);

Writer_WriteByte(writer, skill);
Writer_WriteByte(writer, deathmatch);
#if !__JHEXEN__
Expand Down Expand Up @@ -106,7 +107,6 @@ void GameRuleset::read(Reader *reader)

// C wrapper API ---------------------------------------------------------------


skillmode_t GameRuleset_Skill(GameRuleset const *rules)
{
DENG2_ASSERT(rules != 0);
Expand Down
2 changes: 1 addition & 1 deletion doomsday/plugins/heretic/src/p_inter.c
Expand Up @@ -78,7 +78,7 @@ static dd_bool giveOneAmmo(player_t *plr, ammotype_t ammoType, int numRounds)
numRounds += numRounds / 1;
}

// Given the new ammo the player may want to change weapon atomatically.
// Given the new ammo the player may want to change weapon automatically.
P_MaybeChangeWeapon(plr, WT_NOCHANGE, ammoType, false /*don't force*/);

// Restock the player.
Expand Down

0 comments on commit 1a0b530

Please sign in to comment.