Fix some warnings

Remove an unused variable, add missing FALLTHRUs, and use the same
FALLTHRU wording where it wasn't recognized by gcc
This commit is contained in:
Pasi Kallinen
2018-03-30 19:42:50 +03:00
parent a365dc3450
commit 2548d68dd3
35 changed files with 80 additions and 32 deletions
+2
View File
@@ -3300,10 +3300,12 @@ struct obj *obj;
goto wanexpl; goto wanexpl;
case WAN_FIRE: case WAN_FIRE:
expltype = EXPL_FIERY; expltype = EXPL_FIERY;
/*FALLTHRU*/
case WAN_COLD: case WAN_COLD:
if (expltype == EXPL_MAGICAL) if (expltype == EXPL_MAGICAL)
expltype = EXPL_FROSTY; expltype = EXPL_FROSTY;
dmg *= 2; dmg *= 2;
/*FALLTHRU*/
case WAN_MAGIC_MISSILE: case WAN_MAGIC_MISSILE:
wanexpl: wanexpl:
explode(u.ux, u.uy, -(obj->otyp), dmg, WAND_CLASS, expltype); explode(u.ux, u.uy, -(obj->otyp), dmg, WAND_CLASS, expltype);
-4
View File
@@ -1355,7 +1355,6 @@ int *colorptr;
/* there are hilites set here */ /* there are hilites set here */
int max_pc = 0, min_pc = 100; int max_pc = 0, min_pc = 100;
int max_val = 0, min_val = LARGEST_INT; int max_val = 0, min_val = LARGEST_INT;
boolean changed = FALSE;
boolean exactmatch = FALSE; boolean exactmatch = FALSE;
hl = blstats[idx][fldidx].thresholds; hl = blstats[idx][fldidx].thresholds;
@@ -1382,14 +1381,11 @@ int *colorptr;
case BL_TH_UPDOWN: case BL_TH_UPDOWN:
if (chg < 0 && hl->rel == LT_VALUE) { if (chg < 0 && hl->rel == LT_VALUE) {
merge_bestcolor(&bestcolor, hl->coloridx); merge_bestcolor(&bestcolor, hl->coloridx);
changed = TRUE;
} else if (chg > 0 && hl->rel == GT_VALUE) { } else if (chg > 0 && hl->rel == GT_VALUE) {
merge_bestcolor(&bestcolor, hl->coloridx); merge_bestcolor(&bestcolor, hl->coloridx);
changed = TRUE;
} else if (hl->rel == EQ_VALUE && chg) { } else if (hl->rel == EQ_VALUE && chg) {
merge_bestcolor(&bestcolor, hl->coloridx); merge_bestcolor(&bestcolor, hl->coloridx);
min_val = max_val = hl->value.a_int; min_val = max_val = hl->value.a_int;
changed = TRUE;
} }
break; break;
case BL_TH_VAL_ABSOLUTE: case BL_TH_VAL_ABSOLUTE:
+8 -4
View File
@@ -4118,7 +4118,8 @@ register char *cmd;
break; break;
case NHKF_RUN2: case NHKF_RUN2:
if (!Cmd.num_pad) if (!Cmd.num_pad)
break; /* else FALLTHRU */ break;
/*FALLTHRU*/
case NHKF_RUN: case NHKF_RUN:
if (movecmd(lowc(cmd[1]))) { if (movecmd(lowc(cmd[1]))) {
context.run = 3; context.run = 3;
@@ -4128,7 +4129,8 @@ register char *cmd;
break; break;
case NHKF_FIGHT2: case NHKF_FIGHT2:
if (!Cmd.num_pad) if (!Cmd.num_pad)
break; /* else FALLTHRU */ break;
/*FALLTHRU*/
/* Effects of movement commands and invisible monsters: /* Effects of movement commands and invisible monsters:
* m: always move onto space (even if 'I' remembered) * m: always move onto space (even if 'I' remembered)
* F: always attack space (even if 'I' not remembered) * F: always attack space (even if 'I' not remembered)
@@ -4527,14 +4529,16 @@ const char *msg;
break; break;
case NHKF_RUN2: case NHKF_RUN2:
if (!Cmd.num_pad) if (!Cmd.num_pad)
break; /* else FALLTHRU */ break;
/*FALLTHRU*/
case NHKF_RUN: case NHKF_RUN:
case NHKF_RUN_NOPICKUP: case NHKF_RUN_NOPICKUP:
dothat = "run"; dothat = "run";
break; break;
case NHKF_FIGHT2: case NHKF_FIGHT2:
if (!Cmd.num_pad) if (!Cmd.num_pad)
break; /* else FALLTHRU */ break;
/*FALLTHRU*/
case NHKF_FIGHT: case NHKF_FIGHT:
dothat = "fight"; dothat = "fight";
how = ""; /* avoid "fight at yourself" */ how = ""; /* avoid "fight at yourself" */
+1
View File
@@ -391,6 +391,7 @@ xchar worm_tail; /* mon is actually a worm tail */
default: default:
impossible("display_monster: bad m_ap_type value [ = %d ]", impossible("display_monster: bad m_ap_type value [ = %d ]",
(int) mon->m_ap_type); (int) mon->m_ap_type);
/*FALLTHRU*/
case M_AP_NOTHING: case M_AP_NOTHING:
show_glyph(x, y, mon_to_glyph(mon)); show_glyph(x, y, mon_to_glyph(mon));
break; break;
+3 -1
View File
@@ -846,6 +846,7 @@ dokick()
pline("%s burps loudly.", Monnam(u.ustuck)); pline("%s burps loudly.", Monnam(u.ustuck));
break; break;
} }
/*FALLTHRU*/
default: default:
Your("feeble kick has no effect."); Your("feeble kick has no effect.");
break; break;
@@ -1327,7 +1328,8 @@ schar loc;
} else if (In_endgame(&u.uz) || Is_botlevel(&u.uz)) { } else if (In_endgame(&u.uz) || Is_botlevel(&u.uz)) {
cc->y = cc->x = 0; cc->y = cc->x = 0;
break; break;
} /* else fall to the next cases */ }
/*FALLTHRU*/
case MIGR_STAIRS_UP: case MIGR_STAIRS_UP:
case MIGR_LADDER_UP: case MIGR_LADDER_UP:
cc->x = u.uz.dnum; cc->x = u.uz.dnum;
+2
View File
@@ -957,6 +957,7 @@ boolean hitsroof;
Your("%s fails to protect you.", helm_simple_name(uarmh)); Your("%s fails to protect you.", helm_simple_name(uarmh));
goto petrify; goto petrify;
} }
/*FALLTHRU*/
case CREAM_PIE: case CREAM_PIE:
case BLINDING_VENOM: case BLINDING_VENOM:
pline("You've got it all over your %s!", body_part(FACE)); pline("You've got it all over your %s!", body_part(FACE));
@@ -2014,6 +2015,7 @@ boolean in_view;
default: /* glass or crystal wand */ default: /* glass or crystal wand */
if (obj->oclass != WAND_CLASS) if (obj->oclass != WAND_CLASS)
impossible("breaking odd object?"); impossible("breaking odd object?");
/*FALLTHRU*/
case CRYSTAL_PLATE_MAIL: case CRYSTAL_PLATE_MAIL:
case LENSES: case LENSES:
case MIRROR: case MIRROR:
+1 -1
View File
@@ -2597,7 +2597,7 @@ recalc_mapseen()
} }
if (is_drawbridge_wall(x, y) < 0) if (is_drawbridge_wall(x, y) < 0)
break; break;
/* else FALLTHRU */ /*FALLTHRU*/
case DBWALL: case DBWALL:
case DRAWBRIDGE_DOWN: case DRAWBRIDGE_DOWN:
if (Is_stronghold(&u.uz)) if (Is_stronghold(&u.uz))
+1 -1
View File
@@ -1812,7 +1812,7 @@ struct obj *otmp;
make_vomiting((long) rn1(context.victual.reqtime, 5), FALSE); make_vomiting((long) rn1(context.victual.reqtime, 5), FALSE);
break; break;
} }
/* else FALLTHRU */ /*FALLTHRU*/
default: default:
if (otmp->otyp == SLIME_MOLD && !otmp->cursed if (otmp->otyp == SLIME_MOLD && !otmp->cursed
&& otmp->spe == context.current_fruit) { && otmp->spe == context.current_fruit) {
+1
View File
@@ -708,6 +708,7 @@ doengrave()
"A few ice cubes drop from the wand."); "A few ice cubes drop from the wand.");
if (!oep || (oep->engr_type != BURN)) if (!oep || (oep->engr_type != BURN))
break; break;
/*FALLTHRU*/
case WAN_CANCELLATION: case WAN_CANCELLATION:
case WAN_MAKE_INVISIBLE: case WAN_MAKE_INVISIBLE:
if (oep && oep->engr_type != HEADSTONE) { if (oep && oep->engr_type != HEADSTONE) {
+3
View File
@@ -330,6 +330,7 @@ drinkfountain()
dofindgem(); dofindgem();
break; break;
} }
/*FALLTHRU*/
case 28: /* Water Nymph */ case 28: /* Water Nymph */
dowaternymph(); dowaternymph();
break; break;
@@ -445,6 +446,7 @@ register struct obj *obj;
dofindgem(); dofindgem();
break; break;
} }
/*FALLTHRU*/
case 25: /* Water gushes forth */ case 25: /* Water gushes forth */
dogushforth(FALSE); dogushforth(FALSE);
break; break;
@@ -616,6 +618,7 @@ drinksink()
pline("From the murky drain, a hand reaches up... --oops--"); pline("From the murky drain, a hand reaches up... --oops--");
break; break;
} }
/*FALLTHRU*/
default: default:
You("take a sip of %s %s.", You("take a sip of %s %s.",
rn2(3) ? (rn2(2) ? "cold" : "warm") : "hot", rn2(3) ? (rn2(2) ? "cold" : "warm") : "hot",
+2
View File
@@ -1867,6 +1867,7 @@ nextclass:
switch (sym) { switch (sym) {
case 'a': case 'a':
allflag = 1; allflag = 1;
/*FALLTHRU*/
case 'y': case 'y':
tmp = (*fn)(otmp); tmp = (*fn)(otmp);
if (tmp < 0) { if (tmp < 0) {
@@ -1883,6 +1884,7 @@ nextclass:
cnt += tmp; cnt += tmp;
if (--mx == 0) if (--mx == 0)
goto ret; goto ret;
/*FALLTHRU*/
case 'n': case 'n':
if (nodot) if (nodot)
dud++; dud++;
+3
View File
@@ -668,10 +668,13 @@ register struct monst *mtmp;
/* MAJOR fall through ... */ /* MAJOR fall through ... */
case 0: case 0:
(void) mongets(mtmp, WAN_MAGIC_MISSILE); (void) mongets(mtmp, WAN_MAGIC_MISSILE);
/*FALLTHRU*/
case 1: case 1:
(void) mongets(mtmp, POT_EXTRA_HEALING); (void) mongets(mtmp, POT_EXTRA_HEALING);
/*FALLTHRU*/
case 2: case 2:
(void) mongets(mtmp, POT_HEALING); (void) mongets(mtmp, POT_HEALING);
/*FALLTHRU*/
case 3: case 3:
(void) mongets(mtmp, WAN_STRIKING); (void) mongets(mtmp, WAN_STRIKING);
} }
+2 -2
View File
@@ -86,7 +86,7 @@ int spellval;
case 23: case 23:
if (Antimagic || Hallucination) if (Antimagic || Hallucination)
return MGC_PSI_BOLT; return MGC_PSI_BOLT;
/* else FALL THROUGH */ /*FALLTHRU*/
case 22: case 22:
case 21: case 21:
case 20: case 20:
@@ -141,7 +141,7 @@ int spellnum;
case 14: case 14:
if (rn2(3)) if (rn2(3))
return CLC_OPEN_WOUNDS; return CLC_OPEN_WOUNDS;
/* else FALL THROUGH */ /*FALLTHRU*/
case 13: case 13:
return CLC_GEYSER; return CLC_GEYSER;
case 12: case 12:
+1
View File
@@ -575,6 +575,7 @@ struct attack *mattk;
Sprintf(buf, "%s squeezes", magr_name); Sprintf(buf, "%s squeezes", magr_name);
break; break;
} }
/*FALLTHRU*/
default: default:
Sprintf(buf, "%s hits", magr_name); Sprintf(buf, "%s hits", magr_name);
} }
+3 -2
View File
@@ -1316,7 +1316,7 @@ register struct attack *mattk;
return 3; return 3;
break; break;
} }
/* else FALLTHRU */ /*FALLTHRU*/
case AD_SITM: /* for now these are the same */ case AD_SITM: /* for now these are the same */
case AD_SEDU: case AD_SEDU:
if (is_animal(mtmp->data)) { if (is_animal(mtmp->data)) {
@@ -1553,7 +1553,8 @@ register struct attack *mattk;
done(DIED); done(DIED);
dmg = 0; dmg = 0;
break; break;
} /* else FALLTHRU */ }
/*FALLTHRU*/
default: /* case 16: ... case 5: */ default: /* case 16: ... case 5: */
You_feel("your life force draining away..."); You_feel("your life force draining away...");
permdmg = 1; /* actual damage done below */ permdmg = 1; /* actual damage done below */
+1 -1
View File
@@ -491,7 +491,7 @@ fixup_special()
s_level *sp = find_level(r->rname.str); s_level *sp = find_level(r->rname.str);
lev = sp->dlevel; lev = sp->dlevel;
} }
/* fall into... */ /*FALLTHRU*/
case LR_UPSTAIR: case LR_UPSTAIR:
case LR_DOWNSTAIR: case LR_DOWNSTAIR:
+2 -1
View File
@@ -278,7 +278,7 @@ struct obj *box;
n = 0; n = 0;
break; break;
} }
/*else FALLTHRU*/ /*FALLTHRU*/
case BAG_OF_HOLDING: case BAG_OF_HOLDING:
n = 1; n = 1;
break; break;
@@ -884,6 +884,7 @@ boolean artif;
case LARGE_BOX: case LARGE_BOX:
otmp->olocked = !!(rn2(5)); otmp->olocked = !!(rn2(5));
otmp->otrapped = !(rn2(10)); otmp->otrapped = !(rn2(10));
/*FALLTHRU*/
case ICE_BOX: case ICE_BOX:
case SACK: case SACK:
case OILSKIN_SACK: case OILSKIN_SACK:
+2 -2
View File
@@ -1005,7 +1005,7 @@ try_again:
goto try_again; goto try_again;
if (!rn2(3)) if (!rn2(3))
return WAN_TELEPORTATION; return WAN_TELEPORTATION;
/* else FALLTHRU */ /*FALLTHRU*/
case 0: case 0:
case 1: case 1:
return SCR_TELEPORTATION; return SCR_TELEPORTATION;
@@ -1013,7 +1013,7 @@ try_again:
case 10: case 10:
if (!rn2(3)) if (!rn2(3))
return WAN_CREATE_MONSTER; return WAN_CREATE_MONSTER;
/* else FALLTHRU */ /*FALLTHRU*/
case 2: case 2:
return SCR_CREATE_MONSTER; return SCR_CREATE_MONSTER;
case 3: case 3:
+1 -1
View File
@@ -302,7 +302,7 @@ int force;
case THRONE: case THRONE:
if (cansee(x, y)) if (cansee(x, y))
pline_The("throne falls into a chasm."); pline_The("throne falls into a chasm.");
/* Falls into next case */ /*FALLTHRU*/
case ROOM: case ROOM:
case CORR: /* Try to make a pit */ case CORR: /* Try to make a pit */
do_pit: do_pit:
+2 -1
View File
@@ -453,6 +453,7 @@ unsigned cxn_flags; /* bitmask of CXN_xxx values */
case WEAPON_CLASS: case WEAPON_CLASS:
if (is_poisonable(obj) && obj->opoisoned) if (is_poisonable(obj) && obj->opoisoned)
Strcpy(buf, "poisoned "); Strcpy(buf, "poisoned ");
/*FALLTHRU*/
case VENOM_CLASS: case VENOM_CLASS:
case TOOL_CLASS: case TOOL_CLASS:
if (typ == LENSES) if (typ == LENSES)
@@ -3710,7 +3711,7 @@ typfnd:
otmp->spe = (rn2(10) ? -1 : 0); otmp->spe = (rn2(10) ? -1 : 0);
break; break;
} }
/* fall through, if wizard */ /*FALLTHRU*/
default: default:
otmp->spe = spe; otmp->spe = spe;
} }
+1 -1
View File
@@ -481,7 +481,7 @@ char *buf, *monbuf;
Strcpy(buf, "stone"); Strcpy(buf, "stone");
break; break;
} }
/*else FALLTHRU*/ /*FALLTHRU*/
default: default:
Strcpy(buf, defsyms[glyph_to_cmap(glyph)].explanation); Strcpy(buf, defsyms[glyph_to_cmap(glyph)].explanation);
break; break;
+4 -2
View File
@@ -957,6 +957,7 @@ aligntyp g_align;
switch (min(action, 5)) { switch (min(action, 5)) {
case 5: case 5:
pat_on_head = 1; pat_on_head = 1;
/*FALLTHRU*/
case 4: case 4:
do do
fix_worst_trouble(trouble); fix_worst_trouble(trouble);
@@ -1056,7 +1057,7 @@ aligntyp g_align;
break; break;
} }
} }
/* Otherwise, falls into next case */ /*FALLTHRU*/
case 2: case 2:
if (!Blind) if (!Blind)
You("are surrounded by %s glow.", an(hcolor(NH_GOLDEN))); You("are surrounded by %s glow.", an(hcolor(NH_GOLDEN)));
@@ -1148,7 +1149,8 @@ aligntyp g_align;
if (u.ualign.record >= PIOUS && !u.uevent.uhand_of_elbereth) { if (u.ualign.record >= PIOUS && !u.uevent.uhand_of_elbereth) {
gcrownu(); gcrownu();
break; break;
} /* else FALLTHRU */ }
/*FALLTHRU*/
case 6: { case 6: {
struct obj *otmp; struct obj *otmp;
int sp_no, trycnt = u.ulevel + 1; int sp_no, trycnt = u.ulevel + 1;
+2
View File
@@ -471,6 +471,7 @@ char *in_line, *out_line;
/* pluralize */ /* pluralize */
case 'P': case 'P':
cvt_buf[0] = highc(cvt_buf[0]); cvt_buf[0] = highc(cvt_buf[0]);
/*FALLTHRU*/
case 'p': case 'p':
Strcpy(cvt_buf, makeplural(cvt_buf)); Strcpy(cvt_buf, makeplural(cvt_buf));
break; break;
@@ -478,6 +479,7 @@ char *in_line, *out_line;
/* append possessive suffix */ /* append possessive suffix */
case 'S': case 'S':
cvt_buf[0] = highc(cvt_buf[0]); cvt_buf[0] = highc(cvt_buf[0]);
/*FALLTHRU*/
case 's': case 's':
Strcpy(cvt_buf, s_suffix(cvt_buf)); Strcpy(cvt_buf, s_suffix(cvt_buf));
break; break;
+1
View File
@@ -1551,6 +1551,7 @@ struct obj *sobj; /* scroll, or fake spellbook object for scroll-like spell */
/* do_mapping() already reveals secret passages */ /* do_mapping() already reveals secret passages */
} }
known = TRUE; known = TRUE;
/*FALLTHRU*/
case SPE_MAGIC_MAPPING: case SPE_MAGIC_MAPPING:
if (level.flags.nommap) { if (level.flags.nommap) {
Your("%s spins as %s blocks the spell!", body_part(HEAD), Your("%s spins as %s blocks the spell!", body_part(HEAD),
+2
View File
@@ -3101,6 +3101,7 @@ xchar x, y;
switch (sell_response ? sell_response : ynaq(qbuf)) { switch (sell_response ? sell_response : ynaq(qbuf)) {
case 'q': case 'q':
sell_response = 'n'; sell_response = 'n';
/*FALLTHRU*/
case 'n': case 'n':
if (container) if (container)
dropped_container(obj, shkp, FALSE); dropped_container(obj, shkp, FALSE);
@@ -3110,6 +3111,7 @@ xchar x, y;
break; break;
case 'a': case 'a':
sell_response = 'y'; sell_response = 'y';
/*FALLTHRU*/
case 'y': case 'y':
if (container) if (container)
dropped_container(obj, shkp, TRUE); dropped_container(obj, shkp, TRUE);
+11
View File
@@ -396,18 +396,21 @@ attrcurse()
You_feel("warmer."); You_feel("warmer.");
break; break;
} }
/*FALLTHRU*/
case 2: case 2:
if (HTeleportation & INTRINSIC) { if (HTeleportation & INTRINSIC) {
HTeleportation &= ~INTRINSIC; HTeleportation &= ~INTRINSIC;
You_feel("less jumpy."); You_feel("less jumpy.");
break; break;
} }
/*FALLTHRU*/
case 3: case 3:
if (HPoison_resistance & INTRINSIC) { if (HPoison_resistance & INTRINSIC) {
HPoison_resistance &= ~INTRINSIC; HPoison_resistance &= ~INTRINSIC;
You_feel("a little sick!"); You_feel("a little sick!");
break; break;
} }
/*FALLTHRU*/
case 4: case 4:
if (HTelepat & INTRINSIC) { if (HTelepat & INTRINSIC) {
HTelepat &= ~INTRINSIC; HTelepat &= ~INTRINSIC;
@@ -416,18 +419,21 @@ attrcurse()
Your("senses fail!"); Your("senses fail!");
break; break;
} }
/*FALLTHRU*/
case 5: case 5:
if (HCold_resistance & INTRINSIC) { if (HCold_resistance & INTRINSIC) {
HCold_resistance &= ~INTRINSIC; HCold_resistance &= ~INTRINSIC;
You_feel("cooler."); You_feel("cooler.");
break; break;
} }
/*FALLTHRU*/
case 6: case 6:
if (HInvis & INTRINSIC) { if (HInvis & INTRINSIC) {
HInvis &= ~INTRINSIC; HInvis &= ~INTRINSIC;
You_feel("paranoid."); You_feel("paranoid.");
break; break;
} }
/*FALLTHRU*/
case 7: case 7:
if (HSee_invisible & INTRINSIC) { if (HSee_invisible & INTRINSIC) {
HSee_invisible &= ~INTRINSIC; HSee_invisible &= ~INTRINSIC;
@@ -435,18 +441,21 @@ attrcurse()
: "thought you saw something"); : "thought you saw something");
break; break;
} }
/*FALLTHRU*/
case 8: case 8:
if (HFast & INTRINSIC) { if (HFast & INTRINSIC) {
HFast &= ~INTRINSIC; HFast &= ~INTRINSIC;
You_feel("slower."); You_feel("slower.");
break; break;
} }
/*FALLTHRU*/
case 9: case 9:
if (HStealth & INTRINSIC) { if (HStealth & INTRINSIC) {
HStealth &= ~INTRINSIC; HStealth &= ~INTRINSIC;
You_feel("clumsy."); You_feel("clumsy.");
break; break;
} }
/*FALLTHRU*/
case 10: case 10:
/* intrinsic protection is just disabled, not set back to 0 */ /* intrinsic protection is just disabled, not set back to 0 */
if (HProtection & INTRINSIC) { if (HProtection & INTRINSIC) {
@@ -454,12 +463,14 @@ attrcurse()
You_feel("vulnerable."); You_feel("vulnerable.");
break; break;
} }
/*FALLTHRU*/
case 11: case 11:
if (HAggravate_monster & INTRINSIC) { if (HAggravate_monster & INTRINSIC) {
HAggravate_monster &= ~INTRINSIC; HAggravate_monster &= ~INTRINSIC;
You_feel("less attractive."); You_feel("less attractive.");
break; break;
} }
/*FALLTHRU*/
default: default:
break; break;
} }
+4 -3
View File
@@ -113,8 +113,8 @@ dosounds()
You_hear("someone searching."); You_hear("someone searching.");
break; break;
} }
/* fall into... (yes, even for hallucination) */
} }
/*FALLTHRU*/
case 0: case 0:
You_hear("the footsteps of a guard on patrol."); You_hear("the footsteps of a guard on patrol.");
break; break;
@@ -662,7 +662,8 @@ register struct monst *mtmp;
else else
pline_msg = "mews."; pline_msg = "mews.";
break; break;
} /* else FALLTHRU */ }
/*FALLTHRU*/
case MS_GROWL: case MS_GROWL:
pline_msg = mtmp->mpeaceful ? "snarls." : "growls!"; pline_msg = mtmp->mpeaceful ? "snarls." : "growls!";
break; break;
@@ -764,7 +765,7 @@ register struct monst *mtmp;
} }
break; break;
} }
/* else FALLTHRU */ /*FALLTHRU*/
case MS_HUMANOID: case MS_HUMANOID:
if (!mtmp->mpeaceful) { if (!mtmp->mpeaceful) {
if (In_endgame(&u.uz) && is_mplayer(ptr)) if (In_endgame(&u.uz) && is_mplayer(ptr))
+1
View File
@@ -485,6 +485,7 @@ int reason; /* Player was thrown off etc. */
switch (reason) { switch (reason) {
case DISMOUNT_THROWN: case DISMOUNT_THROWN:
verb = "are thrown"; verb = "are thrown";
/*FALLTHRU*/
case DISMOUNT_FELL: case DISMOUNT_FELL:
You("%s off of %s!", verb, mon_nam(mtmp)); You("%s off of %s!", verb, mon_nam(mtmp));
if (!have_spot) if (!have_spot)
+1 -1
View File
@@ -2465,7 +2465,7 @@ register struct monst *mtmp;
mtmp->mtrapped = 1; mtmp->mtrapped = 1;
break; break;
} }
/* fall though */ /*FALLTHRU*/
default: default:
if (mptr->mlet == S_GIANT if (mptr->mlet == S_GIANT
/* exclude baby dragons and relatively short worms */ /* exclude baby dragons and relatively short worms */
+1
View File
@@ -2396,6 +2396,7 @@ register struct monst *mon;
|| youmonst.data->mlet == S_ORC || youmonst.data->mlet == S_ORC
|| youmonst.data->mlet == S_GNOME) && !weapon_used) || youmonst.data->mlet == S_GNOME) && !weapon_used)
goto use_weapon; goto use_weapon;
/*FALLTHRU*/
case AT_NONE: case AT_NONE:
case AT_BOOM: case AT_BOOM:
+1 -1
View File
@@ -391,7 +391,7 @@ register struct monst *mtmp;
mtmp->mhp += rnd(8); mtmp->mhp += rnd(8);
return 1; return 1;
} }
/* fall through :-) */ /*FALLTHRU*/
case STRAT_NONE: /* harass */ case STRAT_NONE: /* harass */
if (!rn2(!mtmp->mflee ? 5 : 33)) if (!rn2(!mtmp->mflee ? 5 : 33))
+3 -1
View File
@@ -2408,6 +2408,7 @@ boolean ordinary;
case WAN_LIGHT: /* (broken wand) */ case WAN_LIGHT: /* (broken wand) */
/* assert( !ordinary ); */ /* assert( !ordinary ); */
damage = d(obj->spe, 25); damage = d(obj->spe, 25);
/*FALLTHRU*/
case EXPENSIVE_CAMERA: case EXPENSIVE_CAMERA:
if (!damage) if (!damage)
damage = 5; damage = 5;
@@ -4138,7 +4139,8 @@ boolean say; /* Announce out of sight hit/miss events if true */
switch (bounce) { switch (bounce) {
case 0: case 0:
dx = -dx; /* fall into... */ dx = -dx;
/*FALLTHRU*/
case 1: case 1:
dy = -dy; dy = -dy;
break; break;
+1
View File
@@ -2775,6 +2775,7 @@ do_objs()
prefix = -1; prefix = -1;
break; break;
} }
/*FALLTHRU*/
default: default:
Fprintf(ofp, "#define\t"); Fprintf(ofp, "#define\t");
} }
+2
View File
@@ -1171,6 +1171,7 @@ int n;
case ATR_ULINE: case ATR_ULINE:
if (nh_US) if (nh_US)
return nh_US; return nh_US;
/*FALLTHRU*/
case ATR_BOLD: case ATR_BOLD:
case ATR_BLINK: case ATR_BLINK:
#if defined(TERMLIB) && defined(TEXTCOLOR) #if defined(TERMLIB) && defined(TEXTCOLOR)
@@ -1192,6 +1193,7 @@ int n;
case ATR_ULINE: case ATR_ULINE:
if (nh_UE) if (nh_UE)
return nh_UE; return nh_UE;
/*FALLTHRU*/
case ATR_BOLD: case ATR_BOLD:
case ATR_BLINK: case ATR_BLINK:
return nh_HE; return nh_HE;
+4 -2
View File
@@ -1527,7 +1527,7 @@ winid window;
case NHW_MAP: case NHW_MAP:
/* cheap -- clear the whole thing and tell nethack to redraw botl */ /* cheap -- clear the whole thing and tell nethack to redraw botl */
context.botlx = 1; context.botlx = 1;
/* fall into ... */ /*FALLTHRU*/
case NHW_BASE: case NHW_BASE:
clear_screen(); clear_screen();
break; break;
@@ -1917,7 +1917,8 @@ struct WinDesc *cw;
/* special case: '0' is also the default ball class */ /* special case: '0' is also the default ball class */
if (!counting && index(gacc, morc)) if (!counting && index(gacc, morc))
goto group_accel; goto group_accel;
/* fall through to count the zero */ /* fall through to count the zero */
/*FALLTHRU*/
case '1': case '1':
case '2': case '2':
case '3': case '3':
@@ -2197,6 +2198,7 @@ boolean blocking; /* with ttys, all windows are blocking */
tty_display_nhwindow(WIN_MESSAGE, TRUE); tty_display_nhwindow(WIN_MESSAGE, TRUE);
return; return;
} }
/*FALLTHRU*/
case NHW_BASE: case NHW_BASE:
(void) fflush(stdout); (void) fflush(stdout);
break; break;