Skip to content

Commit

Permalink
Fixed|libcommon: Compiler warnings (unused parameters)
Browse files Browse the repository at this point in the history
  • Loading branch information
danij-deng committed Jan 31, 2014
1 parent ce17792 commit 2a934f1
Show file tree
Hide file tree
Showing 12 changed files with 31 additions and 19 deletions.
2 changes: 1 addition & 1 deletion doomsday/plugins/common/src/p_ceiling.cpp
Expand Up @@ -506,7 +506,7 @@ static int EV_DoCeiling2(int tag, float basespeed, ceilingtype_e type)
}

#if __JHEXEN__
int EV_DoCeiling(Line *line, byte *args, ceilingtype_e type)
int EV_DoCeiling(Line * /*line*/, byte *args, ceilingtype_e type)
#else
int EV_DoCeiling(Line *line, ceilingtype_e type)
#endif
Expand Down
2 changes: 1 addition & 1 deletion doomsday/plugins/common/src/p_door.cpp
Expand Up @@ -467,7 +467,7 @@ static int EV_DoDoor2(int tag, float speed, int topwait, doortype_e type)
}

#if __JHEXEN__
int EV_DoDoor(Line *line, byte *args, doortype_e type)
int EV_DoDoor(Line * /*line*/, byte *args, doortype_e type)
{
return EV_DoDoor2((int) args[0], (float) args[1] * (1.0 / 8),
(int) args[2], type);
Expand Down
10 changes: 5 additions & 5 deletions doomsday/plugins/common/src/p_floor.cpp
Expand Up @@ -663,9 +663,9 @@ static Sector *findSectorSurroundingAtFloorHeight(Sector *sec, coord_t height)
#endif

#if __JHEXEN__
int EV_DoFloor(Line* line, byte* args, floortype_e floortype)
int EV_DoFloor(Line * /*line*/, byte* args, floortype_e floortype)
#else
int EV_DoFloor(Line* line, floortype_e floortype)
int EV_DoFloor(Line *line, floortype_e floortype)
#endif
{
#if !__JHEXEN__
Expand Down Expand Up @@ -1323,10 +1323,10 @@ static void processStairSector(Sector *sec, int type, coord_t height,
#endif

/**
* @param direction Positive = up. Negative = down.
* @param direction Positive = up. Negative = down.
*/
#if __JHEXEN__
int EV_BuildStairs(Line *line, byte *args, int direction, stairs_e stairsType)
int EV_BuildStairs(Line * /*line*/, byte *args, int direction, stairs_e stairsType)
{
// Set global stairs variables
stairData.textureChange = 0;
Expand Down Expand Up @@ -1505,7 +1505,7 @@ static int stopFloorCrush(thinker_t *th, void *context)
return false; // Continue iteration.
}

int EV_FloorCrushStop(Line *line, byte *args)
int EV_FloorCrushStop(Line * /*line*/, byte * /*args*/)
{
dd_bool found = false;

Expand Down
4 changes: 2 additions & 2 deletions doomsday/plugins/common/src/p_plat.cpp
Expand Up @@ -292,9 +292,9 @@ int plat_t::read(Reader *reader, int mapVersion)
}

#if __JHEXEN__
static int doPlat(Line* line, int tag, byte* args, plattype_e type, int amount)
static int doPlat(Line * /*line*/, int tag, byte *args, plattype_e type, int /*amount*/)
#else
static int doPlat(Line* line, int tag, plattype_e type, int amount)
static int doPlat(Line *line, int tag, plattype_e type, int amount)
#endif
{
#if !__JHEXEN__
Expand Down
4 changes: 3 additions & 1 deletion doomsday/plugins/common/src/p_scroll.cpp
Expand Up @@ -357,7 +357,9 @@ scroll_t *P_SpawnSectorMaterialOriginScroller(Sector *sector, uint planeId, shor

elementBits = 1 << planeId;
return spawnMaterialOriginScroller(sector, elementBits, offset);
#endif // __JHERETIC__ || __JHEXEN__
#else // !(__JHERETIC__ || __JHEXEN__)
DENG_UNUSED(special);
#endif

return 0;

Expand Down
8 changes: 6 additions & 2 deletions doomsday/plugins/common/src/p_switch.cpp
Expand Up @@ -390,10 +390,14 @@ static int chooseDefaultSound(switchlist_t const *info)
/// @todo Get these defaults from switchinfo.
#if __JHEXEN__
return info->soundID;
#elif __JHERETIC__
return SFX_SWITCH;
#else
# if __JHERETIC__
return SFX_SWITCH;
# else
return SFX_SWTCHN;
# endif

DENG_UNUSED(info);
#endif
}

Expand Down
4 changes: 2 additions & 2 deletions doomsday/plugins/common/src/p_xgsave.cpp
Expand Up @@ -89,7 +89,7 @@ void SV_ReadXGLine(Line *li, Reader *reader, int /*mapVersion*/)
/**
* @param fn This function must belong to XG sector @a xg.
*/
void SV_WriteXGFunction(xgsector_t *xg, function_t *fn, Writer *writer)
void SV_WriteXGFunction(xgsector_t * /*xg*/, function_t *fn, Writer *writer)
{
// Version byte.
Writer_WriteByte(writer, 1);
Expand All @@ -106,7 +106,7 @@ void SV_WriteXGFunction(xgsector_t *xg, function_t *fn, Writer *writer)
/**
* @param fn This function must belong to XG sector @a xg.
*/
void SV_ReadXGFunction(xgsector_t *xg, function_t *fn, Reader *reader, int mapVersion)
void SV_ReadXGFunction(xgsector_t * /*xg*/, function_t *fn, Reader *reader, int /*mapVersion*/)
{
// Version byte.
Reader_ReadByte(reader);
Expand Down
2 changes: 1 addition & 1 deletion doomsday/plugins/doom/src/p_lights.cpp
Expand Up @@ -65,7 +65,7 @@ void fireflicker_t::write(Writer *writer) const
* T_FireFlicker was added to save games in ver5, therefore we don't have
* an old format to support.
*/
int fireflicker_t::read(Reader *reader, int mapVersion)
int fireflicker_t::read(Reader *reader, int /*mapVersion*/)
{
/*int ver =*/ Reader_ReadByte(reader); // version byte.

Expand Down
4 changes: 2 additions & 2 deletions doomsday/plugins/doom64/src/p_lights.cpp
Expand Up @@ -62,7 +62,7 @@ void fireflicker_t::write(Writer *writer) const
* T_FireFlicker was added to save games in ver5, therefore we don't have
* an old format to support.
*/
int fireflicker_t::read(Reader *reader, int mapVersion)
int fireflicker_t::read(Reader *reader, int /*mapVersion*/)
{
/*int ver =*/ Reader_ReadByte(reader); // version byte.

Expand Down Expand Up @@ -255,7 +255,7 @@ void lightblink_t::write(Writer *writer) const
* T_LightBlink was added to save games in ver5, therefore we don't have an
* old format to support
*/
int lightblink_t::read(Reader *reader, int mapVersion)
int lightblink_t::read(Reader *reader, int /*mapVersion*/)
{
/*int ver =*/ Reader_ReadByte(reader); // version byte.

Expand Down
6 changes: 6 additions & 0 deletions doomsday/plugins/hexen/src/acscript.cpp
Expand Up @@ -660,11 +660,13 @@ typedef CommandResult (*CommandFunc) (CommandArgs const &args);

ACS_COMMAND(NOP)
{
DENG_UNUSED(args);
return Continue;
}

ACS_COMMAND(Terminate)
{
DENG_UNUSED(args);
return Terminate;
}

Expand Down Expand Up @@ -1360,6 +1362,7 @@ ACS_COMMAND(CaseGoto)

ACS_COMMAND(BeginPrint)
{
DENG_UNUSED(args);
*PrintBuffer = 0;
return Continue;
}
Expand Down Expand Up @@ -1387,6 +1390,7 @@ ACS_COMMAND(EndPrint)

ACS_COMMAND(EndPrintBold)
{
DENG_UNUSED(args);
for(int i = 0; i < MAXPLAYERS; ++i)
{
if(players[i].plr->inGame)
Expand Down Expand Up @@ -1909,6 +1913,8 @@ int ACScript::read(Reader *reader, int mapVersion)

D_CMD(ScriptInfo)
{
DENG_UNUSED(src);

int whichOne = argc == 2? atoi(argv[1]) : -1;

for(int i = 0; i < interp.scriptCount(); ++i)
Expand Down
2 changes: 1 addition & 1 deletion doomsday/plugins/hexen/src/p_lights.cpp
Expand Up @@ -174,7 +174,7 @@ int light_t::read(Reader *reader, int mapVersion)
return true; // Add this thinker.
}

dd_bool EV_SpawnLight(Line *line, byte *arg, lighttype_t type)
dd_bool EV_SpawnLight(Line * /*line*/, byte *arg, lighttype_t type)
{
int arg1, arg2, arg3, arg4;

Expand Down
2 changes: 1 addition & 1 deletion doomsday/plugins/hexen/src/p_pillar.cpp
Expand Up @@ -105,7 +105,7 @@ int pillar_t::read(Reader *reader, int mapVersion)
return true; // Add this thinker.
}

int EV_BuildPillar(Line *line, byte *args, dd_bool crush)
int EV_BuildPillar(Line * /*line*/, byte *args, dd_bool crush)
{
iterlist_t *list = P_GetSectorIterListForTag((int) args[0], false);
if(!list) return 0;
Expand Down

0 comments on commit 2a934f1

Please sign in to comment.