Addressed warnings from -Weverything subset:

-Wconditional-uninitialized
-Wshadow
-Wswitch-enum
-Wunreachable-code-break
-Wunused-macros
This commit is contained in:
wyld-sw
2017-01-20 15:59:11 -05:00
parent 821cb709c0
commit 4590ba16d6
20 changed files with 11 additions and 46 deletions

View File

@@ -8,9 +8,6 @@
* CircleMUD is based on DikuMUD, Copyright (C) 1990, 1991. *
**************************************************************************/
/** Help buffer the global variable definitions */
#define __CLASS_C__
/* This file attempts to concentrate most of the code which must be changed
* in order for new classes to be added. If you're adding a new class, you
* should go through this entire file from beginning to end and add the
@@ -1866,7 +1863,6 @@ const char *title_male(int chclass, int level)
case LVL_GRGOD: return "the God of Magic";
default: return "the Mage";
}
break;
case CLASS_CLERIC:
switch (level) {
@@ -1896,7 +1892,6 @@ const char *title_male(int chclass, int level)
case LVL_GRGOD: return "the God of Good and Evil";
default: return "the Cleric";
}
break;
case CLASS_THIEF:
switch (level) {
@@ -1926,7 +1921,6 @@ const char *title_male(int chclass, int level)
case LVL_GRGOD: return "the God of Thieves and Tradesmen";
default: return "the Thief";
}
break;
case CLASS_WARRIOR:
switch(level) {
@@ -1956,7 +1950,6 @@ const char *title_male(int chclass, int level)
case LVL_GRGOD: return "the God of War";
default: return "the Warrior";
}
break;
}
/* Default title for classes which do not have titles defined */
@@ -2010,7 +2003,6 @@ const char *title_female(int chclass, int level)
case LVL_GRGOD: return "the Goddess of Magic";
default: return "the Witch";
}
break;
case CLASS_CLERIC:
switch (level) {
@@ -2040,7 +2032,6 @@ const char *title_female(int chclass, int level)
case LVL_GRGOD: return "the Goddess of Good and Evil";
default: return "the Cleric";
}
break;
case CLASS_THIEF:
switch (level) {
@@ -2070,7 +2061,6 @@ const char *title_female(int chclass, int level)
case LVL_GRGOD: return "the Goddess of Thieves and Tradesmen";
default: return "the Thief";
}
break;
case CLASS_WARRIOR:
switch(level) {
@@ -2100,7 +2090,6 @@ const char *title_female(int chclass, int level)
case LVL_GRGOD: return "the Goddess of War";
default: return "the Warrior";
}
break;
}
/* Default title for classes which do not have titles defined */