diff --git a/src/apply.c b/src/apply.c index c28e01087..45223a487 100644 --- a/src/apply.c +++ b/src/apply.c @@ -3300,10 +3300,12 @@ struct obj *obj; goto wanexpl; case WAN_FIRE: expltype = EXPL_FIERY; + /*FALLTHRU*/ case WAN_COLD: if (expltype == EXPL_MAGICAL) expltype = EXPL_FROSTY; dmg *= 2; + /*FALLTHRU*/ case WAN_MAGIC_MISSILE: wanexpl: explode(u.ux, u.uy, -(obj->otyp), dmg, WAND_CLASS, expltype); diff --git a/src/botl.c b/src/botl.c index 94cf59ab0..9186715ff 100644 --- a/src/botl.c +++ b/src/botl.c @@ -1355,7 +1355,6 @@ int *colorptr; /* there are hilites set here */ int max_pc = 0, min_pc = 100; int max_val = 0, min_val = LARGEST_INT; - boolean changed = FALSE; boolean exactmatch = FALSE; hl = blstats[idx][fldidx].thresholds; @@ -1382,14 +1381,11 @@ int *colorptr; case BL_TH_UPDOWN: if (chg < 0 && hl->rel == LT_VALUE) { merge_bestcolor(&bestcolor, hl->coloridx); - changed = TRUE; } else if (chg > 0 && hl->rel == GT_VALUE) { merge_bestcolor(&bestcolor, hl->coloridx); - changed = TRUE; } else if (hl->rel == EQ_VALUE && chg) { merge_bestcolor(&bestcolor, hl->coloridx); min_val = max_val = hl->value.a_int; - changed = TRUE; } break; case BL_TH_VAL_ABSOLUTE: diff --git a/src/cmd.c b/src/cmd.c index f10ad1f8f..22496dd55 100644 --- a/src/cmd.c +++ b/src/cmd.c @@ -4118,7 +4118,8 @@ register char *cmd; break; case NHKF_RUN2: if (!Cmd.num_pad) - break; /* else FALLTHRU */ + break; + /*FALLTHRU*/ case NHKF_RUN: if (movecmd(lowc(cmd[1]))) { context.run = 3; @@ -4128,7 +4129,8 @@ register char *cmd; break; case NHKF_FIGHT2: if (!Cmd.num_pad) - break; /* else FALLTHRU */ + break; + /*FALLTHRU*/ /* Effects of movement commands and invisible monsters: * m: always move onto space (even if 'I' remembered) * F: always attack space (even if 'I' not remembered) @@ -4527,14 +4529,16 @@ const char *msg; break; case NHKF_RUN2: if (!Cmd.num_pad) - break; /* else FALLTHRU */ + break; + /*FALLTHRU*/ case NHKF_RUN: case NHKF_RUN_NOPICKUP: dothat = "run"; break; case NHKF_FIGHT2: if (!Cmd.num_pad) - break; /* else FALLTHRU */ + break; + /*FALLTHRU*/ case NHKF_FIGHT: dothat = "fight"; how = ""; /* avoid "fight at yourself" */ diff --git a/src/display.c b/src/display.c index a16b8909f..d946ec965 100644 --- a/src/display.c +++ b/src/display.c @@ -391,6 +391,7 @@ xchar worm_tail; /* mon is actually a worm tail */ default: impossible("display_monster: bad m_ap_type value [ = %d ]", (int) mon->m_ap_type); + /*FALLTHRU*/ case M_AP_NOTHING: show_glyph(x, y, mon_to_glyph(mon)); break; diff --git a/src/dokick.c b/src/dokick.c index c1976dbc8..363a13894 100644 --- a/src/dokick.c +++ b/src/dokick.c @@ -846,6 +846,7 @@ dokick() pline("%s burps loudly.", Monnam(u.ustuck)); break; } + /*FALLTHRU*/ default: Your("feeble kick has no effect."); break; @@ -1327,7 +1328,8 @@ schar loc; } else if (In_endgame(&u.uz) || Is_botlevel(&u.uz)) { cc->y = cc->x = 0; break; - } /* else fall to the next cases */ + } + /*FALLTHRU*/ case MIGR_STAIRS_UP: case MIGR_LADDER_UP: cc->x = u.uz.dnum; diff --git a/src/dothrow.c b/src/dothrow.c index 0c889cd29..693dde902 100644 --- a/src/dothrow.c +++ b/src/dothrow.c @@ -957,6 +957,7 @@ boolean hitsroof; Your("%s fails to protect you.", helm_simple_name(uarmh)); goto petrify; } + /*FALLTHRU*/ case CREAM_PIE: case BLINDING_VENOM: pline("You've got it all over your %s!", body_part(FACE)); @@ -2014,6 +2015,7 @@ boolean in_view; default: /* glass or crystal wand */ if (obj->oclass != WAND_CLASS) impossible("breaking odd object?"); + /*FALLTHRU*/ case CRYSTAL_PLATE_MAIL: case LENSES: case MIRROR: diff --git a/src/dungeon.c b/src/dungeon.c index 8408c4aa4..2f7b42a64 100644 --- a/src/dungeon.c +++ b/src/dungeon.c @@ -2597,7 +2597,7 @@ recalc_mapseen() } if (is_drawbridge_wall(x, y) < 0) break; - /* else FALLTHRU */ + /*FALLTHRU*/ case DBWALL: case DRAWBRIDGE_DOWN: if (Is_stronghold(&u.uz)) diff --git a/src/eat.c b/src/eat.c index dc33cca8a..6fc3d3402 100644 --- a/src/eat.c +++ b/src/eat.c @@ -1812,7 +1812,7 @@ struct obj *otmp; make_vomiting((long) rn1(context.victual.reqtime, 5), FALSE); break; } - /* else FALLTHRU */ + /*FALLTHRU*/ default: if (otmp->otyp == SLIME_MOLD && !otmp->cursed && otmp->spe == context.current_fruit) { diff --git a/src/engrave.c b/src/engrave.c index 6bb71b9cd..1c38ac5e6 100644 --- a/src/engrave.c +++ b/src/engrave.c @@ -708,6 +708,7 @@ doengrave() "A few ice cubes drop from the wand."); if (!oep || (oep->engr_type != BURN)) break; + /*FALLTHRU*/ case WAN_CANCELLATION: case WAN_MAKE_INVISIBLE: if (oep && oep->engr_type != HEADSTONE) { diff --git a/src/fountain.c b/src/fountain.c index c020c394b..616d42b47 100644 --- a/src/fountain.c +++ b/src/fountain.c @@ -330,6 +330,7 @@ drinkfountain() dofindgem(); break; } + /*FALLTHRU*/ case 28: /* Water Nymph */ dowaternymph(); break; @@ -445,6 +446,7 @@ register struct obj *obj; dofindgem(); break; } + /*FALLTHRU*/ case 25: /* Water gushes forth */ dogushforth(FALSE); break; @@ -616,6 +618,7 @@ drinksink() pline("From the murky drain, a hand reaches up... --oops--"); break; } + /*FALLTHRU*/ default: You("take a sip of %s %s.", rn2(3) ? (rn2(2) ? "cold" : "warm") : "hot", diff --git a/src/invent.c b/src/invent.c index b997294ba..0831f9881 100644 --- a/src/invent.c +++ b/src/invent.c @@ -1867,6 +1867,7 @@ nextclass: switch (sym) { case 'a': allflag = 1; + /*FALLTHRU*/ case 'y': tmp = (*fn)(otmp); if (tmp < 0) { @@ -1883,6 +1884,7 @@ nextclass: cnt += tmp; if (--mx == 0) goto ret; + /*FALLTHRU*/ case 'n': if (nodot) dud++; diff --git a/src/makemon.c b/src/makemon.c index 232e9d9a9..862d3d390 100644 --- a/src/makemon.c +++ b/src/makemon.c @@ -668,10 +668,13 @@ register struct monst *mtmp; /* MAJOR fall through ... */ case 0: (void) mongets(mtmp, WAN_MAGIC_MISSILE); + /*FALLTHRU*/ case 1: (void) mongets(mtmp, POT_EXTRA_HEALING); + /*FALLTHRU*/ case 2: (void) mongets(mtmp, POT_HEALING); + /*FALLTHRU*/ case 3: (void) mongets(mtmp, WAN_STRIKING); } diff --git a/src/mcastu.c b/src/mcastu.c index e2fdfad66..bac2f920e 100644 --- a/src/mcastu.c +++ b/src/mcastu.c @@ -86,7 +86,7 @@ int spellval; case 23: if (Antimagic || Hallucination) return MGC_PSI_BOLT; - /* else FALL THROUGH */ + /*FALLTHRU*/ case 22: case 21: case 20: @@ -141,7 +141,7 @@ int spellnum; case 14: if (rn2(3)) return CLC_OPEN_WOUNDS; - /* else FALL THROUGH */ + /*FALLTHRU*/ case 13: return CLC_GEYSER; case 12: diff --git a/src/mhitm.c b/src/mhitm.c index ee7dc0448..3c6549ea3 100644 --- a/src/mhitm.c +++ b/src/mhitm.c @@ -575,6 +575,7 @@ struct attack *mattk; Sprintf(buf, "%s squeezes", magr_name); break; } + /*FALLTHRU*/ default: Sprintf(buf, "%s hits", magr_name); } diff --git a/src/mhitu.c b/src/mhitu.c index 8bd4c33e1..68bf643eb 100644 --- a/src/mhitu.c +++ b/src/mhitu.c @@ -1316,7 +1316,7 @@ register struct attack *mattk; return 3; break; } - /* else FALLTHRU */ + /*FALLTHRU*/ case AD_SITM: /* for now these are the same */ case AD_SEDU: if (is_animal(mtmp->data)) { @@ -1553,7 +1553,8 @@ register struct attack *mattk; done(DIED); dmg = 0; break; - } /* else FALLTHRU */ + } + /*FALLTHRU*/ default: /* case 16: ... case 5: */ You_feel("your life force draining away..."); permdmg = 1; /* actual damage done below */ diff --git a/src/mkmaze.c b/src/mkmaze.c index b7a33a748..8a400d5ac 100644 --- a/src/mkmaze.c +++ b/src/mkmaze.c @@ -491,7 +491,7 @@ fixup_special() s_level *sp = find_level(r->rname.str); lev = sp->dlevel; } - /* fall into... */ + /*FALLTHRU*/ case LR_UPSTAIR: case LR_DOWNSTAIR: diff --git a/src/mkobj.c b/src/mkobj.c index ee6928111..672b7d586 100644 --- a/src/mkobj.c +++ b/src/mkobj.c @@ -278,7 +278,7 @@ struct obj *box; n = 0; break; } - /*else FALLTHRU*/ + /*FALLTHRU*/ case BAG_OF_HOLDING: n = 1; break; @@ -884,6 +884,7 @@ boolean artif; case LARGE_BOX: otmp->olocked = !!(rn2(5)); otmp->otrapped = !(rn2(10)); + /*FALLTHRU*/ case ICE_BOX: case SACK: case OILSKIN_SACK: diff --git a/src/muse.c b/src/muse.c index 5745839b5..402f7250f 100644 --- a/src/muse.c +++ b/src/muse.c @@ -1005,7 +1005,7 @@ try_again: goto try_again; if (!rn2(3)) return WAN_TELEPORTATION; - /* else FALLTHRU */ + /*FALLTHRU*/ case 0: case 1: return SCR_TELEPORTATION; @@ -1013,7 +1013,7 @@ try_again: case 10: if (!rn2(3)) return WAN_CREATE_MONSTER; - /* else FALLTHRU */ + /*FALLTHRU*/ case 2: return SCR_CREATE_MONSTER; case 3: diff --git a/src/music.c b/src/music.c index f28841ede..dc5c1a4cb 100644 --- a/src/music.c +++ b/src/music.c @@ -302,7 +302,7 @@ int force; case THRONE: if (cansee(x, y)) pline_The("throne falls into a chasm."); - /* Falls into next case */ + /*FALLTHRU*/ case ROOM: case CORR: /* Try to make a pit */ do_pit: diff --git a/src/objnam.c b/src/objnam.c index 5eb969e42..6d2b30a1a 100644 --- a/src/objnam.c +++ b/src/objnam.c @@ -453,6 +453,7 @@ unsigned cxn_flags; /* bitmask of CXN_xxx values */ case WEAPON_CLASS: if (is_poisonable(obj) && obj->opoisoned) Strcpy(buf, "poisoned "); + /*FALLTHRU*/ case VENOM_CLASS: case TOOL_CLASS: if (typ == LENSES) @@ -3710,7 +3711,7 @@ typfnd: otmp->spe = (rn2(10) ? -1 : 0); break; } - /* fall through, if wizard */ + /*FALLTHRU*/ default: otmp->spe = spe; } diff --git a/src/pager.c b/src/pager.c index 2be4a8f93..1dfcf5cd7 100644 --- a/src/pager.c +++ b/src/pager.c @@ -481,7 +481,7 @@ char *buf, *monbuf; Strcpy(buf, "stone"); break; } - /*else FALLTHRU*/ + /*FALLTHRU*/ default: Strcpy(buf, defsyms[glyph_to_cmap(glyph)].explanation); break; diff --git a/src/pray.c b/src/pray.c index 646de494c..d0cb794ae 100644 --- a/src/pray.c +++ b/src/pray.c @@ -957,6 +957,7 @@ aligntyp g_align; switch (min(action, 5)) { case 5: pat_on_head = 1; + /*FALLTHRU*/ case 4: do fix_worst_trouble(trouble); @@ -1056,7 +1057,7 @@ aligntyp g_align; break; } } - /* Otherwise, falls into next case */ + /*FALLTHRU*/ case 2: if (!Blind) 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) { gcrownu(); break; - } /* else FALLTHRU */ + } + /*FALLTHRU*/ case 6: { struct obj *otmp; int sp_no, trycnt = u.ulevel + 1; diff --git a/src/questpgr.c b/src/questpgr.c index b96edbc3c..cf6fbdd38 100644 --- a/src/questpgr.c +++ b/src/questpgr.c @@ -471,6 +471,7 @@ char *in_line, *out_line; /* pluralize */ case 'P': cvt_buf[0] = highc(cvt_buf[0]); + /*FALLTHRU*/ case 'p': Strcpy(cvt_buf, makeplural(cvt_buf)); break; @@ -478,6 +479,7 @@ char *in_line, *out_line; /* append possessive suffix */ case 'S': cvt_buf[0] = highc(cvt_buf[0]); + /*FALLTHRU*/ case 's': Strcpy(cvt_buf, s_suffix(cvt_buf)); break; diff --git a/src/read.c b/src/read.c index e340b7ebc..69ae0f45b 100644 --- a/src/read.c +++ b/src/read.c @@ -1551,6 +1551,7 @@ struct obj *sobj; /* scroll, or fake spellbook object for scroll-like spell */ /* do_mapping() already reveals secret passages */ } known = TRUE; + /*FALLTHRU*/ case SPE_MAGIC_MAPPING: if (level.flags.nommap) { Your("%s spins as %s blocks the spell!", body_part(HEAD), diff --git a/src/shk.c b/src/shk.c index c81c788b2..a835fa345 100644 --- a/src/shk.c +++ b/src/shk.c @@ -3101,6 +3101,7 @@ xchar x, y; switch (sell_response ? sell_response : ynaq(qbuf)) { case 'q': sell_response = 'n'; + /*FALLTHRU*/ case 'n': if (container) dropped_container(obj, shkp, FALSE); @@ -3110,6 +3111,7 @@ xchar x, y; break; case 'a': sell_response = 'y'; + /*FALLTHRU*/ case 'y': if (container) dropped_container(obj, shkp, TRUE); diff --git a/src/sit.c b/src/sit.c index a6c6a0906..fa36d0ff7 100644 --- a/src/sit.c +++ b/src/sit.c @@ -396,18 +396,21 @@ attrcurse() You_feel("warmer."); break; } + /*FALLTHRU*/ case 2: if (HTeleportation & INTRINSIC) { HTeleportation &= ~INTRINSIC; You_feel("less jumpy."); break; } + /*FALLTHRU*/ case 3: if (HPoison_resistance & INTRINSIC) { HPoison_resistance &= ~INTRINSIC; You_feel("a little sick!"); break; } + /*FALLTHRU*/ case 4: if (HTelepat & INTRINSIC) { HTelepat &= ~INTRINSIC; @@ -416,18 +419,21 @@ attrcurse() Your("senses fail!"); break; } + /*FALLTHRU*/ case 5: if (HCold_resistance & INTRINSIC) { HCold_resistance &= ~INTRINSIC; You_feel("cooler."); break; } + /*FALLTHRU*/ case 6: if (HInvis & INTRINSIC) { HInvis &= ~INTRINSIC; You_feel("paranoid."); break; } + /*FALLTHRU*/ case 7: if (HSee_invisible & INTRINSIC) { HSee_invisible &= ~INTRINSIC; @@ -435,18 +441,21 @@ attrcurse() : "thought you saw something"); break; } + /*FALLTHRU*/ case 8: if (HFast & INTRINSIC) { HFast &= ~INTRINSIC; You_feel("slower."); break; } + /*FALLTHRU*/ case 9: if (HStealth & INTRINSIC) { HStealth &= ~INTRINSIC; You_feel("clumsy."); break; } + /*FALLTHRU*/ case 10: /* intrinsic protection is just disabled, not set back to 0 */ if (HProtection & INTRINSIC) { @@ -454,12 +463,14 @@ attrcurse() You_feel("vulnerable."); break; } + /*FALLTHRU*/ case 11: if (HAggravate_monster & INTRINSIC) { HAggravate_monster &= ~INTRINSIC; You_feel("less attractive."); break; } + /*FALLTHRU*/ default: break; } diff --git a/src/sounds.c b/src/sounds.c index 5b6f085aa..4860915a9 100644 --- a/src/sounds.c +++ b/src/sounds.c @@ -113,8 +113,8 @@ dosounds() You_hear("someone searching."); break; } - /* fall into... (yes, even for hallucination) */ } + /*FALLTHRU*/ case 0: You_hear("the footsteps of a guard on patrol."); break; @@ -662,7 +662,8 @@ register struct monst *mtmp; else pline_msg = "mews."; break; - } /* else FALLTHRU */ + } + /*FALLTHRU*/ case MS_GROWL: pline_msg = mtmp->mpeaceful ? "snarls." : "growls!"; break; @@ -764,7 +765,7 @@ register struct monst *mtmp; } break; } - /* else FALLTHRU */ + /*FALLTHRU*/ case MS_HUMANOID: if (!mtmp->mpeaceful) { if (In_endgame(&u.uz) && is_mplayer(ptr)) diff --git a/src/steed.c b/src/steed.c index f5cd50bc5..0fc14296c 100644 --- a/src/steed.c +++ b/src/steed.c @@ -485,6 +485,7 @@ int reason; /* Player was thrown off etc. */ switch (reason) { case DISMOUNT_THROWN: verb = "are thrown"; + /*FALLTHRU*/ case DISMOUNT_FELL: You("%s off of %s!", verb, mon_nam(mtmp)); if (!have_spot) diff --git a/src/trap.c b/src/trap.c index 1855a722a..1a0bb24e7 100644 --- a/src/trap.c +++ b/src/trap.c @@ -2465,7 +2465,7 @@ register struct monst *mtmp; mtmp->mtrapped = 1; break; } - /* fall though */ + /*FALLTHRU*/ default: if (mptr->mlet == S_GIANT /* exclude baby dragons and relatively short worms */ diff --git a/src/uhitm.c b/src/uhitm.c index 8f9e3a0b9..565260f37 100644 --- a/src/uhitm.c +++ b/src/uhitm.c @@ -2396,6 +2396,7 @@ register struct monst *mon; || youmonst.data->mlet == S_ORC || youmonst.data->mlet == S_GNOME) && !weapon_used) goto use_weapon; + /*FALLTHRU*/ case AT_NONE: case AT_BOOM: diff --git a/src/wizard.c b/src/wizard.c index 3f58433c8..6821ea912 100644 --- a/src/wizard.c +++ b/src/wizard.c @@ -391,7 +391,7 @@ register struct monst *mtmp; mtmp->mhp += rnd(8); return 1; } - /* fall through :-) */ + /*FALLTHRU*/ case STRAT_NONE: /* harass */ if (!rn2(!mtmp->mflee ? 5 : 33)) diff --git a/src/zap.c b/src/zap.c index 7e1f08493..ef5a68c66 100644 --- a/src/zap.c +++ b/src/zap.c @@ -2408,6 +2408,7 @@ boolean ordinary; case WAN_LIGHT: /* (broken wand) */ /* assert( !ordinary ); */ damage = d(obj->spe, 25); + /*FALLTHRU*/ case EXPENSIVE_CAMERA: if (!damage) damage = 5; @@ -4138,7 +4139,8 @@ boolean say; /* Announce out of sight hit/miss events if true */ switch (bounce) { case 0: - dx = -dx; /* fall into... */ + dx = -dx; + /*FALLTHRU*/ case 1: dy = -dy; break; diff --git a/util/makedefs.c b/util/makedefs.c index 2c55ba710..f8e8b0f22 100644 --- a/util/makedefs.c +++ b/util/makedefs.c @@ -2775,6 +2775,7 @@ do_objs() prefix = -1; break; } + /*FALLTHRU*/ default: Fprintf(ofp, "#define\t"); } diff --git a/win/tty/termcap.c b/win/tty/termcap.c index 5add02ac3..586818f0d 100644 --- a/win/tty/termcap.c +++ b/win/tty/termcap.c @@ -1171,6 +1171,7 @@ int n; case ATR_ULINE: if (nh_US) return nh_US; + /*FALLTHRU*/ case ATR_BOLD: case ATR_BLINK: #if defined(TERMLIB) && defined(TEXTCOLOR) @@ -1192,6 +1193,7 @@ int n; case ATR_ULINE: if (nh_UE) return nh_UE; + /*FALLTHRU*/ case ATR_BOLD: case ATR_BLINK: return nh_HE; diff --git a/win/tty/wintty.c b/win/tty/wintty.c index 0ad6d2aa6..63d1aac8c 100644 --- a/win/tty/wintty.c +++ b/win/tty/wintty.c @@ -1527,7 +1527,7 @@ winid window; case NHW_MAP: /* cheap -- clear the whole thing and tell nethack to redraw botl */ context.botlx = 1; - /* fall into ... */ + /*FALLTHRU*/ case NHW_BASE: clear_screen(); break; @@ -1917,7 +1917,8 @@ struct WinDesc *cw; /* special case: '0' is also the default ball class */ if (!counting && index(gacc, morc)) goto group_accel; - /* fall through to count the zero */ + /* fall through to count the zero */ + /*FALLTHRU*/ case '1': case '2': case '3': @@ -2197,6 +2198,7 @@ boolean blocking; /* with ttys, all windows are blocking */ tty_display_nhwindow(WIN_MESSAGE, TRUE); return; } + /*FALLTHRU*/ case NHW_BASE: (void) fflush(stdout); break;