Skip to content

Commit

Permalink
Fixed|libcommon|libdoom|libdoom64|libheretic|libhexen: Compiler warni…
Browse files Browse the repository at this point in the history
…ngs (missing initializer, unused arg)
  • Loading branch information
danij-deng committed Jul 19, 2014
1 parent 2b4672b commit 99e8ad5
Show file tree
Hide file tree
Showing 11 changed files with 118 additions and 104 deletions.
2 changes: 2 additions & 0 deletions doomsday/plugins/common/src/hu_menu.cpp
Expand Up @@ -286,7 +286,9 @@ static float mnAlpha; // Alpha level for the entire menu.
static float mnTargetAlpha; // Target alpha for the entire UI.

static skillmode_t mnSkillmode = SM_MEDIUM;
#if __JDOOM__ || __JHERETIC__ || __JDOOM64__
static int mnEpisode;
#endif
#if __JHEXEN__
static int mnPlrClass = PCLASS_FIGHTER;
#endif
Expand Down
2 changes: 2 additions & 0 deletions doomsday/plugins/common/src/hu_msg.cpp
Expand Up @@ -269,6 +269,8 @@ void Hu_MsgStart(msgtype_t type, char const *msg, msgfunc_t callback,
*/
D_CMD(MsgResponse)
{
DENG2_UNUSED2(src, argc);

if(messageToPrint)
{
// Handle "Press any key to continue" messages.
Expand Down
204 changes: 102 additions & 102 deletions doomsday/plugins/common/src/m_ctrl.cpp
Expand Up @@ -67,100 +67,100 @@ struct controlconfig_t
};
static controlconfig_t controlConfig[] =
{
{ "Movement" },
{ "Movement", 0, 0, 0, 0 },
{ "Forward", 0, "walk", 0, CCF_NON_INVERSE },
{ "Backward", 0, "walk", 0, CCF_INVERSE },
{ "Strafe Left", 0, "sidestep", 0, CCF_INVERSE },
{ "Strafe Right", 0, "sidestep", 0, CCF_NON_INVERSE },
{ "Turn Left", 0, "turn", 0, CCF_STAGED | CCF_INVERSE | CCF_SIDESTEP_MODIFIER },
{ "Turn Right", 0, "turn", 0, CCF_STAGED | CCF_NON_INVERSE | CCF_SIDESTEP_MODIFIER },
{ "Jump", 0, 0, "impulse jump" },
{ "Use", 0, 0, "impulse use" },
{ "Jump", 0, 0, "impulse jump", 0 },
{ "Use", 0, 0, "impulse use", 0 },
{ "Fly Up", 0, "zfly", 0, CCF_STAGED | CCF_NON_INVERSE },
{ "Fly Down", 0, "zfly", 0, CCF_STAGED | CCF_INVERSE },
{ "Fall To Ground", 0, 0, "impulse falldown" },
{ "Speed", 0, "speed" },
{ "Strafe", 0, "strafe" },
{ "Fall To Ground", 0, 0, "impulse falldown", 0 },
{ "Speed", 0, "speed", 0, 0 },
{ "Strafe", 0, "strafe", 0, 0 },

{ "Looking" },
{ "Looking", 0, 0, 0, 0 },
{ "Look Up", 0, "look", 0, CCF_STAGED | CCF_NON_INVERSE },
{ "Look Down", 0, "look", 0, CCF_STAGED | CCF_INVERSE },
{ "Look Center", 0, 0, "impulse lookcenter" },
{ "Look Center", 0, 0, "impulse lookcenter", 0 },

{ "Weapons" },
{ "Attack/Fire", 0, "attack" },
{ "Next Weapon", 0, 0, "impulse nextweapon" },
{ "Previous Weapon", 0, 0, "impulse prevweapon" },
{ "Weapons", 0, 0, 0, 0 },
{ "Attack/Fire", 0, "attack", 0, 0 },
{ "Next Weapon", 0, 0, "impulse nextweapon", 0 },
{ "Previous Weapon", 0, 0, "impulse prevweapon", 0 },

#if __JDOOM__ || __JDOOM64__
{ "Fist/Chainsaw", 0, 0, "impulse weapon1" },
{ "Chainsaw/Fist", 0, 0, "impulse weapon8" },
{ "Pistol", 0, 0, "impulse weapon2" },
{ "Super SG/Shotgun", 0, 0, "impulse weapon3" },
{ "Shotgun/Super SG", 0, 0, "impulse weapon9" },
{ "Chaingun", 0, 0, "impulse weapon4" },
{ "Rocket Launcher", 0, 0, "impulse weapon5" },
{ "Plasma Rifle", 0, 0, "impulse weapon6" },
{ "BFG 9000", 0, 0, "impulse weapon7" },
{ "Fist/Chainsaw", 0, 0, "impulse weapon1", 0 },
{ "Chainsaw/Fist", 0, 0, "impulse weapon8", 0 },
{ "Pistol", 0, 0, "impulse weapon2", 0 },
{ "Super SG/Shotgun", 0, 0, "impulse weapon3", 0 },
{ "Shotgun/Super SG", 0, 0, "impulse weapon9", 0 },
{ "Chaingun", 0, 0, "impulse weapon4", 0 },
{ "Rocket Launcher", 0, 0, "impulse weapon5", 0 },
{ "Plasma Rifle", 0, 0, "impulse weapon6", 0 },
{ "BFG 9000", 0, 0, "impulse weapon7", 0 },
#endif
#if __JDOOM64__
{ "Unmaker", 0, 0, "impulse weapon10" },
{ "Unmaker", 0, 0, "impulse weapon10", 0 },
#endif

#if __JHERETIC__
{ "Gauntlets/Staff", 0, 0, "impulse weapon1" },
{ "Elvenwand", 0, 0, "impulse weapon2" },
{ "Crossbow", 0, 0, "impulse weapon3" },
{ "Dragon Claw", 0, 0, "impulse weapon4" },
{ "Hellstaff", 0, 0, "impulse weapon5" },
{ "Phoenix Rod", 0, 0, "impulse weapon6" },
{ "Firemace", 0, 0, "impulse weapon7" },
{ "Gauntlets/Staff", 0, 0, "impulse weapon1", 0 },
{ "Elvenwand", 0, 0, "impulse weapon2", 0 },
{ "Crossbow", 0, 0, "impulse weapon3", 0 },
{ "Dragon Claw", 0, 0, "impulse weapon4", 0 },
{ "Hellstaff", 0, 0, "impulse weapon5", 0 },
{ "Phoenix Rod", 0, 0, "impulse weapon6", 0 },
{ "Firemace", 0, 0, "impulse weapon7", 0 },
#endif

#if __JHEXEN__
{ "Weapon 1", 0, 0, "impulse weapon1" },
{ "Weapon 2", 0, 0, "impulse weapon2" },
{ "Weapon 3", 0, 0, "impulse weapon3" },
{ "Weapon 4", 0, 0, "impulse weapon4" },
{ "Weapon 1", 0, 0, "impulse weapon1", 0 },
{ "Weapon 2", 0, 0, "impulse weapon2", 0 },
{ "Weapon 3", 0, 0, "impulse weapon3", 0 },
{ "Weapon 4", 0, 0, "impulse weapon4", 0 },
#endif

#if __JHERETIC__ || __JHEXEN__
{ "Inventory" },
{ "Inventory", 0, 0, 0, 0 },
{ "Move Left", 0, 0, "impulse previtem", CCF_REPEAT },
{ "Move Right", 0, 0, "impulse nextitem", CCF_REPEAT },
{ "Use Item", 0, 0, "impulse useitem" },
{ "Panic!", 0, 0, "impulse panic" },
{ "Use Item", 0, 0, "impulse useitem", 0 },
{ "Panic!", 0, 0, "impulse panic", 0 },
#endif

#ifdef __JHERETIC__
{ (char const *) TXT_TXT_INV_INVULNERABILITY, 0, 0, "impulse invulnerability" },
{ (char const *) TXT_TXT_INV_INVISIBILITY, 0, 0, "impulse invisibility" },
{ (char const *) TXT_TXT_INV_HEALTH, 0, 0, "impulse health" },
{ (char const *) TXT_TXT_INV_SUPERHEALTH, 0, 0, "impulse superhealth" },
{ (char const *) TXT_TXT_INV_TOMEOFPOWER, 0, 0, "impulse tome" },
{ (char const *) TXT_TXT_INV_TORCH, 0, 0, "impulse torch" },
{ (char const *) TXT_TXT_INV_FIREBOMB, 0, 0, "impulse firebomb" },
{ (char const *) TXT_TXT_INV_EGG, 0, 0, "impulse egg" },
{ (char const *) TXT_TXT_INV_FLY, 0, 0, "impulse fly" },
{ (char const *) TXT_TXT_INV_TELEPORT, 0, 0, "impulse teleport" },
{ (char const *) TXT_TXT_INV_INVULNERABILITY, 0, 0, "impulse invulnerability", 0 },
{ (char const *) TXT_TXT_INV_INVISIBILITY, 0, 0, "impulse invisibility", 0 },
{ (char const *) TXT_TXT_INV_HEALTH, 0, 0, "impulse health", 0 },
{ (char const *) TXT_TXT_INV_SUPERHEALTH, 0, 0, "impulse superhealth", 0 },
{ (char const *) TXT_TXT_INV_TOMEOFPOWER, 0, 0, "impulse tome", 0 },
{ (char const *) TXT_TXT_INV_TORCH, 0, 0, "impulse torch", 0 },
{ (char const *) TXT_TXT_INV_FIREBOMB, 0, 0, "impulse firebomb", 0 },
{ (char const *) TXT_TXT_INV_EGG, 0, 0, "impulse egg", 0 },
{ (char const *) TXT_TXT_INV_FLY, 0, 0, "impulse fly", 0 },
{ (char const *) TXT_TXT_INV_TELEPORT, 0, 0, "impulse teleport", 0 },
#endif

#ifdef __JHEXEN__
{ (char const *) TXT_TXT_INV_TORCH, 0, 0, "impulse torch" },
{ (char const *) TXT_TXT_INV_HEALTH, 0, 0, "impulse health" },
{ (char const *) TXT_TXT_INV_SUPERHEALTH, 0, 0, "impulse mysticurn" },
{ (char const *) TXT_TXT_INV_BOOSTMANA, 0, 0, "impulse krater" },
{ (char const *) TXT_TXT_INV_SPEED, 0, 0, "impulse speedboots" },
{ (char const *) TXT_TXT_INV_BLASTRADIUS, 0, 0, "impulse blast" },
{ (char const *) TXT_TXT_INV_TELEPORT, 0, 0, "impulse teleport" },
{ (char const *) TXT_TXT_INV_TELEPORTOTHER, 0, 0, "impulse teleportother" },
{ (char const *) TXT_TXT_INV_POISONBAG, 0, 0, "impulse poisonbag" },
{ (char const *) TXT_TXT_INV_INVULNERABILITY, 0, 0, "impulse invulnerability" },
{ (char const *) TXT_TXT_INV_SUMMON, 0, 0, "impulse darkservant" },
{ (char const *) TXT_TXT_INV_EGG, 0, 0, "impulse egg" },
{ (char const *) TXT_TXT_INV_TORCH, 0, 0, "impulse torch", 0 },
{ (char const *) TXT_TXT_INV_HEALTH, 0, 0, "impulse health", 0 },
{ (char const *) TXT_TXT_INV_SUPERHEALTH, 0, 0, "impulse mysticurn", 0 },
{ (char const *) TXT_TXT_INV_BOOSTMANA, 0, 0, "impulse krater", 0 },
{ (char const *) TXT_TXT_INV_SPEED, 0, 0, "impulse speedboots", 0 },
{ (char const *) TXT_TXT_INV_BLASTRADIUS, 0, 0, "impulse blast", 0 },
{ (char const *) TXT_TXT_INV_TELEPORT, 0, 0, "impulse teleport", 0 },
{ (char const *) TXT_TXT_INV_TELEPORTOTHER, 0, 0, "impulse teleportother", 0 },
{ (char const *) TXT_TXT_INV_POISONBAG, 0, 0, "impulse poisonbag", 0 },
{ (char const *) TXT_TXT_INV_INVULNERABILITY, 0, 0, "impulse invulnerability", 0 },
{ (char const *) TXT_TXT_INV_SUMMON, 0, 0, "impulse darkservant", 0 },
{ (char const *) TXT_TXT_INV_EGG, 0, 0, "impulse egg", 0 },
#endif

{ "Chat" },
{ "Chat", 0, 0, 0, 0 },
{ "Open Chat", 0, 0, "beginchat", CCF_MULTIPLAYER },

#if __JDOOM__ || __JDOOM64__
Expand All @@ -177,71 +177,71 @@ static controlconfig_t controlConfig[] =
{ "Blue Chat", 0, 0, "beginchat 3", CCF_MULTIPLAYER },
#endif

{ "Send Message", "chat", 0, "chatcomplete" },
{ "Cancel Message", "chat", 0, "chatcancel" },
{ "Macro 1", "chat", 0, "chatsendmacro 0" },
{ "Macro 2", "chat", 0, "chatsendmacro 1" },
{ "Macro 3", "chat", 0, "chatsendmacro 2" },
{ "Macro 4", "chat", 0, "chatsendmacro 3" },
{ "Macro 5", "chat", 0, "chatsendmacro 4" },
{ "Macro 6", "chat", 0, "chatsendmacro 5" },
{ "Macro 7", "chat", 0, "chatsendmacro 6" },
{ "Macro 8", "chat", 0, "chatsendmacro 7" },
{ "Macro 9", "chat", 0, "chatsendmacro 8" },
{ "Macro 10", "chat", 0, "chatsendmacro 9" },
{ "Send Message", "chat", 0, "chatcomplete", 0 },
{ "Cancel Message", "chat", 0, "chatcancel", 0 },
{ "Macro 1", "chat", 0, "chatsendmacro 0", 0 },
{ "Macro 2", "chat", 0, "chatsendmacro 1", 0 },
{ "Macro 3", "chat", 0, "chatsendmacro 2", 0 },
{ "Macro 4", "chat", 0, "chatsendmacro 3", 0 },
{ "Macro 5", "chat", 0, "chatsendmacro 4", 0 },
{ "Macro 6", "chat", 0, "chatsendmacro 5", 0 },
{ "Macro 7", "chat", 0, "chatsendmacro 6", 0 },
{ "Macro 8", "chat", 0, "chatsendmacro 7", 0 },
{ "Macro 9", "chat", 0, "chatsendmacro 8", 0 },
{ "Macro 10", "chat", 0, "chatsendmacro 9", 0 },
{ "Backspace", "chat", 0, "chatdelete", CCF_REPEAT },

{ "Map" },
{ "Show/Hide Map", 0, 0, "impulse automap" },
{ "Map", 0, 0, 0, 0 },
{ "Show/Hide Map", 0, 0, "impulse automap", 0 },
{ "Zoom In", 0, "mapzoom", 0, CCF_NON_INVERSE },
{ "Zoom Out", 0, "mapzoom", 0, CCF_INVERSE },
{ "Zoom Maximum", "map", 0, "impulse zoommax" },
{ "Zoom Maximum", "map", 0, "impulse zoommax", 0 },
{ "Pan Left", 0, "mappanx", 0, CCF_INVERSE },
{ "Pan Right", 0, "mappanx", 0, CCF_NON_INVERSE },
{ "Pan Up", 0, "mappany", 0, CCF_NON_INVERSE },
{ "Pan Down", 0, "mappany", 0, CCF_INVERSE },
{ "Toggle Follow", "map", 0, "impulse follow" },
{ "Toggle Rotation", "map", 0, "impulse rotate" },
{ "Add Mark", "map", 0, "impulse addmark" },
{ "Clear Marks", "map", 0, "impulse clearmarks" },
{ "Toggle Follow", "map", 0, "impulse follow", 0 },
{ "Toggle Rotation", "map", 0, "impulse rotate", 0 },
{ "Add Mark", "map", 0, "impulse addmark", 0 },
{ "Clear Marks", "map", 0, "impulse clearmarks", 0 },

{ "HUD" },
{ "Show HUD", 0, 0, "impulse showhud" },
{ "HUD", 0, 0, 0, 0 },
{ "Show HUD", 0, 0, "impulse showhud", 0 },
{ "Show Score", 0, 0, "impulse showscore", CCF_REPEAT },
{ "Smaller View", 0, 0, "sub view-size 1", CCF_REPEAT },
{ "Larger View", 0, 0, "add view-size 1", CCF_REPEAT },

{ "Message Refresh", 0, 0, "impulse msgrefresh" },
{ "Message Refresh", 0, 0, "impulse msgrefresh", 0 },

{ "Shortcuts" },
{ "Pause Game", 0, 0, "pause" },
{ "Shortcuts", 0, 0, 0, 0 },
{ "Pause Game", 0, 0, "pause", 0 },
#if !__JDOOM64__
{ "Help Screen", "shortcut", 0, "helpscreen" },
{ "Help Screen", "shortcut", 0, "helpscreen", 0 },
#endif
{ "End Game", "shortcut", 0, "endgame" },
{ "Save Game", "shortcut", 0, "menu savegame" },
{ "Load Game", "shortcut", 0, "menu loadgame" },
{ "Quick Save", "shortcut", 0, "quicksave" },
{ "Quick Load", "shortcut", 0, "quickload" },
{ "Sound Options", "shortcut", 0, "menu soundoptions" },
{ "Toggle Messages", "shortcut", 0, "toggle msg-show" },
{ "Gamma Correction", "shortcut", 0, "togglegamma" },
{ "Screenshot", "shortcut", 0, "screenshot" },
{ "Quit", "shortcut", 0, "quit" },

{ "Menu" },
{ "Show/Hide Menu", "shortcut", 0, "menu" },
{ "End Game", "shortcut", 0, "endgame", 0 },
{ "Save Game", "shortcut", 0, "menu savegame", 0 },
{ "Load Game", "shortcut", 0, "menu loadgame", 0 },
{ "Quick Save", "shortcut", 0, "quicksave", 0 },
{ "Quick Load", "shortcut", 0, "quickload", 0 },
{ "Sound Options", "shortcut", 0, "menu soundoptions", 0 },
{ "Toggle Messages", "shortcut", 0, "toggle msg-show", 0 },
{ "Gamma Correction", "shortcut", 0, "togglegamma", 0 },
{ "Screenshot", "shortcut", 0, "screenshot", 0 },
{ "Quit", "shortcut", 0, "quit", 0 },

{ "Menu", 0, 0, 0, 0 },
{ "Show/Hide Menu", "shortcut", 0, "menu", 0 },
{ "Previous Menu", "menu", 0, "menuback", CCF_REPEAT },
{ "Move Up", "menu", 0, "menuup", CCF_REPEAT },
{ "Move Down", "menu", 0, "menudown", CCF_REPEAT },
{ "Move Left", "menu", 0, "menuleft", CCF_REPEAT },
{ "Move Right", "menu", 0, "menuright", CCF_REPEAT },
{ "Select", "menu", 0, "menuselect" },
{ "Select", "menu", 0, "menuselect", 0 },

{ "On-Screen Questions" },
{ "Answer Yes", "message", 0, "messageyes" },
{ "Answer No", "message", 0, "messageno" },
{ "Cancel", "message", 0, "messagecancel" },
{ "On-Screen Questions", 0, 0, 0, 0 },
{ "Answer Yes", "message", 0, "messageyes", 0 },
{ "Answer No", "message", 0, "messageno", 0 },
{ "Cancel", "message", 0, "messagecancel", 0 },
};

static void deleteBinding(bindingitertype_t /*type*/, int bid, char const * /*name*/, dd_bool /*isInverse*/, void * /*data*/)
Expand Down
2 changes: 1 addition & 1 deletion doomsday/plugins/common/src/mapinfo.cpp
Expand Up @@ -1102,7 +1102,7 @@ de::Uri P_TranslateMapIfExists(uint map)
{
MapInfo const &info = i->second;

if(info.geti("warpTrans") == map)
if((unsigned)info.geti("warpTrans") == map)
{
if(info.geti("hub"))
{
Expand Down
2 changes: 2 additions & 0 deletions doomsday/plugins/common/src/pause.cpp
Expand Up @@ -109,6 +109,8 @@ dd_bool Pause_IsUserPaused()

D_CMD(Pause)
{
DENG2_UNUSED3(src, argc, argv);

if(G_QuitInProgress())
return false;

Expand Down
1 change: 1 addition & 0 deletions doomsday/plugins/doom/src/d_console.cpp
Expand Up @@ -70,6 +70,7 @@ static void viewResizeAudioFeedback()

D_CMD(ScreenShot)
{
DENG2_UNUSED3(src, argc, argv);
G_SetGameAction(GA_SCREENSHOT);
return true;
}
Expand Down
2 changes: 2 additions & 0 deletions doomsday/plugins/doom/src/p_pspr.c
Expand Up @@ -400,6 +400,8 @@ void C_DECL A_Saw(player_t *player, pspdef_t *psp)
int damage;
float slope;

DENG_UNUSED(psp);

P_ShotAmmo(player);
player->update |= PSF_AMMO;

Expand Down
1 change: 1 addition & 0 deletions doomsday/plugins/doom64/src/d_console.cpp
Expand Up @@ -54,6 +54,7 @@ static void updateEyeHeight()

D_CMD(ScreenShot)
{
DENG2_UNUSED3(src, argc, argv);
G_SetGameAction(GA_SCREENSHOT);
return true;
}
Expand Down
4 changes: 3 additions & 1 deletion doomsday/plugins/doom64/src/p_pspr.c
Expand Up @@ -404,12 +404,14 @@ void C_DECL A_Punch(player_t *player, pspdef_t *psp)
}
}

void C_DECL A_Saw(player_t* player, pspdef_t* psp)
void C_DECL A_Saw(player_t *player, pspdef_t *psp)
{
angle_t angle;
int damage;
float slope;

DENG_UNUSED(psp);

P_ShotAmmo(player);
player->update |= PSF_AMMO;

Expand Down
1 change: 1 addition & 0 deletions doomsday/plugins/heretic/src/h_console.cpp
Expand Up @@ -60,6 +60,7 @@ static void updateEyeHeight()

D_CMD(ScreenShot)
{
DENG2_UNUSED3(src, argc, argv);
G_SetGameAction(GA_SCREENSHOT);
return true;
}
Expand Down
1 change: 1 addition & 0 deletions doomsday/plugins/hexen/src/hconsole.cpp
Expand Up @@ -62,6 +62,7 @@ static void updateEyeHeight()

D_CMD(ScreenShot)
{
DENG2_UNUSED3(src, argc, argv);
G_SetGameAction(GA_SCREENSHOT);
return true;
}
Expand Down

0 comments on commit 99e8ad5

Please sign in to comment.