expand implicit fallthrough detection to non-gcc compilers
gcc has recognized various "magic comments" for white-listing
occurrences of implicit fallthrough in switch statements for
a long time:
The range and shape of "falls through" comments accepted are
contingent upon the level of the warning. (The default level is =3.)
-Wimplicit-fallthrough=0 disables the warning altogether.
-Wimplicit-fallthrough=1 treats any kind of comment as a "falls through" comment.
-Wimplicit-fallthrough=2 essentially accepts any comment that contains something
that matches (case insensitively) "falls?[ \t-]*thr(ough|u)" regular expression.
-Wimplicit-fallthrough=3 case sensitively matches a wide range of regular
expressions, listed in the GCC manual. E.g., all of these are accepted:
/* Falls through. */
/* fall-thru */
/* Else falls through. */
/* FALLTHRU */
/* ... falls through ... */
etc.
-Wimplicit-fallthrough=4 also, case sensitively matches a range of regular
expressions but is much more strict than level =3.
-Wimplicit-fallthrough=5 doesn't recognize any comments.
Plenty of other compilers did not recognize the gcc comment convention,
and up until now the compiler warning for detecting unintended
fallthrough had to be suppressed on other compilers. That's because the code
in NetHack has been relying on the gcc approach, and only the gcc approach.
The C23 standard introduces an attribute [[fallthrough]] for the
functionality, when implicit fallthrough warnings have been enabled.
Several popular compilers already support that, or a very similar attribute
style approach, today, even ahead of their C23 support:
C compiler whitelist approach
--------------------------- -------------------------------------
C23 conforming compilers [[fallthrough]]
clang versions supporting
standards prior to
C23 __attribute__((__fallthrough__))
Microsoft Visual Studio
since VS 2022 17.4.
The warning C5262 controls
whether the implict
fallthrough is detected and
warned about with
/std:clatest. [[fallthrough]]
This adds support to NetHack for the attribute approach by inserting a
macro FALLTHROUGH to the existing cases that require white-listing, so
other compilers can analyze things too.
The definition of the FALLTHROUGH macro is controlled in include/tradstdc.h.
The gcc comment approach has also been left in place at this time.
This commit is contained in:
+26
-6
@@ -327,13 +327,20 @@ typedef genericptr genericptr_t; /* (void *) or (char *) */
|
|||||||
/*
|
/*
|
||||||
* Give first priority to standard
|
* Give first priority to standard
|
||||||
*/
|
*/
|
||||||
#ifndef ATTRNORETURN
|
|
||||||
#if defined(__STDC_VERSION__) || defined(__cplusplus)
|
#if defined(__STDC_VERSION__) || defined(__cplusplus)
|
||||||
#if (__STDC_VERSION__ > 202300L) || defined(__cplusplus)
|
#if (__STDC_VERSION__ > 202300L) || defined(__cplusplus)
|
||||||
|
#ifndef ATTRNORETURN
|
||||||
#define ATTRNORETURN [[noreturn]]
|
#define ATTRNORETURN [[noreturn]]
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#ifndef __has_c_attribute
|
||||||
#endif
|
#define __has_c_attribute(x) 0
|
||||||
|
#endif /* __has_c_attribute */
|
||||||
|
#if __has_c_attribute(fallthrough)
|
||||||
|
/* Standard attribute is available, use it. */
|
||||||
|
#define FALLTHROUGH [[fallthrough]]
|
||||||
|
#endif /* __has_c_attribute(fallthrough) */
|
||||||
|
#endif /* __STDC_VERSION__ gt 202300L || __cplusplus */
|
||||||
|
#endif /* __STDC_VERSION || __cplusplus */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Allow gcc2 to check parameters of printf-like calls with -Wformat;
|
* Allow gcc2 to check parameters of printf-like calls with -Wformat;
|
||||||
@@ -366,12 +373,21 @@ typedef genericptr genericptr_t; /* (void *) or (char *) */
|
|||||||
#endif /* !NONNULLS_DEFINED */
|
#endif /* !NONNULLS_DEFINED */
|
||||||
/* #pragma message is available */
|
/* #pragma message is available */
|
||||||
#define NH_PRAGMA_MESSAGE 1
|
#define NH_PRAGMA_MESSAGE 1
|
||||||
#endif
|
#endif /* __GNUC__ greater than or equal to 5 */
|
||||||
#endif
|
#endif /* __GNUC__ */
|
||||||
|
|
||||||
#if defined(__clang__) && !defined(DO_DEFINE_NONNULLS)
|
#if defined(__clang__)
|
||||||
|
#ifndef FALLTHROUGH
|
||||||
|
#if defined(__clang_major__)
|
||||||
|
#if __clang_major__ >= 9
|
||||||
|
#define FALLTHROUGH __attribute__((fallthrough))
|
||||||
|
#endif /* __clang_major__ greater than or equal to 9 */
|
||||||
|
#endif /* __clang_major__ is defined */
|
||||||
|
#endif /* FALLTHROUGH */
|
||||||
|
#if !defined(DO_DEFINE_NONNULLS)
|
||||||
#define DO_DEFINE_NONNULLS
|
#define DO_DEFINE_NONNULLS
|
||||||
#endif
|
#endif
|
||||||
|
#endif /* __clang__ */
|
||||||
|
|
||||||
#if defined(DO_DEFINE_NONNULLS) && !defined(NONNULLS_DEFINED)
|
#if defined(DO_DEFINE_NONNULLS) && !defined(NONNULLS_DEFINED)
|
||||||
#define NONNULL __attribute__((returns_nonnull))
|
#define NONNULL __attribute__((returns_nonnull))
|
||||||
@@ -405,6 +421,7 @@ typedef genericptr genericptr_t; /* (void *) or (char *) */
|
|||||||
#define NH_PRAGMA_MESSAGE 1
|
#define NH_PRAGMA_MESSAGE 1
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/* Fallback implementations */
|
||||||
#ifndef PRINTF_F
|
#ifndef PRINTF_F
|
||||||
#define PRINTF_F(f, v)
|
#define PRINTF_F(f, v)
|
||||||
#endif
|
#endif
|
||||||
@@ -414,6 +431,9 @@ typedef genericptr genericptr_t; /* (void *) or (char *) */
|
|||||||
#ifndef UNUSED
|
#ifndef UNUSED
|
||||||
#define UNUSED
|
#define UNUSED
|
||||||
#endif
|
#endif
|
||||||
|
#ifndef FALLTHROUGH
|
||||||
|
#define FALLTHROUGH
|
||||||
|
#endif
|
||||||
#ifndef ATTRNORETURN
|
#ifndef ATTRNORETURN
|
||||||
#define ATTRNORETURN
|
#define ATTRNORETURN
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -1040,6 +1040,7 @@ argcheck(int argc, char *argv[], enum earlyarg e_arg)
|
|||||||
extended_opt++;
|
extended_opt++;
|
||||||
return windows_early_options(extended_opt);
|
return windows_early_options(extended_opt);
|
||||||
}
|
}
|
||||||
|
FALLTHROUGH;
|
||||||
/*FALLTHRU*/
|
/*FALLTHRU*/
|
||||||
#endif
|
#endif
|
||||||
default:
|
default:
|
||||||
|
|||||||
@@ -3772,6 +3772,7 @@ use_grapple(struct obj *obj)
|
|||||||
(void) thitmonst(mtmp, uwep);
|
(void) thitmonst(mtmp, uwep);
|
||||||
return ECMD_TIME;
|
return ECMD_TIME;
|
||||||
}
|
}
|
||||||
|
FALLTHROUGH;
|
||||||
/*FALLTHRU*/
|
/*FALLTHRU*/
|
||||||
case 3: /* Surface */
|
case 3: /* Surface */
|
||||||
if (IS_AIR(levl[cc.x][cc.y].typ) || is_pool(cc.x, cc.y))
|
if (IS_AIR(levl[cc.x][cc.y].typ) || is_pool(cc.x, cc.y))
|
||||||
@@ -3891,6 +3892,7 @@ do_break_wand(struct obj *obj)
|
|||||||
discard_broken_wand();
|
discard_broken_wand();
|
||||||
return ECMD_TIME;
|
return ECMD_TIME;
|
||||||
}
|
}
|
||||||
|
FALLTHROUGH;
|
||||||
/*FALLTHRU*/
|
/*FALLTHRU*/
|
||||||
case WAN_WISHING:
|
case WAN_WISHING:
|
||||||
case WAN_NOTHING:
|
case WAN_NOTHING:
|
||||||
@@ -3919,6 +3921,7 @@ do_break_wand(struct obj *obj)
|
|||||||
Soundeffect(se_wall_of_force, 65);
|
Soundeffect(se_wall_of_force, 65);
|
||||||
pline("A wall of force smashes down around you!");
|
pline("A wall of force smashes down around you!");
|
||||||
dmg = d(1 + obj->spe, 6); /* normally 2d12 */
|
dmg = d(1 + obj->spe, 6); /* normally 2d12 */
|
||||||
|
FALLTHROUGH;
|
||||||
/*FALLTHRU*/
|
/*FALLTHRU*/
|
||||||
case WAN_CANCELLATION:
|
case WAN_CANCELLATION:
|
||||||
case WAN_POLYMORPH:
|
case WAN_POLYMORPH:
|
||||||
@@ -4304,6 +4307,7 @@ doapply(void)
|
|||||||
pline("It rings! ... But no-one answers.");
|
pline("It rings! ... But no-one answers.");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
FALLTHROUGH;
|
||||||
/*FALLTHRU*/
|
/*FALLTHRU*/
|
||||||
default:
|
default:
|
||||||
/* Pole-weapons can strike at a distance */
|
/* Pole-weapons can strike at a distance */
|
||||||
|
|||||||
+2
-1
@@ -743,7 +743,8 @@ drag_ball(coordxy x, coordxy y, int *bc_control,
|
|||||||
SKIP_TO_DRAG;
|
SKIP_TO_DRAG;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
/* fall through */
|
FALLTHROUGH;
|
||||||
|
/* FALLTHRU */
|
||||||
case 1:
|
case 1:
|
||||||
case 0:
|
case 0:
|
||||||
/* do nothing if possible */
|
/* do nothing if possible */
|
||||||
|
|||||||
@@ -255,6 +255,7 @@ create_drawbridge(coordxy x, coordxy y, int dir, boolean flag)
|
|||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
impossible("bad direction in create_drawbridge");
|
impossible("bad direction in create_drawbridge");
|
||||||
|
FALLTHROUGH;
|
||||||
/*FALLTHRU*/
|
/*FALLTHRU*/
|
||||||
case DB_WEST:
|
case DB_WEST:
|
||||||
horiz = FALSE;
|
horiz = FALSE;
|
||||||
|
|||||||
@@ -528,6 +528,7 @@ display_monster(
|
|||||||
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);
|
||||||
|
FALLTHROUGH;
|
||||||
/*FALLTHRU*/
|
/*FALLTHRU*/
|
||||||
case M_AP_NOTHING:
|
case M_AP_NOTHING:
|
||||||
show_glyph(x, y, mon_to_glyph(mon, newsym_rn2));
|
show_glyph(x, y, mon_to_glyph(mon, newsym_rn2));
|
||||||
@@ -3566,6 +3567,7 @@ wall_angle(struct rm *lev)
|
|||||||
case SDOOR:
|
case SDOOR:
|
||||||
if (lev->horizontal)
|
if (lev->horizontal)
|
||||||
goto horiz;
|
goto horiz;
|
||||||
|
FALLTHROUGH;
|
||||||
/*FALLTHRU*/
|
/*FALLTHRU*/
|
||||||
case VWALL:
|
case VWALL:
|
||||||
switch (lev->wall_info & WM_MASK) {
|
switch (lev->wall_info & WM_MASK) {
|
||||||
|
|||||||
@@ -2217,6 +2217,7 @@ revive_corpse(struct obj *corpse)
|
|||||||
fill_pit(mtmp->mx, mtmp->my);
|
fill_pit(mtmp->mx, mtmp->my);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
FALLTHROUGH;
|
||||||
/*FALLTHRU*/
|
/*FALLTHRU*/
|
||||||
default:
|
default:
|
||||||
/* we should be able to handle the other cases... */
|
/* we should be able to handle the other cases... */
|
||||||
|
|||||||
@@ -442,6 +442,7 @@ objtyp_is_callable(int i)
|
|||||||
determine which one was the real one */
|
determine which one was the real one */
|
||||||
if (i == AMULET_OF_YENDOR || i == FAKE_AMULET_OF_YENDOR)
|
if (i == AMULET_OF_YENDOR || i == FAKE_AMULET_OF_YENDOR)
|
||||||
break; /* return FALSE */
|
break; /* return FALSE */
|
||||||
|
FALLTHROUGH;
|
||||||
/*FALLTHRU*/
|
/*FALLTHRU*/
|
||||||
case SCROLL_CLASS:
|
case SCROLL_CLASS:
|
||||||
case POTION_CLASS:
|
case POTION_CLASS:
|
||||||
|
|||||||
@@ -452,6 +452,7 @@ Helmet_on(void)
|
|||||||
: (uarmh->o_id % 2) ? A_CHAOTIC : A_LAWFUL,
|
: (uarmh->o_id % 2) ? A_CHAOTIC : A_LAWFUL,
|
||||||
A_CG_HELM_ON);
|
A_CG_HELM_ON);
|
||||||
/* makeknown(HELM_OF_OPPOSITE_ALIGNMENT); -- below, after Tobjnam() */
|
/* makeknown(HELM_OF_OPPOSITE_ALIGNMENT); -- below, after Tobjnam() */
|
||||||
|
FALLTHROUGH;
|
||||||
/*FALLTHRU*/
|
/*FALLTHRU*/
|
||||||
case DUNCE_CAP:
|
case DUNCE_CAP:
|
||||||
if (uarmh && !uarmh->cursed) {
|
if (uarmh && !uarmh->cursed) {
|
||||||
|
|||||||
@@ -523,7 +523,9 @@ mon_arrive(struct monst *mtmp, int when)
|
|||||||
} else if (!(u.uevent.qexpelled
|
} else if (!(u.uevent.qexpelled
|
||||||
&& (Is_qstart(&u.uz0) || Is_qstart(&u.uz)))) {
|
&& (Is_qstart(&u.uz0) || Is_qstart(&u.uz)))) {
|
||||||
impossible("mon_arrive: no corresponding portal?");
|
impossible("mon_arrive: no corresponding portal?");
|
||||||
} /*FALLTHRU*/
|
}
|
||||||
|
FALLTHROUGH;
|
||||||
|
/*FALLTHRU*/
|
||||||
default:
|
default:
|
||||||
case MIGR_RANDOM:
|
case MIGR_RANDOM:
|
||||||
xlocale = ylocale = 0;
|
xlocale = ylocale = 0;
|
||||||
@@ -1076,6 +1078,7 @@ dogfood(struct monst *mon, struct obj *obj)
|
|||||||
&& obj->oclass != BALL_CLASS
|
&& obj->oclass != BALL_CLASS
|
||||||
&& obj->oclass != CHAIN_CLASS)
|
&& obj->oclass != CHAIN_CLASS)
|
||||||
return APPORT;
|
return APPORT;
|
||||||
|
FALLTHROUGH;
|
||||||
/*FALLTHRU*/
|
/*FALLTHRU*/
|
||||||
case ROCK_CLASS:
|
case ROCK_CLASS:
|
||||||
return UNDEF;
|
return UNDEF;
|
||||||
|
|||||||
@@ -76,6 +76,7 @@ droppables(struct monst *mon)
|
|||||||
if (pickaxe && pickaxe->otyp == PICK_AXE && pickaxe != wep
|
if (pickaxe && pickaxe->otyp == PICK_AXE && pickaxe != wep
|
||||||
&& (!pickaxe->oartifact || obj->oartifact))
|
&& (!pickaxe->oartifact || obj->oartifact))
|
||||||
return pickaxe; /* drop the one we earlier decided to keep */
|
return pickaxe; /* drop the one we earlier decided to keep */
|
||||||
|
FALLTHROUGH;
|
||||||
/*FALLTHRU*/
|
/*FALLTHRU*/
|
||||||
case PICK_AXE:
|
case PICK_AXE:
|
||||||
if (!pickaxe || (obj->oartifact && !pickaxe->oartifact)) {
|
if (!pickaxe || (obj->oartifact && !pickaxe->oartifact)) {
|
||||||
@@ -104,12 +105,14 @@ droppables(struct monst *mon)
|
|||||||
if (key && key->otyp == LOCK_PICK
|
if (key && key->otyp == LOCK_PICK
|
||||||
&& (!key->oartifact || obj->oartifact))
|
&& (!key->oartifact || obj->oartifact))
|
||||||
return key; /* drop the one we earlier decided to keep */
|
return key; /* drop the one we earlier decided to keep */
|
||||||
|
FALLTHROUGH;
|
||||||
/*FALLTHRU*/
|
/*FALLTHRU*/
|
||||||
case LOCK_PICK:
|
case LOCK_PICK:
|
||||||
/* keep lock-pick in preference to credit card */
|
/* keep lock-pick in preference to credit card */
|
||||||
if (key && key->otyp == CREDIT_CARD
|
if (key && key->otyp == CREDIT_CARD
|
||||||
&& (!key->oartifact || obj->oartifact))
|
&& (!key->oartifact || obj->oartifact))
|
||||||
return key;
|
return key;
|
||||||
|
FALLTHROUGH;
|
||||||
/*FALLTHRU*/
|
/*FALLTHRU*/
|
||||||
case CREDIT_CARD:
|
case CREDIT_CARD:
|
||||||
if (!key || (obj->oartifact && !key->oartifact)) {
|
if (!key || (obj->oartifact && !key->oartifact)) {
|
||||||
|
|||||||
@@ -1340,6 +1340,7 @@ dokick(void)
|
|||||||
pline("%s burps loudly.", Monnam(u.ustuck));
|
pline("%s burps loudly.", Monnam(u.ustuck));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
FALLTHROUGH;
|
||||||
/*FALLTHRU*/
|
/*FALLTHRU*/
|
||||||
default:
|
default:
|
||||||
Your("feeble kick has no effect.");
|
Your("feeble kick has no effect.");
|
||||||
@@ -1484,6 +1485,7 @@ drop_to(coord *cc, schar loc, coordxy x, coordxy y)
|
|||||||
cc->y = cc->x = 0;
|
cc->y = cc->x = 0;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
FALLTHROUGH;
|
||||||
/*FALLTHRU*/
|
/*FALLTHRU*/
|
||||||
case MIGR_STAIRS_UP:
|
case MIGR_STAIRS_UP:
|
||||||
case MIGR_LADDER_UP:
|
case MIGR_LADDER_UP:
|
||||||
@@ -1800,6 +1802,7 @@ obj_delivery(boolean near_hero)
|
|||||||
switch (where) {
|
switch (where) {
|
||||||
case MIGR_LADDER_UP:
|
case MIGR_LADDER_UP:
|
||||||
isladder = TRUE;
|
isladder = TRUE;
|
||||||
|
FALLTHROUGH;
|
||||||
/*FALLTHRU*/
|
/*FALLTHRU*/
|
||||||
case MIGR_STAIRS_UP:
|
case MIGR_STAIRS_UP:
|
||||||
case MIGR_SSTAIRS:
|
case MIGR_SSTAIRS:
|
||||||
|
|||||||
@@ -67,6 +67,7 @@ multishot_class_bonus(
|
|||||||
case PM_NINJA:
|
case PM_NINJA:
|
||||||
if (skill == -P_SHURIKEN || skill == -P_DART)
|
if (skill == -P_SHURIKEN || skill == -P_DART)
|
||||||
multishot++;
|
multishot++;
|
||||||
|
FALLTHROUGH;
|
||||||
/*FALLTHRU*/
|
/*FALLTHRU*/
|
||||||
case PM_SAMURAI:
|
case PM_SAMURAI:
|
||||||
/* role-specific launcher and its ammo */
|
/* role-specific launcher and its ammo */
|
||||||
@@ -175,6 +176,7 @@ throw_obj(struct obj *obj, int shotlimit)
|
|||||||
switch (P_SKILL(weapon_type(obj))) {
|
switch (P_SKILL(weapon_type(obj))) {
|
||||||
case P_EXPERT:
|
case P_EXPERT:
|
||||||
multishot++;
|
multishot++;
|
||||||
|
FALLTHROUGH;
|
||||||
/*FALLTHRU*/
|
/*FALLTHRU*/
|
||||||
case P_SKILLED:
|
case P_SKILLED:
|
||||||
if (!weakmultishot)
|
if (!weakmultishot)
|
||||||
@@ -1295,6 +1297,7 @@ toss_up(struct obj *obj, 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;
|
||||||
}
|
}
|
||||||
|
FALLTHROUGH;
|
||||||
/*FALLTHRU*/
|
/*FALLTHRU*/
|
||||||
case CREAM_PIE:
|
case CREAM_PIE:
|
||||||
case BLINDING_VENOM:
|
case BLINDING_VENOM:
|
||||||
@@ -2572,12 +2575,14 @@ breakmsg(struct obj *obj, 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 (%d)?", obj->otyp);
|
impossible("breaking odd object (%d)?", obj->otyp);
|
||||||
|
FALLTHROUGH;
|
||||||
/*FALLTHRU*/
|
/*FALLTHRU*/
|
||||||
case LENSES:
|
case LENSES:
|
||||||
case MIRROR:
|
case MIRROR:
|
||||||
case CRYSTAL_BALL:
|
case CRYSTAL_BALL:
|
||||||
case EXPENSIVE_CAMERA:
|
case EXPENSIVE_CAMERA:
|
||||||
to_pieces = " into a thousand pieces";
|
to_pieces = " into a thousand pieces";
|
||||||
|
FALLTHROUGH;
|
||||||
/*FALLTHRU*/
|
/*FALLTHRU*/
|
||||||
case POT_WATER: /* really, all potions */
|
case POT_WATER: /* really, all potions */
|
||||||
if (!in_view)
|
if (!in_view)
|
||||||
|
|||||||
@@ -3039,6 +3039,7 @@ count_feat_lastseentyp(
|
|||||||
}
|
}
|
||||||
if (is_drawbridge_wall(x, y) < 0)
|
if (is_drawbridge_wall(x, y) < 0)
|
||||||
break;
|
break;
|
||||||
|
FALLTHROUGH;
|
||||||
/*FALLTHRU*/
|
/*FALLTHRU*/
|
||||||
case DBWALL:
|
case DBWALL:
|
||||||
case DRAWBRIDGE_DOWN:
|
case DRAWBRIDGE_DOWN:
|
||||||
|
|||||||
@@ -848,6 +848,7 @@ cprefx(int pm)
|
|||||||
make_slimed(10L, (char *) 0);
|
make_slimed(10L, (char *) 0);
|
||||||
delayed_killer(SLIMED, KILLED_BY_AN, "");
|
delayed_killer(SLIMED, KILLED_BY_AN, "");
|
||||||
}
|
}
|
||||||
|
FALLTHROUGH;
|
||||||
/* Fall through */
|
/* Fall through */
|
||||||
default:
|
default:
|
||||||
if (acidic(&mons[pm]) && Stoned)
|
if (acidic(&mons[pm]) && Stoned)
|
||||||
@@ -1164,19 +1165,23 @@ cpostfx(int pm)
|
|||||||
HSee_invisible |= FROMOUTSIDE;
|
HSee_invisible |= FROMOUTSIDE;
|
||||||
}
|
}
|
||||||
newsym(u.ux, u.uy);
|
newsym(u.ux, u.uy);
|
||||||
|
FALLTHROUGH;
|
||||||
/*FALLTHRU*/
|
/*FALLTHRU*/
|
||||||
case PM_YELLOW_LIGHT:
|
case PM_YELLOW_LIGHT:
|
||||||
case PM_GIANT_BAT:
|
case PM_GIANT_BAT:
|
||||||
make_stunned((HStun & TIMEOUT) + 30L, FALSE);
|
make_stunned((HStun & TIMEOUT) + 30L, FALSE);
|
||||||
|
FALLTHROUGH;
|
||||||
/*FALLTHRU*/
|
/*FALLTHRU*/
|
||||||
case PM_BAT:
|
case PM_BAT:
|
||||||
make_stunned((HStun & TIMEOUT) + 30L, FALSE);
|
make_stunned((HStun & TIMEOUT) + 30L, FALSE);
|
||||||
break;
|
break;
|
||||||
case PM_GIANT_MIMIC:
|
case PM_GIANT_MIMIC:
|
||||||
tmp += 10;
|
tmp += 10;
|
||||||
|
FALLTHROUGH;
|
||||||
/*FALLTHRU*/
|
/*FALLTHRU*/
|
||||||
case PM_LARGE_MIMIC:
|
case PM_LARGE_MIMIC:
|
||||||
tmp += 20;
|
tmp += 20;
|
||||||
|
FALLTHROUGH;
|
||||||
/*FALLTHRU*/
|
/*FALLTHRU*/
|
||||||
case PM_SMALL_MIMIC:
|
case PM_SMALL_MIMIC:
|
||||||
tmp += 20;
|
tmp += 20;
|
||||||
@@ -1278,6 +1283,7 @@ cpostfx(int pm)
|
|||||||
} else {
|
} else {
|
||||||
pline("For some reason, that tasted bland.");
|
pline("For some reason, that tasted bland.");
|
||||||
}
|
}
|
||||||
|
FALLTHROUGH;
|
||||||
/*FALLTHRU*/
|
/*FALLTHRU*/
|
||||||
default:
|
default:
|
||||||
check_intrinsics = TRUE;
|
check_intrinsics = TRUE;
|
||||||
@@ -2143,6 +2149,7 @@ fprefx(struct obj *otmp)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
iter_mons(garlic_breath);
|
iter_mons(garlic_breath);
|
||||||
|
FALLTHROUGH;
|
||||||
/*FALLTHRU*/
|
/*FALLTHRU*/
|
||||||
default:
|
default:
|
||||||
if (otmp->otyp == SLIME_MOLD && !otmp->cursed
|
if (otmp->otyp == SLIME_MOLD && !otmp->cursed
|
||||||
|
|||||||
@@ -606,6 +606,7 @@ doengrave_sfx_item_WAN(struct _doengrave_ctx *de)
|
|||||||
"A few ice cubes drop from the wand.");
|
"A few ice cubes drop from the wand.");
|
||||||
if (!de->oep || (de->oep->engr_type != BURN))
|
if (!de->oep || (de->oep->engr_type != BURN))
|
||||||
break;
|
break;
|
||||||
|
FALLTHROUGH;
|
||||||
/*FALLTHRU*/
|
/*FALLTHRU*/
|
||||||
case WAN_CANCELLATION:
|
case WAN_CANCELLATION:
|
||||||
case WAN_MAKE_INVISIBLE:
|
case WAN_MAKE_INVISIBLE:
|
||||||
@@ -706,6 +707,7 @@ doengrave_sfx_item(struct _doengrave_ctx *de)
|
|||||||
de->type = DUST;
|
de->type = DUST;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
FALLTHROUGH;
|
||||||
/*FALLTHRU*/
|
/*FALLTHRU*/
|
||||||
/* Objects too large to engrave with */
|
/* Objects too large to engrave with */
|
||||||
case BALL_CLASS:
|
case BALL_CLASS:
|
||||||
|
|||||||
@@ -359,6 +359,7 @@ drinkfountain(void)
|
|||||||
dofindgem();
|
dofindgem();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
FALLTHROUGH;
|
||||||
/*FALLTHRU*/
|
/*FALLTHRU*/
|
||||||
case 28: /* Water Nymph */
|
case 28: /* Water Nymph */
|
||||||
dowaternymph();
|
dowaternymph();
|
||||||
@@ -486,6 +487,7 @@ dipfountain(struct obj *obj)
|
|||||||
dofindgem();
|
dofindgem();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
FALLTHROUGH;
|
||||||
/*FALLTHRU*/
|
/*FALLTHRU*/
|
||||||
case 25: /* Water gushes forth */
|
case 25: /* Water gushes forth */
|
||||||
dogushforth(FALSE);
|
dogushforth(FALSE);
|
||||||
@@ -699,6 +701,7 @@ drinksink(void)
|
|||||||
pline("From the murky drain, a hand reaches up... --oops--");
|
pline("From the murky drain, a hand reaches up... --oops--");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
FALLTHROUGH;
|
||||||
/*FALLTHRU*/
|
/*FALLTHRU*/
|
||||||
default:
|
default:
|
||||||
You("take a sip of %s %s.",
|
You("take a sip of %s %s.",
|
||||||
@@ -770,6 +773,7 @@ dipsink(struct obj *obj)
|
|||||||
try_call = TRUE;
|
try_call = TRUE;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
FALLTHROUGH;
|
||||||
/* FALLTHRU */
|
/* FALLTHRU */
|
||||||
case POT_GAIN_LEVEL:
|
case POT_GAIN_LEVEL:
|
||||||
case POT_GAIN_ENERGY:
|
case POT_GAIN_ENERGY:
|
||||||
|
|||||||
@@ -465,6 +465,7 @@ gather_locs_interesting(coordxy x, coordxy y, int gloc)
|
|||||||
case GLOC_VALID:
|
case GLOC_VALID:
|
||||||
if (getpos_getvalid)
|
if (getpos_getvalid)
|
||||||
return (*getpos_getvalid)(x, y);
|
return (*getpos_getvalid)(x, y);
|
||||||
|
FALLTHROUGH;
|
||||||
/*FALLTHRU*/
|
/*FALLTHRU*/
|
||||||
case GLOC_INTERESTING:
|
case GLOC_INTERESTING:
|
||||||
return (gather_locs_interesting(x, y, GLOC_DOOR)
|
return (gather_locs_interesting(x, y, GLOC_DOOR)
|
||||||
|
|||||||
@@ -571,6 +571,7 @@ moverock_core(coordxy sx, coordxy sy)
|
|||||||
dopush(sx, sy, rx, ry, otmp, costly);
|
dopush(sx, sy, rx, ry, otmp, costly);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
FALLTHROUGH;
|
||||||
/*FALLTHRU*/
|
/*FALLTHRU*/
|
||||||
case TELEP_TRAP:
|
case TELEP_TRAP:
|
||||||
rock_disappear_msg(otmp);
|
rock_disappear_msg(otmp);
|
||||||
@@ -2553,6 +2554,7 @@ escape_from_sticky_mon(coordxy x, coordxy y)
|
|||||||
u.ustuck->mfrozen = 1;
|
u.ustuck->mfrozen = 1;
|
||||||
u.ustuck->msleeping = 0;
|
u.ustuck->msleeping = 0;
|
||||||
}
|
}
|
||||||
|
FALLTHROUGH;
|
||||||
/*FALLTHRU*/
|
/*FALLTHRU*/
|
||||||
default:
|
default:
|
||||||
if (u.ustuck->mtame && !Conflict && !u.ustuck->mconf)
|
if (u.ustuck->mtame && !Conflict && !u.ustuck->mconf)
|
||||||
@@ -3573,6 +3575,7 @@ check_special_room(boolean newlev)
|
|||||||
}
|
}
|
||||||
case TEMPLE:
|
case TEMPLE:
|
||||||
intemple(roomno + ROOMOFFSET);
|
intemple(roomno + ROOMOFFSET);
|
||||||
|
FALLTHROUGH;
|
||||||
/*FALLTHRU*/
|
/*FALLTHRU*/
|
||||||
default:
|
default:
|
||||||
msg_given = (rt == TEMPLE || rt >= SHOPBASE);
|
msg_given = (rt == TEMPLE || rt >= SHOPBASE);
|
||||||
@@ -4317,6 +4320,7 @@ spot_checks(coordxy x, coordxy y, schar old_typ)
|
|||||||
switch (old_typ) {
|
switch (old_typ) {
|
||||||
case DRAWBRIDGE_UP:
|
case DRAWBRIDGE_UP:
|
||||||
db_ice_now = ((levl[x][y].drawbridgemask & DB_UNDER) == DB_ICE);
|
db_ice_now = ((levl[x][y].drawbridgemask & DB_UNDER) == DB_ICE);
|
||||||
|
FALLTHROUGH;
|
||||||
/*FALLTHRU*/
|
/*FALLTHRU*/
|
||||||
case ICE:
|
case ICE:
|
||||||
if ((new_typ != old_typ)
|
if ((new_typ != old_typ)
|
||||||
|
|||||||
@@ -1968,6 +1968,8 @@ attributes_enlightenment(
|
|||||||
switch (u.umortality) {
|
switch (u.umortality) {
|
||||||
case 0:
|
case 0:
|
||||||
impossible("dead without dying?");
|
impossible("dead without dying?");
|
||||||
|
FALLTHROUGH;
|
||||||
|
/* FALLTHRU */
|
||||||
case 1:
|
case 1:
|
||||||
break; /* just "are dead" */
|
break; /* just "are dead" */
|
||||||
default:
|
default:
|
||||||
@@ -2624,6 +2626,7 @@ vanqsort_cmp(
|
|||||||
res = uniq2 - uniq1;
|
res = uniq2 - uniq1;
|
||||||
break;
|
break;
|
||||||
} /* else both unique or neither unique */
|
} /* else both unique or neither unique */
|
||||||
|
FALLTHROUGH;
|
||||||
/*FALLTHRU*/
|
/*FALLTHRU*/
|
||||||
case VANQ_ALPHA_MIX:
|
case VANQ_ALPHA_MIX:
|
||||||
name1 = mons[indx1].pmnames[NEUTRAL];
|
name1 = mons[indx1].pmnames[NEUTRAL];
|
||||||
|
|||||||
@@ -2463,6 +2463,7 @@ askchain(
|
|||||||
switch (sym) {
|
switch (sym) {
|
||||||
case 'a':
|
case 'a':
|
||||||
allflag = 1;
|
allflag = 1;
|
||||||
|
FALLTHROUGH;
|
||||||
/*FALLTHRU*/
|
/*FALLTHRU*/
|
||||||
case 'y':
|
case 'y':
|
||||||
tmp = (*fn)(otmp);
|
tmp = (*fn)(otmp);
|
||||||
@@ -2481,10 +2482,13 @@ askchain(
|
|||||||
cnt += tmp;
|
cnt += tmp;
|
||||||
if (--mx == 0)
|
if (--mx == 0)
|
||||||
goto ret;
|
goto ret;
|
||||||
|
FALLTHROUGH;
|
||||||
/*FALLTHRU*/
|
/*FALLTHRU*/
|
||||||
case 'n':
|
case 'n':
|
||||||
if (nodot)
|
if (nodot)
|
||||||
dud++;
|
dud++;
|
||||||
|
FALLTHROUGH;
|
||||||
|
/*FALLTHRU*/
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
case 'q':
|
case 'q':
|
||||||
@@ -2975,6 +2979,7 @@ itemactions_pushkeys(struct obj *otmp, int act)
|
|||||||
switch (act) {
|
switch (act) {
|
||||||
default:
|
default:
|
||||||
impossible("Unknown item action");
|
impossible("Unknown item action");
|
||||||
|
break;
|
||||||
case IA_NONE:
|
case IA_NONE:
|
||||||
break;
|
break;
|
||||||
case IA_UNWIELD:
|
case IA_UNWIELD:
|
||||||
|
|||||||
@@ -521,6 +521,7 @@ m_initweap(struct monst *mtmp)
|
|||||||
*/
|
*/
|
||||||
if (!is_demon(ptr))
|
if (!is_demon(ptr))
|
||||||
break;
|
break;
|
||||||
|
FALLTHROUGH;
|
||||||
/*FALLTHRU*/
|
/*FALLTHRU*/
|
||||||
default:
|
default:
|
||||||
/*
|
/*
|
||||||
@@ -704,12 +705,15 @@ m_initinv(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);
|
||||||
|
FALLTHROUGH;
|
||||||
/*FALLTHRU*/
|
/*FALLTHRU*/
|
||||||
case 1:
|
case 1:
|
||||||
(void) mongets(mtmp, POT_EXTRA_HEALING);
|
(void) mongets(mtmp, POT_EXTRA_HEALING);
|
||||||
|
FALLTHROUGH;
|
||||||
/*FALLTHRU*/
|
/*FALLTHRU*/
|
||||||
case 2:
|
case 2:
|
||||||
(void) mongets(mtmp, POT_HEALING);
|
(void) mongets(mtmp, POT_HEALING);
|
||||||
|
FALLTHROUGH;
|
||||||
/*FALLTHRU*/
|
/*FALLTHRU*/
|
||||||
case 3:
|
case 3:
|
||||||
(void) mongets(mtmp, WAN_STRIKING);
|
(void) mongets(mtmp, WAN_STRIKING);
|
||||||
|
|||||||
@@ -84,6 +84,7 @@ choose_magic_spell(int spellval)
|
|||||||
case 23:
|
case 23:
|
||||||
if (Antimagic || Hallucination)
|
if (Antimagic || Hallucination)
|
||||||
return MGC_PSI_BOLT;
|
return MGC_PSI_BOLT;
|
||||||
|
FALLTHROUGH;
|
||||||
/*FALLTHRU*/
|
/*FALLTHRU*/
|
||||||
case 22:
|
case 22:
|
||||||
case 21:
|
case 21:
|
||||||
@@ -138,6 +139,7 @@ choose_clerical_spell(int spellnum)
|
|||||||
case 14:
|
case 14:
|
||||||
if (rn2(3))
|
if (rn2(3))
|
||||||
return CLC_OPEN_WOUNDS;
|
return CLC_OPEN_WOUNDS;
|
||||||
|
FALLTHROUGH;
|
||||||
/*FALLTHRU*/
|
/*FALLTHRU*/
|
||||||
case 13:
|
case 13:
|
||||||
return CLC_GEYSER;
|
return CLC_GEYSER;
|
||||||
|
|||||||
@@ -405,6 +405,7 @@ mattackm(
|
|||||||
mswingsm(magr, mdef, mwep);
|
mswingsm(magr, mdef, mwep);
|
||||||
tmp += hitval(mwep, mdef);
|
tmp += hitval(mwep, mdef);
|
||||||
}
|
}
|
||||||
|
FALLTHROUGH;
|
||||||
/*FALLTHRU*/
|
/*FALLTHRU*/
|
||||||
case AT_CLAW:
|
case AT_CLAW:
|
||||||
case AT_KICK:
|
case AT_KICK:
|
||||||
@@ -683,6 +684,7 @@ hitmm(
|
|||||||
Snprintf(buf, sizeof buf, "%s squeezes", magr_name);
|
Snprintf(buf, sizeof buf, "%s squeezes", magr_name);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
FALLTHROUGH;
|
||||||
/*FALLTHRU*/
|
/*FALLTHRU*/
|
||||||
default:
|
default:
|
||||||
if (!weaponhit || !mwep || !mwep->oartifact)
|
if (!weaponhit || !mwep || !mwep->oartifact)
|
||||||
|
|||||||
@@ -588,6 +588,7 @@ fixup_special(void)
|
|||||||
sp = find_level(r->rname.str);
|
sp = find_level(r->rname.str);
|
||||||
lev = sp->dlevel;
|
lev = sp->dlevel;
|
||||||
}
|
}
|
||||||
|
FALLTHROUGH;
|
||||||
/*FALLTHRU*/
|
/*FALLTHRU*/
|
||||||
|
|
||||||
case LR_UPSTAIR:
|
case LR_UPSTAIR:
|
||||||
@@ -2073,6 +2074,7 @@ mv_bubble(struct bubble *b, coordxy dx, coordxy dy, boolean ini)
|
|||||||
break;
|
break;
|
||||||
case 3:
|
case 3:
|
||||||
b->dy = -b->dy;
|
b->dy = -b->dy;
|
||||||
|
FALLTHROUGH;
|
||||||
/*FALLTHRU*/
|
/*FALLTHRU*/
|
||||||
case 2:
|
case 2:
|
||||||
b->dx = -b->dx;
|
b->dx = -b->dx;
|
||||||
|
|||||||
@@ -325,6 +325,7 @@ mkbox_cnts(struct obj *box)
|
|||||||
n = 0;
|
n = 0;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
FALLTHROUGH;
|
||||||
/*FALLTHRU*/
|
/*FALLTHRU*/
|
||||||
case BAG_OF_HOLDING:
|
case BAG_OF_HOLDING:
|
||||||
n = 1;
|
n = 1;
|
||||||
@@ -999,6 +1000,7 @@ mksobj_init(struct obj *otmp, boolean artif)
|
|||||||
case LARGE_BOX:
|
case LARGE_BOX:
|
||||||
otmp->olocked = !!(rn2(5));
|
otmp->olocked = !!(rn2(5));
|
||||||
otmp->otrapped = !(rn2(10));
|
otmp->otrapped = !(rn2(10));
|
||||||
|
FALLTHROUGH;
|
||||||
/*FALLTHRU*/
|
/*FALLTHRU*/
|
||||||
case ICE_BOX:
|
case ICE_BOX:
|
||||||
case SACK:
|
case SACK:
|
||||||
@@ -1184,6 +1186,7 @@ mksobj(int otyp, boolean init, boolean artif)
|
|||||||
if (svm.mvitals[otmp->corpsenm].mvflags & (G_NOCORPSE | G_GONE))
|
if (svm.mvitals[otmp->corpsenm].mvflags & (G_NOCORPSE | G_GONE))
|
||||||
otmp->corpsenm = gu.urole.mnum;
|
otmp->corpsenm = gu.urole.mnum;
|
||||||
}
|
}
|
||||||
|
FALLTHROUGH;
|
||||||
/*FALLTHRU*/
|
/*FALLTHRU*/
|
||||||
case STATUE:
|
case STATUE:
|
||||||
case FIGURINE:
|
case FIGURINE:
|
||||||
@@ -1197,6 +1200,7 @@ mksobj(int otyp, boolean init, boolean artif)
|
|||||||
: is_male(ptr) ? CORPSTAT_MALE
|
: is_male(ptr) ? CORPSTAT_MALE
|
||||||
: rn2(2) ? CORPSTAT_FEMALE : CORPSTAT_MALE);
|
: rn2(2) ? CORPSTAT_FEMALE : CORPSTAT_MALE);
|
||||||
}
|
}
|
||||||
|
FALLTHROUGH;
|
||||||
/*FALLTHRU*/
|
/*FALLTHRU*/
|
||||||
case EGG:
|
case EGG:
|
||||||
/* case TIN: */
|
/* case TIN: */
|
||||||
@@ -1210,6 +1214,7 @@ mksobj(int otyp, boolean init, boolean artif)
|
|||||||
break;
|
break;
|
||||||
case POT_OIL:
|
case POT_OIL:
|
||||||
otmp->age = MAX_OIL_IN_FLASK; /* amount of oil */
|
otmp->age = MAX_OIL_IN_FLASK; /* amount of oil */
|
||||||
|
FALLTHROUGH;
|
||||||
/*FALLTHRU*/
|
/*FALLTHRU*/
|
||||||
case POT_WATER: /* POTION_CLASS */
|
case POT_WATER: /* POTION_CLASS */
|
||||||
otmp->fromsink = 0; /* overloads corpsenm, which was set to NON_PM */
|
otmp->fromsink = 0; /* overloads corpsenm, which was set to NON_PM */
|
||||||
@@ -2982,6 +2987,7 @@ objlist_sanity(struct obj *objlist, int wheretype, const char *mesg)
|
|||||||
/* note: ball and chain can also be OBJ_FREE, but not across
|
/* note: ball and chain can also be OBJ_FREE, but not across
|
||||||
turns so this sanity check shouldn't encounter that */
|
turns so this sanity check shouldn't encounter that */
|
||||||
bc_ok = TRUE;
|
bc_ok = TRUE;
|
||||||
|
FALLTHROUGH;
|
||||||
/*FALLTHRU*/
|
/*FALLTHRU*/
|
||||||
default:
|
default:
|
||||||
if ((obj != uchain && obj != uball) || !bc_ok) {
|
if ((obj != uchain && obj != uball) || !bc_ok) {
|
||||||
|
|||||||
@@ -861,7 +861,6 @@ make_corpse(struct monst *mtmp, unsigned int corpseflags)
|
|||||||
case PM_PAGE: case PM_ABBOT: case PM_ACOLYTE: case PM_HUNTER:
|
case PM_PAGE: case PM_ABBOT: case PM_ACOLYTE: case PM_HUNTER:
|
||||||
case PM_THUG: case PM_NINJA: case PM_ROSHI: case PM_GUIDE:
|
case PM_THUG: case PM_NINJA: case PM_ROSHI: case PM_GUIDE:
|
||||||
case PM_WARRIOR: case PM_APPRENTICE:
|
case PM_WARRIOR: case PM_APPRENTICE:
|
||||||
/*FALLTHRU*/
|
|
||||||
#else
|
#else
|
||||||
default:
|
default:
|
||||||
#endif
|
#endif
|
||||||
@@ -3076,7 +3075,8 @@ mondead(struct monst *mtmp)
|
|||||||
(void) makemon(mtmp->data, stway->sx, stway->sy, NO_MM_FLAGS);
|
(void) makemon(mtmp->data, stway->sx, stway->sy, NO_MM_FLAGS);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
/* fall-through */
|
FALLTHROUGH;
|
||||||
|
/* FALLTHRU */
|
||||||
case 2: /* randomly */
|
case 2: /* randomly */
|
||||||
(void) makemon(mtmp->data, 0, 0, NO_MM_FLAGS);
|
(void) makemon(mtmp->data, 0, 0, NO_MM_FLAGS);
|
||||||
break;
|
break;
|
||||||
@@ -4791,12 +4791,14 @@ pickvampshape(struct monst *mon)
|
|||||||
if (mon_has_special(mon))
|
if (mon_has_special(mon))
|
||||||
break; /* leave mndx as is */
|
break; /* leave mndx as is */
|
||||||
wolfchance = 3;
|
wolfchance = 3;
|
||||||
|
FALLTHROUGH;
|
||||||
/*FALLTHRU*/
|
/*FALLTHRU*/
|
||||||
case PM_VAMPIRE_LEADER: /* vampire lord or Vlad can become wolf */
|
case PM_VAMPIRE_LEADER: /* vampire lord or Vlad can become wolf */
|
||||||
if (!rn2(wolfchance) && !uppercase_only) {
|
if (!rn2(wolfchance) && !uppercase_only) {
|
||||||
mndx = PM_WOLF;
|
mndx = PM_WOLF;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
FALLTHROUGH;
|
||||||
/*FALLTHRU*/
|
/*FALLTHRU*/
|
||||||
case PM_VAMPIRE: /* any vampire can become fog or bat */
|
case PM_VAMPIRE: /* any vampire can become fog or bat */
|
||||||
mndx = (!rn2(4) && !uppercase_only) ? PM_FOG_CLOUD : PM_VAMPIRE_BAT;
|
mndx = (!rn2(4) && !uppercase_only) ? PM_FOG_CLOUD : PM_VAMPIRE_BAT;
|
||||||
@@ -4900,6 +4902,7 @@ validvamp(struct monst *mon, int *mndx_p, int monclass)
|
|||||||
*mndx_p = PM_WOLF;
|
*mndx_p = PM_WOLF;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
FALLTHROUGH;
|
||||||
/*FALLTHRU*/
|
/*FALLTHRU*/
|
||||||
default:
|
default:
|
||||||
*mndx_p = NON_PM;
|
*mndx_p = NON_PM;
|
||||||
|
|||||||
@@ -887,6 +887,7 @@ dochug(struct monst *mtmp)
|
|||||||
case MMOVE_NOMOVES:
|
case MMOVE_NOMOVES:
|
||||||
if (scared)
|
if (scared)
|
||||||
panicattk = TRUE;
|
panicattk = TRUE;
|
||||||
|
FALLTHROUGH;
|
||||||
/*FALLTHRU*/
|
/*FALLTHRU*/
|
||||||
case MMOVE_NOTHING: /* no movement, but it can still attack you */
|
case MMOVE_NOTHING: /* no movement, but it can still attack you */
|
||||||
case MMOVE_DONE: /* absolutely no movement */
|
case MMOVE_DONE: /* absolutely no movement */
|
||||||
@@ -1758,6 +1759,7 @@ m_move(struct monst *mtmp, int after)
|
|||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
impossible("unknown shk/gd/pri_move return value (%d)", xm);
|
impossible("unknown shk/gd/pri_move return value (%d)", xm);
|
||||||
|
FALLTHROUGH;
|
||||||
/*FALLTHRU*/
|
/*FALLTHRU*/
|
||||||
case 0:
|
case 0:
|
||||||
case 1:
|
case 1:
|
||||||
|
|||||||
@@ -655,6 +655,7 @@ m_throw(
|
|||||||
hitu = 0;
|
hitu = 0;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
FALLTHROUGH;
|
||||||
/*FALLTHRU*/
|
/*FALLTHRU*/
|
||||||
case CREAM_PIE:
|
case CREAM_PIE:
|
||||||
case BLINDING_VENOM:
|
case BLINDING_VENOM:
|
||||||
@@ -851,6 +852,7 @@ spitmm(struct monst *mtmp, struct attack *mattk, struct monst *mtarg)
|
|||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
impossible("bad attack type in spitmm");
|
impossible("bad attack type in spitmm");
|
||||||
|
FALLTHROUGH;
|
||||||
/*FALLTHRU*/
|
/*FALLTHRU*/
|
||||||
case AD_ACID:
|
case AD_ACID:
|
||||||
otmp = mksobj(ACID_VENOM, TRUE, FALSE);
|
otmp = mksobj(ACID_VENOM, TRUE, FALSE);
|
||||||
|
|||||||
+5
-1
@@ -1201,6 +1201,7 @@ rnd_defensive_item(struct monst *mtmp)
|
|||||||
goto try_again;
|
goto try_again;
|
||||||
if (!rn2(3))
|
if (!rn2(3))
|
||||||
return WAN_TELEPORTATION;
|
return WAN_TELEPORTATION;
|
||||||
|
FALLTHROUGH;
|
||||||
/*FALLTHRU*/
|
/*FALLTHRU*/
|
||||||
case 0:
|
case 0:
|
||||||
case 1:
|
case 1:
|
||||||
@@ -1209,6 +1210,7 @@ rnd_defensive_item(struct monst *mtmp)
|
|||||||
case 10:
|
case 10:
|
||||||
if (!rn2(3))
|
if (!rn2(3))
|
||||||
return WAN_CREATE_MONSTER;
|
return WAN_CREATE_MONSTER;
|
||||||
|
FALLTHROUGH;
|
||||||
/*FALLTHRU*/
|
/*FALLTHRU*/
|
||||||
case 2:
|
case 2:
|
||||||
return SCR_CREATE_MONSTER;
|
return SCR_CREATE_MONSTER;
|
||||||
@@ -1968,7 +1970,9 @@ rnd_offensive_item(struct monst *mtmp)
|
|||||||
if (hard_helmet(mtmp_helmet) || amorphous(pm)
|
if (hard_helmet(mtmp_helmet) || amorphous(pm)
|
||||||
|| passes_walls(pm) || noncorporeal(pm) || unsolid(pm))
|
|| passes_walls(pm) || noncorporeal(pm) || unsolid(pm))
|
||||||
return SCR_EARTH;
|
return SCR_EARTH;
|
||||||
} /* fall through */
|
}
|
||||||
|
FALLTHROUGH;
|
||||||
|
/* FALLTHRU */
|
||||||
case 1:
|
case 1:
|
||||||
return WAN_STRIKING;
|
return WAN_STRIKING;
|
||||||
case 2:
|
case 2:
|
||||||
|
|||||||
@@ -443,6 +443,7 @@ do_earthquake(int force)
|
|||||||
unblock_point(x, y);
|
unblock_point(x, y);
|
||||||
if (cansee(x, y))
|
if (cansee(x, y))
|
||||||
pline("A secret corridor is revealed.");
|
pline("A secret corridor is revealed.");
|
||||||
|
FALLTHROUGH;
|
||||||
/*FALLTHRU*/
|
/*FALLTHRU*/
|
||||||
case CORR:
|
case CORR:
|
||||||
case ROOM:
|
case ROOM:
|
||||||
@@ -452,6 +453,7 @@ do_earthquake(int force)
|
|||||||
cvt_sdoor_to_door(&levl[x][y]); /* .typ = DOOR */
|
cvt_sdoor_to_door(&levl[x][y]); /* .typ = DOOR */
|
||||||
if (cansee(x, y))
|
if (cansee(x, y))
|
||||||
pline("A secret door is revealed.");
|
pline("A secret door is revealed.");
|
||||||
|
FALLTHROUGH;
|
||||||
/*FALLTHRU*/
|
/*FALLTHRU*/
|
||||||
case DOOR: /* make the door collapse */
|
case DOOR: /* make the door collapse */
|
||||||
/* if already doorless, treat like room or corridor */
|
/* if already doorless, treat like room or corridor */
|
||||||
|
|||||||
@@ -1996,6 +1996,8 @@ nhl_pcall_handle(lua_State *L, int nargs, int nresults, const char *name,
|
|||||||
case NHLpa_panic:
|
case NHLpa_panic:
|
||||||
panic("Lua error %d:%s %s", nud->sid,
|
panic("Lua error %d:%s %s", nud->sid,
|
||||||
nud->name ? nud->name : "(unknown)", lua_tostring(L, -1));
|
nud->name ? nud->name : "(unknown)", lua_tostring(L, -1));
|
||||||
|
/*NOTREACHED*/
|
||||||
|
break;
|
||||||
case NHLpa_impossible:
|
case NHLpa_impossible:
|
||||||
impossible("Lua error: %d:%s %s", nud->sid,
|
impossible("Lua error: %d:%s %s", nud->sid,
|
||||||
nud->name ? nud->name : "(unknown)",
|
nud->name ? nud->name : "(unknown)",
|
||||||
|
|||||||
+7
-2
@@ -677,6 +677,7 @@ xname_flags(
|
|||||||
case WEAPON_CLASS:
|
case WEAPON_CLASS:
|
||||||
if (is_poisonable(obj) && obj->opoisoned)
|
if (is_poisonable(obj) && obj->opoisoned)
|
||||||
Strcpy(buf, "poisoned ");
|
Strcpy(buf, "poisoned ");
|
||||||
|
FALLTHROUGH;
|
||||||
/*FALLTHRU*/
|
/*FALLTHRU*/
|
||||||
case VENOM_CLASS:
|
case VENOM_CLASS:
|
||||||
case TOOL_CLASS:
|
case TOOL_CLASS:
|
||||||
@@ -1391,6 +1392,7 @@ doname_base(
|
|||||||
ConcatF1(bp, 1, ", %s lit)", arti_light_description(obj));
|
ConcatF1(bp, 1, ", %s lit)", arti_light_description(obj));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
FALLTHROUGH;
|
||||||
/*FALLTHRU*/
|
/*FALLTHRU*/
|
||||||
case WEAPON_CLASS:
|
case WEAPON_CLASS:
|
||||||
if (ispoisoned)
|
if (ispoisoned)
|
||||||
@@ -5077,7 +5079,8 @@ readobjnam(char *bp, struct obj *no_wish)
|
|||||||
break;
|
break;
|
||||||
case SLIME_MOLD:
|
case SLIME_MOLD:
|
||||||
d.otmp->spe = d.ftype;
|
d.otmp->spe = d.ftype;
|
||||||
/* Fall through */
|
FALLTHROUGH;
|
||||||
|
/* FALLTHRU */
|
||||||
case SKELETON_KEY:
|
case SKELETON_KEY:
|
||||||
case CHEST:
|
case CHEST:
|
||||||
case LARGE_BOX:
|
case LARGE_BOX:
|
||||||
@@ -5109,7 +5112,8 @@ readobjnam(char *bp, struct obj *no_wish)
|
|||||||
/* scroll of mail: 0: delivered in-game via external event (or randomly
|
/* scroll of mail: 0: delivered in-game via external event (or randomly
|
||||||
for fake mail); 1: from bones or wishing; 2: written with marker */
|
for fake mail); 1: from bones or wishing; 2: written with marker */
|
||||||
case SCR_MAIL:
|
case SCR_MAIL:
|
||||||
/*FALLTHRU*/
|
d.otmp->spe = 1;
|
||||||
|
break;
|
||||||
#endif
|
#endif
|
||||||
/* splash of venom: 0: normal, and transitory; 1: wishing */
|
/* splash of venom: 0: normal, and transitory; 1: wishing */
|
||||||
case ACID_VENOM:
|
case ACID_VENOM:
|
||||||
@@ -5121,6 +5125,7 @@ readobjnam(char *bp, struct obj *no_wish)
|
|||||||
d.otmp->spe = (rn2(10) ? -1 : 0);
|
d.otmp->spe = (rn2(10) ? -1 : 0);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
FALLTHROUGH;
|
||||||
/*FALLTHRU*/
|
/*FALLTHRU*/
|
||||||
default:
|
default:
|
||||||
d.otmp->spe = d.spe;
|
d.otmp->spe = d.spe;
|
||||||
|
|||||||
@@ -3624,6 +3624,7 @@ optfn_scores(
|
|||||||
allopt[optidx].name);
|
allopt[optidx].name);
|
||||||
return optn_silenterr;
|
return optn_silenterr;
|
||||||
}
|
}
|
||||||
|
FALLTHROUGH;
|
||||||
/*FALLTHRU*/
|
/*FALLTHRU*/
|
||||||
default:
|
default:
|
||||||
config_error_add("Unknown %s parameter '%s'",
|
config_error_add("Unknown %s parameter '%s'",
|
||||||
|
|||||||
@@ -765,6 +765,7 @@ lookat(coordxy x, coordxy y, char *buf, char *monbuf)
|
|||||||
Strcpy(buf, "stone");
|
Strcpy(buf, "stone");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
FALLTHROUGH;
|
||||||
/*FALLTHRU*/
|
/*FALLTHRU*/
|
||||||
default:
|
default:
|
||||||
Strcpy(buf, defsyms[symidx].explanation);
|
Strcpy(buf, defsyms[symidx].explanation);
|
||||||
|
|||||||
@@ -870,6 +870,7 @@ pickup(int what) /* should be a long */
|
|||||||
lcount = (long) yn_number;
|
lcount = (long) yn_number;
|
||||||
if (lcount > obj->quan)
|
if (lcount > obj->quan)
|
||||||
lcount = obj->quan;
|
lcount = obj->quan;
|
||||||
|
FALLTHROUGH;
|
||||||
/*FALLTHRU*/
|
/*FALLTHRU*/
|
||||||
default: /* 'y' */
|
default: /* 'y' */
|
||||||
break;
|
break;
|
||||||
@@ -1478,6 +1479,7 @@ query_category(
|
|||||||
/* assert( n == 1 ); */
|
/* assert( n == 1 ); */
|
||||||
break; /* from switch */
|
break; /* from switch */
|
||||||
}
|
}
|
||||||
|
FALLTHROUGH;
|
||||||
/*FALLTHRU*/
|
/*FALLTHRU*/
|
||||||
case 'q':
|
case 'q':
|
||||||
default:
|
default:
|
||||||
|
|||||||
@@ -1450,6 +1450,7 @@ dospit(void)
|
|||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
impossible("bad attack type in dospit");
|
impossible("bad attack type in dospit");
|
||||||
|
FALLTHROUGH;
|
||||||
/*FALLTHRU*/
|
/*FALLTHRU*/
|
||||||
case AD_ACID:
|
case AD_ACID:
|
||||||
otmp = mksobj(ACID_VENOM, TRUE, FALSE);
|
otmp = mksobj(ACID_VENOM, TRUE, FALSE);
|
||||||
|
|||||||
@@ -1721,16 +1721,19 @@ potionhit(struct monst *mon, struct obj *obj, int how)
|
|||||||
switch (obj->otyp) {
|
switch (obj->otyp) {
|
||||||
case POT_FULL_HEALING:
|
case POT_FULL_HEALING:
|
||||||
cureblind = TRUE;
|
cureblind = TRUE;
|
||||||
|
FALLTHROUGH;
|
||||||
/*FALLTHRU*/
|
/*FALLTHRU*/
|
||||||
case POT_EXTRA_HEALING:
|
case POT_EXTRA_HEALING:
|
||||||
if (!obj->cursed)
|
if (!obj->cursed)
|
||||||
cureblind = TRUE;
|
cureblind = TRUE;
|
||||||
|
FALLTHROUGH;
|
||||||
/*FALLTHRU*/
|
/*FALLTHRU*/
|
||||||
case POT_HEALING:
|
case POT_HEALING:
|
||||||
if (obj->blessed)
|
if (obj->blessed)
|
||||||
cureblind = TRUE;
|
cureblind = TRUE;
|
||||||
if (mon->data == &mons[PM_PESTILENCE])
|
if (mon->data == &mons[PM_PESTILENCE])
|
||||||
goto do_illness;
|
goto do_illness;
|
||||||
|
FALLTHROUGH;
|
||||||
/*FALLTHRU*/
|
/*FALLTHRU*/
|
||||||
case POT_RESTORE_ABILITY:
|
case POT_RESTORE_ABILITY:
|
||||||
case POT_GAIN_ABILITY:
|
case POT_GAIN_ABILITY:
|
||||||
@@ -1960,6 +1963,7 @@ potionbreathe(struct obj *obj)
|
|||||||
if (u.uhp < u.uhpmax)
|
if (u.uhp < u.uhpmax)
|
||||||
u.uhp++, disp.botl = TRUE;
|
u.uhp++, disp.botl = TRUE;
|
||||||
cureblind = TRUE;
|
cureblind = TRUE;
|
||||||
|
FALLTHROUGH;
|
||||||
/*FALLTHRU*/
|
/*FALLTHRU*/
|
||||||
case POT_EXTRA_HEALING:
|
case POT_EXTRA_HEALING:
|
||||||
if (Upolyd && u.mh < u.mhmax)
|
if (Upolyd && u.mh < u.mhmax)
|
||||||
@@ -1968,6 +1972,7 @@ potionbreathe(struct obj *obj)
|
|||||||
u.uhp++, disp.botl = TRUE;
|
u.uhp++, disp.botl = TRUE;
|
||||||
if (!obj->cursed)
|
if (!obj->cursed)
|
||||||
cureblind = TRUE;
|
cureblind = TRUE;
|
||||||
|
FALLTHROUGH;
|
||||||
/*FALLTHRU*/
|
/*FALLTHRU*/
|
||||||
case POT_HEALING:
|
case POT_HEALING:
|
||||||
if (Upolyd && u.mh < u.mhmax)
|
if (Upolyd && u.mh < u.mhmax)
|
||||||
@@ -2116,6 +2121,7 @@ mixtype(struct obj *o1, struct obj *o2)
|
|||||||
case POT_HEALING:
|
case POT_HEALING:
|
||||||
if (o2typ == POT_SPEED)
|
if (o2typ == POT_SPEED)
|
||||||
return POT_EXTRA_HEALING;
|
return POT_EXTRA_HEALING;
|
||||||
|
FALLTHROUGH;
|
||||||
/*FALLTHRU*/
|
/*FALLTHRU*/
|
||||||
case POT_EXTRA_HEALING:
|
case POT_EXTRA_HEALING:
|
||||||
case POT_FULL_HEALING:
|
case POT_FULL_HEALING:
|
||||||
@@ -2123,6 +2129,7 @@ mixtype(struct obj *o1, struct obj *o2)
|
|||||||
return (o1typ == POT_HEALING) ? POT_EXTRA_HEALING
|
return (o1typ == POT_HEALING) ? POT_EXTRA_HEALING
|
||||||
: (o1typ == POT_EXTRA_HEALING) ? POT_FULL_HEALING
|
: (o1typ == POT_EXTRA_HEALING) ? POT_FULL_HEALING
|
||||||
: POT_GAIN_ABILITY;
|
: POT_GAIN_ABILITY;
|
||||||
|
FALLTHROUGH;
|
||||||
/*FALLTHRU*/
|
/*FALLTHRU*/
|
||||||
case UNICORN_HORN:
|
case UNICORN_HORN:
|
||||||
switch (o2typ) {
|
switch (o2typ) {
|
||||||
|
|||||||
+17
-3
@@ -403,7 +403,8 @@ fix_worst_trouble(int trouble)
|
|||||||
break;
|
break;
|
||||||
case TROUBLE_STARVING:
|
case TROUBLE_STARVING:
|
||||||
/* temporarily lost strength recovery now handled by init_uhunger() */
|
/* temporarily lost strength recovery now handled by init_uhunger() */
|
||||||
/*FALLTHRU*/
|
FALLTHROUGH;
|
||||||
|
/* FALLTHRU*/
|
||||||
case TROUBLE_HUNGRY:
|
case TROUBLE_HUNGRY:
|
||||||
Your("%s feels content.", body_part(STOMACH));
|
Your("%s feels content.", body_part(STOMACH));
|
||||||
init_uhunger();
|
init_uhunger();
|
||||||
@@ -745,7 +746,9 @@ angrygods(aligntyp resp_god)
|
|||||||
gods_angry(resp_god);
|
gods_angry(resp_god);
|
||||||
punish((struct obj *) 0);
|
punish((struct obj *) 0);
|
||||||
break;
|
break;
|
||||||
} /* else fall thru */
|
}
|
||||||
|
FALLTHROUGH;
|
||||||
|
/* FALLTHRU */
|
||||||
case 4:
|
case 4:
|
||||||
case 5:
|
case 5:
|
||||||
gods_angry(resp_god);
|
gods_angry(resp_god);
|
||||||
@@ -1127,6 +1130,7 @@ pleased(aligntyp g_align)
|
|||||||
switch (min(action, 5)) {
|
switch (min(action, 5)) {
|
||||||
case 5:
|
case 5:
|
||||||
pat_on_head = 1;
|
pat_on_head = 1;
|
||||||
|
FALLTHROUGH;
|
||||||
/*FALLTHRU*/
|
/*FALLTHRU*/
|
||||||
case 4:
|
case 4:
|
||||||
do
|
do
|
||||||
@@ -1137,8 +1141,9 @@ pleased(aligntyp g_align)
|
|||||||
case 3:
|
case 3:
|
||||||
/* up to 10 troubles */
|
/* up to 10 troubles */
|
||||||
fix_worst_trouble(trouble);
|
fix_worst_trouble(trouble);
|
||||||
|
FALLTHROUGH;
|
||||||
/*FALLTHRU*/
|
/*FALLTHRU*/
|
||||||
case 2:
|
case 2:
|
||||||
/* up to 9 troubles */
|
/* up to 9 troubles */
|
||||||
while ((trouble = in_trouble()) > 0 && (++tryct < 10))
|
while ((trouble = in_trouble()) > 0 && (++tryct < 10))
|
||||||
fix_worst_trouble(trouble);
|
fix_worst_trouble(trouble);
|
||||||
@@ -1234,6 +1239,7 @@ pleased(aligntyp g_align)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
FALLTHROUGH;
|
||||||
/*FALLTHRU*/
|
/*FALLTHRU*/
|
||||||
case 2:
|
case 2:
|
||||||
if (!Blind)
|
if (!Blind)
|
||||||
@@ -1335,6 +1341,7 @@ pleased(aligntyp g_align)
|
|||||||
gcrownu();
|
gcrownu();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
FALLTHROUGH;
|
||||||
/*FALLTHRU*/
|
/*FALLTHRU*/
|
||||||
case 6:
|
case 6:
|
||||||
give_spell();
|
give_spell();
|
||||||
@@ -2335,18 +2342,23 @@ maybe_turn_mon_iter(struct monst *mtmp)
|
|||||||
than zombies. */
|
than zombies. */
|
||||||
case S_LICH:
|
case S_LICH:
|
||||||
xlev += 2;
|
xlev += 2;
|
||||||
|
FALLTHROUGH;
|
||||||
/*FALLTHRU*/
|
/*FALLTHRU*/
|
||||||
case S_GHOST:
|
case S_GHOST:
|
||||||
xlev += 2;
|
xlev += 2;
|
||||||
|
FALLTHROUGH;
|
||||||
/*FALLTHRU*/
|
/*FALLTHRU*/
|
||||||
case S_VAMPIRE:
|
case S_VAMPIRE:
|
||||||
xlev += 2;
|
xlev += 2;
|
||||||
|
FALLTHROUGH;
|
||||||
/*FALLTHRU*/
|
/*FALLTHRU*/
|
||||||
case S_WRAITH:
|
case S_WRAITH:
|
||||||
xlev += 2;
|
xlev += 2;
|
||||||
|
FALLTHROUGH;
|
||||||
/*FALLTHRU*/
|
/*FALLTHRU*/
|
||||||
case S_MUMMY:
|
case S_MUMMY:
|
||||||
xlev += 2;
|
xlev += 2;
|
||||||
|
FALLTHROUGH;
|
||||||
/*FALLTHRU*/
|
/*FALLTHRU*/
|
||||||
case S_ZOMBIE:
|
case S_ZOMBIE:
|
||||||
if (u.ulevel >= xlev && !resist(mtmp, '\0', 0, NOTELL)) {
|
if (u.ulevel >= xlev && !resist(mtmp, '\0', 0, NOTELL)) {
|
||||||
@@ -2358,6 +2370,7 @@ maybe_turn_mon_iter(struct monst *mtmp)
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
} /* else flee */
|
} /* else flee */
|
||||||
|
FALLTHROUGH;
|
||||||
/*FALLTHRU*/
|
/*FALLTHRU*/
|
||||||
default:
|
default:
|
||||||
monflee(mtmp, 0, FALSE, TRUE);
|
monflee(mtmp, 0, FALSE, TRUE);
|
||||||
@@ -2656,6 +2669,7 @@ blocked_boulder(int dx, int dy)
|
|||||||
/* this is only approximate since multiple boulders might sink */
|
/* this is only approximate since multiple boulders might sink */
|
||||||
if (is_pool_or_lava(nx, ny)) /* does its own isok() check */
|
if (is_pool_or_lava(nx, ny)) /* does its own isok() check */
|
||||||
break; /* still need Sokoban check below */
|
break; /* still need Sokoban check below */
|
||||||
|
FALLTHROUGH;
|
||||||
/*FALLTHRU*/
|
/*FALLTHRU*/
|
||||||
default:
|
default:
|
||||||
/* more than one boulder--blocked after they push the top one;
|
/* more than one boulder--blocked after they push the top one;
|
||||||
|
|||||||
+5
-2
@@ -374,6 +374,7 @@ convert_line(char *in_line, char *out_line)
|
|||||||
/* pluralize */
|
/* pluralize */
|
||||||
case 'P':
|
case 'P':
|
||||||
gc.cvt_buf[0] = highc(gc.cvt_buf[0]);
|
gc.cvt_buf[0] = highc(gc.cvt_buf[0]);
|
||||||
|
FALLTHROUGH;
|
||||||
/*FALLTHRU*/
|
/*FALLTHRU*/
|
||||||
case 'p':
|
case 'p':
|
||||||
Strcpy(gc.cvt_buf, makeplural(gc.cvt_buf));
|
Strcpy(gc.cvt_buf, makeplural(gc.cvt_buf));
|
||||||
@@ -382,6 +383,7 @@ convert_line(char *in_line, char *out_line)
|
|||||||
/* append possessive suffix */
|
/* append possessive suffix */
|
||||||
case 'S':
|
case 'S':
|
||||||
gc.cvt_buf[0] = highc(gc.cvt_buf[0]);
|
gc.cvt_buf[0] = highc(gc.cvt_buf[0]);
|
||||||
|
FALLTHROUGH;
|
||||||
/*FALLTHRU*/
|
/*FALLTHRU*/
|
||||||
case 's':
|
case 's':
|
||||||
Strcpy(gc.cvt_buf, s_suffix(gc.cvt_buf));
|
Strcpy(gc.cvt_buf, s_suffix(gc.cvt_buf));
|
||||||
@@ -403,8 +405,9 @@ convert_line(char *in_line, char *out_line)
|
|||||||
Strcat(cc, gc.cvt_buf);
|
Strcat(cc, gc.cvt_buf);
|
||||||
cc += strlen(gc.cvt_buf);
|
cc += strlen(gc.cvt_buf);
|
||||||
break;
|
break;
|
||||||
} /* else fall through */
|
}
|
||||||
|
FALLTHROUGH;
|
||||||
|
/* FALLTHRU */
|
||||||
default:
|
default:
|
||||||
*cc++ = *c;
|
*cc++ = *c;
|
||||||
break;
|
break;
|
||||||
|
|||||||
@@ -1357,6 +1357,7 @@ clearrolefilter(int which)
|
|||||||
switch (which) {
|
switch (which) {
|
||||||
case RS_filter:
|
case RS_filter:
|
||||||
gr.rfilter.mask = 0; /* clear race, gender, and alignment filters */
|
gr.rfilter.mask = 0; /* clear race, gender, and alignment filters */
|
||||||
|
FALLTHROUGH;
|
||||||
/*FALLTHRU*/
|
/*FALLTHRU*/
|
||||||
case RS_ROLE:
|
case RS_ROLE:
|
||||||
for (i = 0; i < SIZE(roles) - 1; ++i)
|
for (i = 0; i < SIZE(roles) - 1; ++i)
|
||||||
|
|||||||
@@ -563,6 +563,7 @@ outrumor(
|
|||||||
return;
|
return;
|
||||||
case BY_COOKIE:
|
case BY_COOKIE:
|
||||||
pline(fortune_msg);
|
pline(fortune_msg);
|
||||||
|
FALLTHROUGH;
|
||||||
/* FALLTHRU */
|
/* FALLTHRU */
|
||||||
case BY_PAPER:
|
case BY_PAPER:
|
||||||
pline("It reads:");
|
pline("It reads:");
|
||||||
|
|||||||
@@ -582,6 +582,7 @@ selection_do_gradient(
|
|||||||
switch (gtyp) {
|
switch (gtyp) {
|
||||||
default:
|
default:
|
||||||
impossible("Unrecognized gradient type! Defaulting to radial...");
|
impossible("Unrecognized gradient type! Defaulting to radial...");
|
||||||
|
FALLTHROUGH;
|
||||||
/* FALLTHRU */
|
/* FALLTHRU */
|
||||||
case SEL_GRADIENT_RADIAL: {
|
case SEL_GRADIENT_RADIAL: {
|
||||||
for (dx = 0; dx < COLNO; dx++)
|
for (dx = 0; dx < COLNO; dx++)
|
||||||
|
|||||||
@@ -4068,6 +4068,7 @@ sellobj(
|
|||||||
switch (gs.sell_response ? gs.sell_response : nyaq(qbuf)) {
|
switch (gs.sell_response ? gs.sell_response : nyaq(qbuf)) {
|
||||||
case 'q':
|
case 'q':
|
||||||
gs.sell_response = 'n';
|
gs.sell_response = 'n';
|
||||||
|
FALLTHROUGH;
|
||||||
/*FALLTHRU*/
|
/*FALLTHRU*/
|
||||||
case 'n':
|
case 'n':
|
||||||
if (container)
|
if (container)
|
||||||
@@ -4078,6 +4079,7 @@ sellobj(
|
|||||||
break;
|
break;
|
||||||
case 'a':
|
case 'a':
|
||||||
gs.sell_response = 'y';
|
gs.sell_response = 'y';
|
||||||
|
FALLTHROUGH;
|
||||||
/*FALLTHRU*/
|
/*FALLTHRU*/
|
||||||
case 'y':
|
case 'y':
|
||||||
if (container)
|
if (container)
|
||||||
|
|||||||
@@ -158,6 +158,7 @@ throne_sit_effect(void)
|
|||||||
default:
|
default:
|
||||||
case 2: /* more than 1 eye */
|
case 2: /* more than 1 eye */
|
||||||
eye = makeplural(eye);
|
eye = makeplural(eye);
|
||||||
|
FALLTHROUGH;
|
||||||
/*FALLTHRU*/
|
/*FALLTHRU*/
|
||||||
case 1: /* one eye (Cyclops, floating eye) */
|
case 1: /* one eye (Cyclops, floating eye) */
|
||||||
Your("%s %s...", eye, vtense(eye, "tingle"));
|
Your("%s %s...", eye, vtense(eye, "tingle"));
|
||||||
@@ -517,6 +518,7 @@ attrcurse(void)
|
|||||||
ret = FIRE_RES;
|
ret = FIRE_RES;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
FALLTHROUGH;
|
||||||
/*FALLTHRU*/
|
/*FALLTHRU*/
|
||||||
case 2:
|
case 2:
|
||||||
if (HTeleportation & INTRINSIC) {
|
if (HTeleportation & INTRINSIC) {
|
||||||
@@ -525,6 +527,7 @@ attrcurse(void)
|
|||||||
ret = TELEPORT;
|
ret = TELEPORT;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
FALLTHROUGH;
|
||||||
/*FALLTHRU*/
|
/*FALLTHRU*/
|
||||||
case 3:
|
case 3:
|
||||||
if (HPoison_resistance & INTRINSIC) {
|
if (HPoison_resistance & INTRINSIC) {
|
||||||
@@ -533,6 +536,7 @@ attrcurse(void)
|
|||||||
ret = POISON_RES;
|
ret = POISON_RES;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
FALLTHROUGH;
|
||||||
/*FALLTHRU*/
|
/*FALLTHRU*/
|
||||||
case 4:
|
case 4:
|
||||||
if (HTelepat & INTRINSIC) {
|
if (HTelepat & INTRINSIC) {
|
||||||
@@ -543,6 +547,7 @@ attrcurse(void)
|
|||||||
ret = TELEPAT;
|
ret = TELEPAT;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
FALLTHROUGH;
|
||||||
/*FALLTHRU*/
|
/*FALLTHRU*/
|
||||||
case 5:
|
case 5:
|
||||||
if (HCold_resistance & INTRINSIC) {
|
if (HCold_resistance & INTRINSIC) {
|
||||||
@@ -551,6 +556,7 @@ attrcurse(void)
|
|||||||
ret = COLD_RES;
|
ret = COLD_RES;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
FALLTHROUGH;
|
||||||
/*FALLTHRU*/
|
/*FALLTHRU*/
|
||||||
case 6:
|
case 6:
|
||||||
if (HInvis & INTRINSIC) {
|
if (HInvis & INTRINSIC) {
|
||||||
@@ -559,6 +565,7 @@ attrcurse(void)
|
|||||||
ret = INVIS;
|
ret = INVIS;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
FALLTHROUGH;
|
||||||
/*FALLTHRU*/
|
/*FALLTHRU*/
|
||||||
case 7:
|
case 7:
|
||||||
if (HSee_invisible & INTRINSIC) {
|
if (HSee_invisible & INTRINSIC) {
|
||||||
@@ -574,6 +581,7 @@ attrcurse(void)
|
|||||||
ret = SEE_INVIS;
|
ret = SEE_INVIS;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
FALLTHROUGH;
|
||||||
/*FALLTHRU*/
|
/*FALLTHRU*/
|
||||||
case 8:
|
case 8:
|
||||||
if (HFast & INTRINSIC) {
|
if (HFast & INTRINSIC) {
|
||||||
@@ -582,6 +590,7 @@ attrcurse(void)
|
|||||||
ret = FAST;
|
ret = FAST;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
FALLTHROUGH;
|
||||||
/*FALLTHRU*/
|
/*FALLTHRU*/
|
||||||
case 9:
|
case 9:
|
||||||
if (HStealth & INTRINSIC) {
|
if (HStealth & INTRINSIC) {
|
||||||
@@ -590,6 +599,7 @@ attrcurse(void)
|
|||||||
ret = STEALTH;
|
ret = STEALTH;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
FALLTHROUGH;
|
||||||
/*FALLTHRU*/
|
/*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 */
|
||||||
@@ -599,6 +609,7 @@ attrcurse(void)
|
|||||||
ret = PROTECTION;
|
ret = PROTECTION;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
FALLTHROUGH;
|
||||||
/*FALLTHRU*/
|
/*FALLTHRU*/
|
||||||
case 11:
|
case 11:
|
||||||
if (HAggravate_monster & INTRINSIC) {
|
if (HAggravate_monster & INTRINSIC) {
|
||||||
@@ -607,6 +618,7 @@ attrcurse(void)
|
|||||||
ret = AGGRAVATE_MONSTER;
|
ret = AGGRAVATE_MONSTER;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
FALLTHROUGH;
|
||||||
/*FALLTHRU*/
|
/*FALLTHRU*/
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
|
|||||||
+5
-2
@@ -264,6 +264,7 @@ dosounds(void)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
FALLTHROUGH;
|
||||||
/*FALLTHRU*/
|
/*FALLTHRU*/
|
||||||
case 0:
|
case 0:
|
||||||
Soundeffect(se_guards_footsteps, 30);
|
Soundeffect(se_guards_footsteps, 30);
|
||||||
@@ -631,7 +632,6 @@ cry_sound(struct monst *mtmp)
|
|||||||
ret = "hiss";
|
ret = "hiss";
|
||||||
break;
|
break;
|
||||||
case MS_ROAR: /* baby dragons; have them growl instead of roar */
|
case MS_ROAR: /* baby dragons; have them growl instead of roar */
|
||||||
/*FALLTHRU*/
|
|
||||||
case MS_GROWL: /* (none) */
|
case MS_GROWL: /* (none) */
|
||||||
ret = "growl";
|
ret = "growl";
|
||||||
break;
|
break;
|
||||||
@@ -870,6 +870,7 @@ domonnoise(struct monst *mtmp)
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
FALLTHROUGH;
|
||||||
/*FALLTHRU*/
|
/*FALLTHRU*/
|
||||||
case MS_GROWL:
|
case MS_GROWL:
|
||||||
Soundeffect((mtmp->mpeaceful ? se_snarl : se_growl), 80);
|
Soundeffect((mtmp->mpeaceful ? se_snarl : se_growl), 80);
|
||||||
@@ -1019,6 +1020,7 @@ domonnoise(struct monst *mtmp)
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
FALLTHROUGH;
|
||||||
/*FALLTHRU*/
|
/*FALLTHRU*/
|
||||||
case MS_HUMANOID:
|
case MS_HUMANOID:
|
||||||
if (!mtmp->mpeaceful) {
|
if (!mtmp->mpeaceful) {
|
||||||
@@ -1141,7 +1143,8 @@ domonnoise(struct monst *mtmp)
|
|||||||
(void) demon_talk(mtmp);
|
(void) demon_talk(mtmp);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
/* fall through */
|
FALLTHROUGH;
|
||||||
|
/* FALLTHRU */
|
||||||
case MS_CUSS:
|
case MS_CUSS:
|
||||||
if (!mtmp->mpeaceful)
|
if (!mtmp->mpeaceful)
|
||||||
cuss(mtmp);
|
cuss(mtmp);
|
||||||
|
|||||||
@@ -1441,11 +1441,13 @@ spelleffects(int spell_otyp, boolean atme, boolean force)
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
} /* else */
|
} /* else */
|
||||||
|
FALLTHROUGH;
|
||||||
/*FALLTHRU*/
|
/*FALLTHRU*/
|
||||||
|
|
||||||
/* these spells are all duplicates of wand effects */
|
/* these spells are all duplicates of wand effects */
|
||||||
case SPE_FORCE_BOLT:
|
case SPE_FORCE_BOLT:
|
||||||
physical_damage = TRUE;
|
physical_damage = TRUE;
|
||||||
|
FALLTHROUGH;
|
||||||
/*FALLTHRU*/
|
/*FALLTHRU*/
|
||||||
case SPE_SLEEP:
|
case SPE_SLEEP:
|
||||||
case SPE_MAGIC_MISSILE:
|
case SPE_MAGIC_MISSILE:
|
||||||
@@ -1510,6 +1512,7 @@ spelleffects(int spell_otyp, boolean atme, boolean force)
|
|||||||
/* high skill yields effect equivalent to blessed scroll */
|
/* high skill yields effect equivalent to blessed scroll */
|
||||||
if (role_skill >= P_SKILLED)
|
if (role_skill >= P_SKILLED)
|
||||||
pseudo->blessed = 1;
|
pseudo->blessed = 1;
|
||||||
|
FALLTHROUGH;
|
||||||
/*FALLTHRU*/
|
/*FALLTHRU*/
|
||||||
case SPE_CHARM_MONSTER:
|
case SPE_CHARM_MONSTER:
|
||||||
case SPE_MAGIC_MAPPING:
|
case SPE_MAGIC_MAPPING:
|
||||||
@@ -1526,6 +1529,7 @@ spelleffects(int spell_otyp, boolean atme, boolean force)
|
|||||||
/* high skill yields effect equivalent to blessed potion */
|
/* high skill yields effect equivalent to blessed potion */
|
||||||
if (role_skill >= P_SKILLED)
|
if (role_skill >= P_SKILLED)
|
||||||
pseudo->blessed = 1;
|
pseudo->blessed = 1;
|
||||||
|
FALLTHROUGH;
|
||||||
/*FALLTHRU*/
|
/*FALLTHRU*/
|
||||||
case SPE_INVISIBILITY:
|
case SPE_INVISIBILITY:
|
||||||
(void) peffects(pseudo);
|
(void) peffects(pseudo);
|
||||||
|
|||||||
@@ -589,6 +589,7 @@ dismount_steed(
|
|||||||
switch (reason) {
|
switch (reason) {
|
||||||
case DISMOUNT_THROWN:
|
case DISMOUNT_THROWN:
|
||||||
verb = "are thrown";
|
verb = "are thrown";
|
||||||
|
FALLTHROUGH;
|
||||||
/*FALLTHRU*/
|
/*FALLTHRU*/
|
||||||
case DISMOUNT_KNOCKED:
|
case DISMOUNT_KNOCKED:
|
||||||
case DISMOUNT_FELL:
|
case DISMOUNT_FELL:
|
||||||
|
|||||||
@@ -214,6 +214,7 @@ vomiting_dialogue(void)
|
|||||||
make_stunned((HStun & TIMEOUT) + (long) d(2, 4), FALSE);
|
make_stunned((HStun & TIMEOUT) + (long) d(2, 4), FALSE);
|
||||||
if (!Popeye(VOMITING))
|
if (!Popeye(VOMITING))
|
||||||
stop_occupation();
|
stop_occupation();
|
||||||
|
FALLTHROUGH;
|
||||||
/*FALLTHRU*/
|
/*FALLTHRU*/
|
||||||
case 9:
|
case 9:
|
||||||
make_confused((HConfusion & TIMEOUT) + (long) d(2, 4), FALSE);
|
make_confused((HConfusion & TIMEOUT) + (long) d(2, 4), FALSE);
|
||||||
@@ -1441,6 +1442,7 @@ burn_object(anything *arg, long timeout)
|
|||||||
switch (obj->where) {
|
switch (obj->where) {
|
||||||
case OBJ_INVENT:
|
case OBJ_INVENT:
|
||||||
need_invupdate = TRUE;
|
need_invupdate = TRUE;
|
||||||
|
FALLTHROUGH;
|
||||||
/*FALLTHRU*/
|
/*FALLTHRU*/
|
||||||
case OBJ_MINVENT:
|
case OBJ_MINVENT:
|
||||||
pline("%spotion of oil has burnt away.", whose);
|
pline("%spotion of oil has burnt away.", whose);
|
||||||
@@ -1504,6 +1506,7 @@ burn_object(anything *arg, long timeout)
|
|||||||
switch (obj->where) {
|
switch (obj->where) {
|
||||||
case OBJ_INVENT:
|
case OBJ_INVENT:
|
||||||
need_invupdate = TRUE;
|
need_invupdate = TRUE;
|
||||||
|
FALLTHROUGH;
|
||||||
/*FALLTHRU*/
|
/*FALLTHRU*/
|
||||||
case OBJ_MINVENT:
|
case OBJ_MINVENT:
|
||||||
if (obj->otyp == BRASS_LANTERN)
|
if (obj->otyp == BRASS_LANTERN)
|
||||||
@@ -1583,6 +1586,7 @@ burn_object(anything *arg, long timeout)
|
|||||||
switch (obj->where) {
|
switch (obj->where) {
|
||||||
case OBJ_INVENT:
|
case OBJ_INVENT:
|
||||||
need_invupdate = TRUE;
|
need_invupdate = TRUE;
|
||||||
|
FALLTHROUGH;
|
||||||
/*FALLTHRU*/
|
/*FALLTHRU*/
|
||||||
case OBJ_MINVENT:
|
case OBJ_MINVENT:
|
||||||
pline("%scandelabrum's flame%s.", whose,
|
pline("%scandelabrum's flame%s.", whose,
|
||||||
@@ -1598,6 +1602,7 @@ burn_object(anything *arg, long timeout)
|
|||||||
case OBJ_INVENT:
|
case OBJ_INVENT:
|
||||||
/* no need_invupdate for update_inventory() necessary;
|
/* no need_invupdate for update_inventory() necessary;
|
||||||
useupall() -> freeinv() handles it */
|
useupall() -> freeinv() handles it */
|
||||||
|
FALLTHROUGH;
|
||||||
/*FALLTHRU*/
|
/*FALLTHRU*/
|
||||||
case OBJ_MINVENT:
|
case OBJ_MINVENT:
|
||||||
pline("%s %s consumed!", Yname2(obj),
|
pline("%s %s consumed!", Yname2(obj),
|
||||||
|
|||||||
@@ -110,11 +110,13 @@ formatkiller(
|
|||||||
switch (svk.killer.format) {
|
switch (svk.killer.format) {
|
||||||
default:
|
default:
|
||||||
impossible("bad killer format? (%d)", svk.killer.format);
|
impossible("bad killer format? (%d)", svk.killer.format);
|
||||||
|
FALLTHROUGH;
|
||||||
/*FALLTHRU*/
|
/*FALLTHRU*/
|
||||||
case NO_KILLER_PREFIX:
|
case NO_KILLER_PREFIX:
|
||||||
break;
|
break;
|
||||||
case KILLED_BY_AN:
|
case KILLED_BY_AN:
|
||||||
kname = an(kname);
|
kname = an(kname);
|
||||||
|
FALLTHROUGH;
|
||||||
/*FALLTHRU*/
|
/*FALLTHRU*/
|
||||||
case KILLED_BY:
|
case KILLED_BY:
|
||||||
(void) strncat(buf, killed_by_prefix[how], siz - 1);
|
(void) strncat(buf, killed_by_prefix[how], siz - 1);
|
||||||
|
|||||||
+11
@@ -513,6 +513,7 @@ maketrap(coordxy x, coordxy y, int typ)
|
|||||||
case PIT:
|
case PIT:
|
||||||
case SPIKED_PIT:
|
case SPIKED_PIT:
|
||||||
ttmp->conjoined = 0;
|
ttmp->conjoined = 0;
|
||||||
|
FALLTHROUGH;
|
||||||
/*FALLTHRU*/
|
/*FALLTHRU*/
|
||||||
case HOLE:
|
case HOLE:
|
||||||
case TRAPDOOR:
|
case TRAPDOOR:
|
||||||
@@ -1126,10 +1127,13 @@ m_harmless_trap(struct monst *mtmp, struct trap *ttmp)
|
|||||||
return TRUE;
|
return TRUE;
|
||||||
break;
|
break;
|
||||||
case PIT:
|
case PIT:
|
||||||
|
FALLTHROUGH;
|
||||||
/*FALLTHRU*/
|
/*FALLTHRU*/
|
||||||
case SPIKED_PIT:
|
case SPIKED_PIT:
|
||||||
|
FALLTHROUGH;
|
||||||
/*FALLTHRU*/
|
/*FALLTHRU*/
|
||||||
case HOLE:
|
case HOLE:
|
||||||
|
FALLTHROUGH;
|
||||||
/*FALLTHRU*/
|
/*FALLTHRU*/
|
||||||
case TRAPDOOR:
|
case TRAPDOOR:
|
||||||
if (is_clinger(mdat) && !Sokoban)
|
if (is_clinger(mdat) && !Sokoban)
|
||||||
@@ -2190,6 +2194,7 @@ trapeffect_web(
|
|||||||
mtmp->mtrapped = 1;
|
mtmp->mtrapped = 1;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
FALLTHROUGH;
|
||||||
/*FALLTHRU*/
|
/*FALLTHRU*/
|
||||||
default:
|
default:
|
||||||
if (mptr->mlet == S_GIANT
|
if (mptr->mlet == S_GIANT
|
||||||
@@ -2721,6 +2726,7 @@ immune_to_trap(struct monst *mon, unsigned ttype)
|
|||||||
if (pm->msize <= MZ_SMALL
|
if (pm->msize <= MZ_SMALL
|
||||||
|| amorphous(pm) || is_whirly(pm) || unsolid(pm))
|
|| amorphous(pm) || is_whirly(pm) || unsolid(pm))
|
||||||
return TRAP_CLEARLY_IMMUNE;
|
return TRAP_CLEARLY_IMMUNE;
|
||||||
|
FALLTHROUGH;
|
||||||
/*FALLTHRU*/
|
/*FALLTHRU*/
|
||||||
case SQKY_BOARD:
|
case SQKY_BOARD:
|
||||||
case LANDMINE:
|
case LANDMINE:
|
||||||
@@ -2809,6 +2815,7 @@ immune_to_trap(struct monst *mon, unsigned ttype)
|
|||||||
for monsters, only replicates fire trap, so fall through */
|
for monsters, only replicates fire trap, so fall through */
|
||||||
if (is_you)
|
if (is_you)
|
||||||
return TRAP_NOT_IMMUNE;
|
return TRAP_NOT_IMMUNE;
|
||||||
|
FALLTHROUGH;
|
||||||
/*FALLTHRU*/
|
/*FALLTHRU*/
|
||||||
case FIRE_TRAP: /* can always destroy items being carried */
|
case FIRE_TRAP: /* can always destroy items being carried */
|
||||||
/* harmful if not resistant or if carrying anything that could burn */
|
/* harmful if not resistant or if carrying anything that could burn */
|
||||||
@@ -3244,10 +3251,12 @@ launch_obj(
|
|||||||
/* use otrapped as a flag to ohitmon */
|
/* use otrapped as a flag to ohitmon */
|
||||||
singleobj->otrapped = 1;
|
singleobj->otrapped = 1;
|
||||||
style &= ~LAUNCH_KNOWN;
|
style &= ~LAUNCH_KNOWN;
|
||||||
|
FALLTHROUGH;
|
||||||
/*FALLTHRU*/
|
/*FALLTHRU*/
|
||||||
case ROLL:
|
case ROLL:
|
||||||
roll:
|
roll:
|
||||||
delaycnt = 2;
|
delaycnt = 2;
|
||||||
|
FALLTHROUGH;
|
||||||
/*FALLTHRU*/
|
/*FALLTHRU*/
|
||||||
default:
|
default:
|
||||||
if (!delaycnt)
|
if (!delaycnt)
|
||||||
@@ -3352,6 +3361,7 @@ launch_obj(
|
|||||||
/* if trap doesn't work, skip "disappears" message */
|
/* if trap doesn't work, skip "disappears" message */
|
||||||
if (newlev == depth(&u.uz))
|
if (newlev == depth(&u.uz))
|
||||||
break;
|
break;
|
||||||
|
FALLTHROUGH;
|
||||||
/*FALLTHRU*/
|
/*FALLTHRU*/
|
||||||
case TELEP_TRAP:
|
case TELEP_TRAP:
|
||||||
if (cansee(x, y))
|
if (cansee(x, y))
|
||||||
@@ -4050,6 +4060,7 @@ float_down(
|
|||||||
case TRAPDOOR:
|
case TRAPDOOR:
|
||||||
if (!Can_fall_thru(&u.uz) || u.ustuck)
|
if (!Can_fall_thru(&u.uz) || u.ustuck)
|
||||||
break;
|
break;
|
||||||
|
FALLTHROUGH;
|
||||||
/*FALLTHRU*/
|
/*FALLTHRU*/
|
||||||
default:
|
default:
|
||||||
if (!u.utrap) /* not already in the trap */
|
if (!u.utrap) /* not already in the trap */
|
||||||
|
|||||||
@@ -3772,6 +3772,7 @@ mhitm_ad_deth(
|
|||||||
mhm->damage = 0;
|
mhm->damage = 0;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
FALLTHROUGH;
|
||||||
/*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...");
|
||||||
@@ -5385,10 +5386,12 @@ hmonas(struct monst *mon)
|
|||||||
case AT_CLAW:
|
case AT_CLAW:
|
||||||
if (uwep && !cantwield(gy.youmonst.data) && !weapon_used)
|
if (uwep && !cantwield(gy.youmonst.data) && !weapon_used)
|
||||||
goto use_weapon;
|
goto use_weapon;
|
||||||
|
FALLTHROUGH;
|
||||||
/*FALLTHRU*/
|
/*FALLTHRU*/
|
||||||
case AT_TUCH:
|
case AT_TUCH:
|
||||||
if (uwep && gy.youmonst.data->mlet == S_LICH && !weapon_used)
|
if (uwep && gy.youmonst.data->mlet == S_LICH && !weapon_used)
|
||||||
goto use_weapon;
|
goto use_weapon;
|
||||||
|
FALLTHROUGH;
|
||||||
/*FALLTHRU*/
|
/*FALLTHRU*/
|
||||||
case AT_KICK:
|
case AT_KICK:
|
||||||
case AT_BITE:
|
case AT_BITE:
|
||||||
@@ -5632,6 +5635,7 @@ hmonas(struct monst *mon)
|
|||||||
|| gy.youmonst.data->mlet == S_ORC
|
|| gy.youmonst.data->mlet == S_ORC
|
||||||
|| gy.youmonst.data->mlet == S_GNOME) && !weapon_used)
|
|| gy.youmonst.data->mlet == S_GNOME) && !weapon_used)
|
||||||
goto use_weapon;
|
goto use_weapon;
|
||||||
|
FALLTHROUGH;
|
||||||
/*FALLTHRU*/
|
/*FALLTHRU*/
|
||||||
|
|
||||||
case AT_NONE:
|
case AT_NONE:
|
||||||
@@ -6016,6 +6020,8 @@ passive_obj(
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
FALLTHROUGH;
|
||||||
|
/* FALLTHRU */
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|||||||
+8
-3
@@ -1466,7 +1466,9 @@ weapon_hit_bonus(struct obj *weapon)
|
|||||||
} else if (type <= P_LAST_WEAPON) {
|
} else if (type <= P_LAST_WEAPON) {
|
||||||
switch (P_SKILL(type)) {
|
switch (P_SKILL(type)) {
|
||||||
default:
|
default:
|
||||||
impossible(bad_skill, P_SKILL(type)); /* fall through */
|
impossible(bad_skill, P_SKILL(type));
|
||||||
|
FALLTHROUGH;
|
||||||
|
/* FALLTHRU */
|
||||||
case P_ISRESTRICTED:
|
case P_ISRESTRICTED:
|
||||||
case P_UNSKILLED:
|
case P_UNSKILLED:
|
||||||
bonus = -4;
|
bonus = -4;
|
||||||
@@ -1487,7 +1489,9 @@ weapon_hit_bonus(struct obj *weapon)
|
|||||||
skill = P_SKILL(wep_type);
|
skill = P_SKILL(wep_type);
|
||||||
switch (skill) {
|
switch (skill) {
|
||||||
default:
|
default:
|
||||||
impossible(bad_skill, skill); /* fall through */
|
impossible(bad_skill, skill);
|
||||||
|
FALLTHROUGH;
|
||||||
|
/* FALLTHRU */
|
||||||
case P_ISRESTRICTED:
|
case P_ISRESTRICTED:
|
||||||
case P_UNSKILLED:
|
case P_UNSKILLED:
|
||||||
bonus = -9;
|
bonus = -9;
|
||||||
@@ -1561,7 +1565,8 @@ weapon_dam_bonus(struct obj *weapon)
|
|||||||
switch (P_SKILL(type)) {
|
switch (P_SKILL(type)) {
|
||||||
default:
|
default:
|
||||||
impossible("weapon_dam_bonus: bad skill %d", P_SKILL(type));
|
impossible("weapon_dam_bonus: bad skill %d", P_SKILL(type));
|
||||||
/* fall through */
|
FALLTHROUGH;
|
||||||
|
/* FALLTHRU */
|
||||||
case P_ISRESTRICTED:
|
case P_ISRESTRICTED:
|
||||||
case P_UNSKILLED:
|
case P_UNSKILLED:
|
||||||
bonus = -2;
|
bonus = -2;
|
||||||
|
|||||||
+3
-2
@@ -284,8 +284,8 @@ strategy(struct monst *mtmp)
|
|||||||
case 1: /* the wiz is less cautious */
|
case 1: /* the wiz is less cautious */
|
||||||
if (mtmp->data != &mons[PM_WIZARD_OF_YENDOR])
|
if (mtmp->data != &mons[PM_WIZARD_OF_YENDOR])
|
||||||
return (unsigned long) STRAT_HEAL;
|
return (unsigned long) STRAT_HEAL;
|
||||||
/* else fall through */
|
FALLTHROUGH;
|
||||||
|
/* FALLTHRU */
|
||||||
case 2:
|
case 2:
|
||||||
dstrat = STRAT_HEAL;
|
dstrat = STRAT_HEAL;
|
||||||
break;
|
break;
|
||||||
@@ -399,6 +399,7 @@ tactics(struct monst *mtmp)
|
|||||||
mtmp->mhp += rnd(8);
|
mtmp->mhp += rnd(8);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
FALLTHROUGH;
|
||||||
/*FALLTHRU*/
|
/*FALLTHRU*/
|
||||||
|
|
||||||
case STRAT_NONE: /* harass */
|
case STRAT_NONE: /* harass */
|
||||||
|
|||||||
@@ -1065,6 +1065,7 @@ wiz_intrinsic(void)
|
|||||||
so needs more than simple incr_itimeout() but we want
|
so needs more than simple incr_itimeout() but we want
|
||||||
the pline() issued with that */
|
the pline() issued with that */
|
||||||
make_glib((int) newtimeout);
|
make_glib((int) newtimeout);
|
||||||
|
FALLTHROUGH;
|
||||||
/*FALLTHRU*/
|
/*FALLTHRU*/
|
||||||
default:
|
default:
|
||||||
def_feedback:
|
def_feedback:
|
||||||
|
|||||||
@@ -177,6 +177,7 @@ bhitm(struct monst *mtmp, struct obj *otmp)
|
|||||||
switch (otyp) {
|
switch (otyp) {
|
||||||
case WAN_STRIKING:
|
case WAN_STRIKING:
|
||||||
zap_type_text = "wand";
|
zap_type_text = "wand";
|
||||||
|
FALLTHROUGH;
|
||||||
/*FALLTHRU*/
|
/*FALLTHRU*/
|
||||||
case SPE_FORCE_BOLT:
|
case SPE_FORCE_BOLT:
|
||||||
reveal_invis = TRUE;
|
reveal_invis = TRUE;
|
||||||
@@ -1096,6 +1097,7 @@ revive(struct obj *corpse, boolean by_hero)
|
|||||||
obfree(corpse, (struct obj *) 0);
|
obfree(corpse, (struct obj *) 0);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
FALLTHROUGH;
|
||||||
/*FALLTHRU*/
|
/*FALLTHRU*/
|
||||||
case OBJ_FREE:
|
case OBJ_FREE:
|
||||||
case OBJ_MIGRATING:
|
case OBJ_MIGRATING:
|
||||||
@@ -2056,6 +2058,7 @@ stone_to_flesh_obj(struct obj *obj) /* nonnull */
|
|||||||
smell = TRUE;
|
smell = TRUE;
|
||||||
break;
|
break;
|
||||||
case WEAPON_CLASS: /* crysknife */
|
case WEAPON_CLASS: /* crysknife */
|
||||||
|
FALLTHROUGH;
|
||||||
/*FALLTHRU*/
|
/*FALLTHRU*/
|
||||||
default:
|
default:
|
||||||
res = 0;
|
res = 0;
|
||||||
@@ -2869,6 +2872,7 @@ zapyourself(struct obj *obj, 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);
|
||||||
|
FALLTHROUGH;
|
||||||
/*FALLTHRU*/
|
/*FALLTHRU*/
|
||||||
case EXPENSIVE_CAMERA:
|
case EXPENSIVE_CAMERA:
|
||||||
if (!damage)
|
if (!damage)
|
||||||
@@ -3243,6 +3247,7 @@ zap_updown(struct obj *obj) /* wand or spell, nonnull */
|
|||||||
case WAN_STRIKING:
|
case WAN_STRIKING:
|
||||||
case SPE_FORCE_BOLT:
|
case SPE_FORCE_BOLT:
|
||||||
striking = TRUE;
|
striking = TRUE;
|
||||||
|
FALLTHROUGH;
|
||||||
/*FALLTHRU*/
|
/*FALLTHRU*/
|
||||||
case WAN_LOCKING:
|
case WAN_LOCKING:
|
||||||
case SPE_WIZARD_LOCK:
|
case SPE_WIZARD_LOCK:
|
||||||
@@ -4924,6 +4929,7 @@ dobuzz(
|
|||||||
switch (bounce) {
|
switch (bounce) {
|
||||||
case 0:
|
case 0:
|
||||||
dx = -dx;
|
dx = -dx;
|
||||||
|
FALLTHROUGH;
|
||||||
/*FALLTHRU*/
|
/*FALLTHRU*/
|
||||||
case 1:
|
case 1:
|
||||||
dy = -dy;
|
dy = -dy;
|
||||||
@@ -5256,6 +5262,7 @@ zap_over_floor(
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case ZT_LIGHTNING:
|
case ZT_LIGHTNING:
|
||||||
|
FALLTHROUGH;
|
||||||
/*FALLTHRU*/
|
/*FALLTHRU*/
|
||||||
case ZT_ACID:
|
case ZT_ACID:
|
||||||
if (lev->typ == IRONBARS) {
|
if (lev->typ == IRONBARS) {
|
||||||
|
|||||||
@@ -293,6 +293,7 @@ term_end_attr(int attr)
|
|||||||
switch (attr) {
|
switch (attr) {
|
||||||
case ATR_INVERSE:
|
case ATR_INVERSE:
|
||||||
inversed = 0;
|
inversed = 0;
|
||||||
|
FALLTHROUGH;
|
||||||
/*FALLTHRU*/
|
/*FALLTHRU*/
|
||||||
case ATR_ULINE:
|
case ATR_ULINE:
|
||||||
case ATR_BOLD:
|
case ATR_BOLD:
|
||||||
@@ -341,6 +342,7 @@ term_start_attr(int attr)
|
|||||||
break;
|
break;
|
||||||
case ATR_INVERSE:
|
case ATR_INVERSE:
|
||||||
inversed = 1;
|
inversed = 1;
|
||||||
|
FALLTHROUGH;
|
||||||
/*FALLTHRU*/
|
/*FALLTHRU*/
|
||||||
default:
|
default:
|
||||||
g_attribute = iflags.grmode ? attrib_gr_normal : attrib_text_normal;
|
g_attribute = iflags.grmode ? attrib_gr_normal : attrib_text_normal;
|
||||||
|
|||||||
@@ -78,20 +78,29 @@ CXX=g++ -std=gnu++11
|
|||||||
GCCGTEQ9 := $(shell expr `$(CC) -dumpversion | cut -f1 -d.` \>= 9)
|
GCCGTEQ9 := $(shell expr `$(CC) -dumpversion | cut -f1 -d.` \>= 9)
|
||||||
GCCGTEQ11 := $(shell expr `$(CC) -dumpversion | cut -f1 -d.` \>= 11)
|
GCCGTEQ11 := $(shell expr `$(CC) -dumpversion | cut -f1 -d.` \>= 11)
|
||||||
GCCGTEQ12 := $(shell expr `$(CC) -dumpversion | cut -f1 -d.` \>= 12)
|
GCCGTEQ12 := $(shell expr `$(CC) -dumpversion | cut -f1 -d.` \>= 12)
|
||||||
|
GCCGTEQ14 := $(shell expr `$(CC) -dumpversion | cut -f1 -d.` \>= 14)
|
||||||
ifeq "$(GCCGTEQ9)" "1"
|
ifeq "$(GCCGTEQ9)" "1"
|
||||||
# flags present in gcc version greater than or equal to 9 can go here
|
# flags present in gcc version greater than or equal to 9 can go here
|
||||||
CFLAGS+=-Wformat-overflow
|
CFLAGS+=-Wformat-overflow
|
||||||
CFLAGS+=-Wmissing-parameter-type
|
CFLAGS+=-Wmissing-parameter-type
|
||||||
endif # GCC greater than or equal to 9
|
endif # GCC greater than or equal to 9
|
||||||
#ifeq "$(GCCGTEQ11)" "1"
|
#ifeq "$(GCCGTEQ11)" "1"
|
||||||
|
CFLAGS+=-Wimplicit-fallthrough
|
||||||
#endif
|
#endif
|
||||||
#ifeq "$(GCCGTEQ12)" "1"
|
#ifeq "$(GCCGTEQ12)" "1"
|
||||||
#endif
|
#endif
|
||||||
|
#ifeq "$(GCCGTEQ14)" "1"
|
||||||
|
CFLAGS+=-std=gnu23
|
||||||
|
#endif
|
||||||
# end of gcc-specific
|
# end of gcc-specific
|
||||||
else # gcc or clang?
|
else # gcc or clang?
|
||||||
CXX=clang++ -std=gnu++11
|
CXX=clang++ -std=gnu++11
|
||||||
# clang-specific follows
|
# clang-specific follows
|
||||||
|
CLANGGTEQ12 := $(shell expr `$(CC) -dumpversion | cut -f1 -d.` \>= 12)
|
||||||
CLANGGTEQ14 := $(shell expr `$(CC) -dumpversion | cut -f1 -d.` \>= 14)
|
CLANGGTEQ14 := $(shell expr `$(CC) -dumpversion | cut -f1 -d.` \>= 14)
|
||||||
|
ifeq "$(CLANGGTEQ12)" "1"
|
||||||
|
CFLAGS+=-Wimplicit-fallthrough
|
||||||
|
endif
|
||||||
ifeq "$(CLANGGTEQ14)" "1"
|
ifeq "$(CLANGGTEQ14)" "1"
|
||||||
ifneq "$(VIEWDEPRECATIONS)" "1"
|
ifneq "$(VIEWDEPRECATIONS)" "1"
|
||||||
CFLAGS+=-Wno-deprecated-declarations
|
CFLAGS+=-Wno-deprecated-declarations
|
||||||
|
|||||||
@@ -142,6 +142,7 @@ MSDOS_TARGET_CFLAGS = -c -O -I../include -I../sys/msdos -I../win/share \
|
|||||||
-Wall -Wextra -Wno-missing-field-initializers -Wreturn-type -Wunused \
|
-Wall -Wextra -Wno-missing-field-initializers -Wreturn-type -Wunused \
|
||||||
-Wformat -Wswitch -Wshadow -Wwrite-strings \
|
-Wformat -Wswitch -Wshadow -Wwrite-strings \
|
||||||
-Wimplicit -Wimplicit-function-declaration -Wimplicit-int \
|
-Wimplicit -Wimplicit-function-declaration -Wimplicit-int \
|
||||||
|
-Wimplicit-fallthrough \
|
||||||
-Wmissing-parameter-type -Wold-style-definition -Wstrict-prototypes
|
-Wmissing-parameter-type -Wold-style-definition -Wstrict-prototypes
|
||||||
MSDOS_TARGET_CXXFLAGS = -c -O -I../include -I../sys/msdos -I../win/share \
|
MSDOS_TARGET_CXXFLAGS = -c -O -I../include -I../sys/msdos -I../win/share \
|
||||||
$(LUAINCL) -DDLB $(PDCURSESDEF) \
|
$(LUAINCL) -DDLB $(PDCURSESDEF) \
|
||||||
|
|||||||
@@ -241,6 +241,7 @@ vms_define(const char *name, const char *value, int flag)
|
|||||||
switch (flag) {
|
switch (flag) {
|
||||||
case ENV_JOB: /* job logical name */
|
case ENV_JOB: /* job logical name */
|
||||||
tbl_dsc.len = strlen(tbl_dsc.adr = "LNM$JOB");
|
tbl_dsc.len = strlen(tbl_dsc.adr = "LNM$JOB");
|
||||||
|
FALLTHROUGH;
|
||||||
/*FALLTHRU*/
|
/*FALLTHRU*/
|
||||||
case ENV_SUP: /* supervisor-mode process logical name */
|
case ENV_SUP: /* supervisor-mode process logical name */
|
||||||
result = lib$set_logical(&nam_dsc, &val_dsc, &tbl_dsc);
|
result = lib$set_logical(&nam_dsc, &val_dsc, &tbl_dsc);
|
||||||
|
|||||||
@@ -1131,10 +1131,18 @@ scall =
|
|||||||
# 4777 format string requires an argument of type 'type',
|
# 4777 format string requires an argument of type 'type',
|
||||||
# but variadic argument 'position' has type 'type'
|
# but variadic argument 'position' has type 'type'
|
||||||
# 4820 padding in struct
|
# 4820 padding in struct
|
||||||
|
# 5262 enable fallthrough warnings that lack [[fallthrough]]
|
||||||
|
#
|
||||||
ctmpflags = $(ctmpflags:-W3=-W4) -wd4100 -wd4244 -wd4245 -wd4310 -wd4706 -w44777 -wd4820
|
ctmpflags = $(ctmpflags:-W3=-W4) -wd4100 -wd4244 -wd4245 -wd4310 -wd4706 -w44777 -wd4820
|
||||||
!IF ($(VSVER) >= 2019)
|
!IF ($(VSVER) >= 2019)
|
||||||
ctmpflags = $(ctmpflags) -w44774
|
ctmpflags = $(ctmpflags) -w44774
|
||||||
!ENDIF
|
!ENDIF
|
||||||
|
!IF ($(VSVER) >= 2022)
|
||||||
|
!IF ($(MAKEVERSION) >= 1440338120)
|
||||||
|
# warning 5262 became available starting in Visual Studio 2022 version 17.4.
|
||||||
|
ctmpflags = $(ctmpflags) -w45262 /std:clatest
|
||||||
|
!ENDIF
|
||||||
|
!ENDIF
|
||||||
!ENDIF
|
!ENDIF
|
||||||
|
|
||||||
#More verbose warning output options below
|
#More verbose warning output options below
|
||||||
@@ -2880,6 +2888,8 @@ $(OTTY)sfstruct.o: sfstruct.c $(HACK_H)
|
|||||||
$(OTTY)shk.o: shk.c $(HACK_H)
|
$(OTTY)shk.o: shk.c $(HACK_H)
|
||||||
$(OTTY)shknam.o: shknam.c $(HACK_H)
|
$(OTTY)shknam.o: shknam.c $(HACK_H)
|
||||||
$(OTTY)sit.o: sit.c $(HACK_H) $(INCL)\artifact.h
|
$(OTTY)sit.o: sit.c $(HACK_H) $(INCL)\artifact.h
|
||||||
|
$(Q)$(CC) $(CFLAGS) /EP $(@B).c > $(OTTY)$(@B).c.preproc
|
||||||
|
$(Q)$(CC) $(CFLAGS) -Fo$@ $(@B).c
|
||||||
$(OTTY)sounds.o: sounds.c $(HACK_H)
|
$(OTTY)sounds.o: sounds.c $(HACK_H)
|
||||||
$(OTTY)sp_lev.o: sp_lev.c $(HACK_H) $(INCL)\sp_lev.h
|
$(OTTY)sp_lev.o: sp_lev.c $(HACK_H) $(INCL)\sp_lev.h
|
||||||
$(OTTY)spell.o: spell.c $(HACK_H)
|
$(OTTY)spell.o: spell.c $(HACK_H)
|
||||||
|
|||||||
@@ -1087,6 +1087,7 @@ CtrlHandler(DWORD ctrltype)
|
|||||||
/* case CTRL_C_EVENT: */
|
/* case CTRL_C_EVENT: */
|
||||||
case CTRL_BREAK_EVENT:
|
case CTRL_BREAK_EVENT:
|
||||||
term_clear_screen();
|
term_clear_screen();
|
||||||
|
FALLTHROUGH;
|
||||||
case CTRL_CLOSE_EVENT:
|
case CTRL_CLOSE_EVENT:
|
||||||
case CTRL_LOGOFF_EVENT:
|
case CTRL_LOGOFF_EVENT:
|
||||||
case CTRL_SHUTDOWN_EVENT:
|
case CTRL_SHUTDOWN_EVENT:
|
||||||
@@ -1335,7 +1336,8 @@ xputc_core(int ch)
|
|||||||
case '\n':
|
case '\n':
|
||||||
if (console.cursor.Y < console.height - 1)
|
if (console.cursor.Y < console.height - 1)
|
||||||
console.cursor.Y++;
|
console.cursor.Y++;
|
||||||
/* fall through */
|
FALLTHROUGH;
|
||||||
|
/* FALLTHRU */
|
||||||
case '\r':
|
case '\r':
|
||||||
console.cursor.X = 1;
|
console.cursor.X = 1;
|
||||||
break;
|
break;
|
||||||
@@ -1879,6 +1881,7 @@ toggle_mouse_support(void)
|
|||||||
#endif /* VIRTUAL_TERMINAL_SEQUENCES */
|
#endif /* VIRTUAL_TERMINAL_SEQUENCES */
|
||||||
break;
|
break;
|
||||||
case 0:
|
case 0:
|
||||||
|
FALLTHROUGH;
|
||||||
/*FALLTHRU*/
|
/*FALLTHRU*/
|
||||||
default:
|
default:
|
||||||
#ifndef VIRTUAL_TERMINAL_SEQUENCES
|
#ifndef VIRTUAL_TERMINAL_SEQUENCES
|
||||||
|
|||||||
@@ -630,7 +630,7 @@ process_options(int argc, char * argv[])
|
|||||||
break;
|
break;
|
||||||
} else
|
} else
|
||||||
raw_printf("\nUnknown switch: %s", argv[0]);
|
raw_printf("\nUnknown switch: %s", argv[0]);
|
||||||
/* FALL THROUGH */
|
FALLTHROUGH;
|
||||||
case '?':
|
case '?':
|
||||||
nhusage();
|
nhusage();
|
||||||
nethack_exit(EXIT_SUCCESS);
|
nethack_exit(EXIT_SUCCESS);
|
||||||
|
|||||||
+4
-1
@@ -846,7 +846,8 @@ do_grep_control(char *buf)
|
|||||||
break;
|
break;
|
||||||
case '!': /* if not ID */
|
case '!': /* if not ID */
|
||||||
isif = 0;
|
isif = 0;
|
||||||
/* FALLTHROUGH */
|
FALLTHROUGH;
|
||||||
|
/* FALLTHRU */
|
||||||
case '?': /* if ID */
|
case '?': /* if ID */
|
||||||
if (grep_sp == GREP_STACK_SIZE - 2) {
|
if (grep_sp == GREP_STACK_SIZE - 2) {
|
||||||
Fprintf(stderr, "stack overflow at line %d.", grep_lineno);
|
Fprintf(stderr, "stack overflow at line %d.", grep_lineno);
|
||||||
@@ -2302,6 +2303,7 @@ do_objs(void)
|
|||||||
n_glass_gems++;
|
n_glass_gems++;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
FALLTHROUGH;
|
||||||
/*FALLTHRU*/
|
/*FALLTHRU*/
|
||||||
case VENOM_CLASS:
|
case VENOM_CLASS:
|
||||||
/* fall-through from gem class is ok; objects[] used to have
|
/* fall-through from gem class is ok; objects[] used to have
|
||||||
@@ -2311,6 +2313,7 @@ do_objs(void)
|
|||||||
so strip the extra "splash of " off to keep same macros */
|
so strip the extra "splash of " off to keep same macros */
|
||||||
if (!strncmp(objnam, "SPLASH_OF_", 10))
|
if (!strncmp(objnam, "SPLASH_OF_", 10))
|
||||||
objnam += 10;
|
objnam += 10;
|
||||||
|
FALLTHROUGH;
|
||||||
/*FALLTHRU*/
|
/*FALLTHRU*/
|
||||||
default:
|
default:
|
||||||
Fprintf(ofp, "#define\t");
|
Fprintf(ofp, "#define\t");
|
||||||
|
|||||||
@@ -271,6 +271,7 @@ void NetHackQtBind::qt_askname()
|
|||||||
// success; handle plname[] verification below prior to returning
|
// success; handle plname[] verification below prior to returning
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
FALLTHROUGH;
|
||||||
/*FALLTHRU*/
|
/*FALLTHRU*/
|
||||||
case -2:
|
case -2:
|
||||||
// Quit
|
// Quit
|
||||||
@@ -726,6 +727,7 @@ char NetHackQtBind::qt_more()
|
|||||||
switch (ch) {
|
switch (ch) {
|
||||||
case '\0': // hypothetical
|
case '\0': // hypothetical
|
||||||
ch = '\033';
|
ch = '\033';
|
||||||
|
FALLTHROUGH;
|
||||||
/*FALLTHRU*/
|
/*FALLTHRU*/
|
||||||
case ' ':
|
case ' ':
|
||||||
case '\n':
|
case '\n':
|
||||||
|
|||||||
@@ -1556,6 +1556,7 @@ menu_get_selections(WINDOW *win, nhmenu *menu, int how)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
FALLTHROUGH;
|
||||||
/*FALLTHRU*/
|
/*FALLTHRU*/
|
||||||
default:
|
default:
|
||||||
if (curletter > 0 && curletter < 256
|
if (curletter > 0 && curletter < 256
|
||||||
|
|||||||
@@ -114,6 +114,7 @@ curses_create_main_windows(void)
|
|||||||
|
|
||||||
case 3:
|
case 3:
|
||||||
noperminv_borders = TRUE;
|
noperminv_borders = TRUE;
|
||||||
|
FALLTHROUGH;
|
||||||
/*FALLTHRU*/
|
/*FALLTHRU*/
|
||||||
case 1: /* On */
|
case 1: /* On */
|
||||||
borders = TRUE;
|
borders = TRUE;
|
||||||
@@ -121,6 +122,7 @@ curses_create_main_windows(void)
|
|||||||
|
|
||||||
case 4:
|
case 4:
|
||||||
noperminv_borders = TRUE;
|
noperminv_borders = TRUE;
|
||||||
|
FALLTHROUGH;
|
||||||
/*FALLTHRU*/
|
/*FALLTHRU*/
|
||||||
case 2: /* Auto */
|
case 2: /* Auto */
|
||||||
borders = (term_cols >= 80 + 2 && term_rows >= 24 + 2);
|
borders = (term_cols >= 80 + 2 && term_rows >= 24 + 2);
|
||||||
|
|||||||
@@ -291,7 +291,7 @@ curses_break_str(const char *str, int width, int line_num)
|
|||||||
char *retstr;
|
char *retstr;
|
||||||
int curline = 0;
|
int curline = 0;
|
||||||
int strsize = (int) strlen(str) + 1;
|
int strsize = (int) strlen(str) + 1;
|
||||||
#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
|
#if (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) && !defined(_MSC_VER)
|
||||||
char substr[strsize];
|
char substr[strsize];
|
||||||
char curstr[strsize];
|
char curstr[strsize];
|
||||||
char tmpstr[strsize];
|
char tmpstr[strsize];
|
||||||
@@ -363,7 +363,7 @@ curses_str_remainder(const char *str, int width, int line_num)
|
|||||||
char *retstr;
|
char *retstr;
|
||||||
int curline = 0;
|
int curline = 0;
|
||||||
int strsize = strlen(str) + 1;
|
int strsize = strlen(str) + 1;
|
||||||
#if __STDC_VERSION__ >= 199901L
|
#if (__STDC_VERSION__ >= 199901L) && !defined(_MSC_VER)
|
||||||
char substr[strsize];
|
char substr[strsize];
|
||||||
char tmpstr[strsize];
|
char tmpstr[strsize];
|
||||||
|
|
||||||
@@ -801,6 +801,7 @@ curses_convert_keys(int key)
|
|||||||
a value for ^H greater than 255 is passed back to core's
|
a value for ^H greater than 255 is passed back to core's
|
||||||
readchar() and stripping the value down to 0..255 yields ^G! */
|
readchar() and stripping the value down to 0..255 yields ^G! */
|
||||||
ret = C('H');
|
ret = C('H');
|
||||||
|
FALLTHROUGH;
|
||||||
/*FALLTHRU*/
|
/*FALLTHRU*/
|
||||||
default:
|
default:
|
||||||
if (modifiers_available)
|
if (modifiers_available)
|
||||||
|
|||||||
@@ -415,6 +415,7 @@ draw_horizontal(boolean border)
|
|||||||
w -= (t - 30); /* '+= strlen()' below will add 't';
|
w -= (t - 30); /* '+= strlen()' below will add 't';
|
||||||
* functional result being 'w += 30' */
|
* functional result being 'w += 30' */
|
||||||
}
|
}
|
||||||
|
FALLTHROUGH;
|
||||||
/*FALLTHRU*/
|
/*FALLTHRU*/
|
||||||
case BL_ALIGN:
|
case BL_ALIGN:
|
||||||
case BL_LEVELDESC:
|
case BL_LEVELDESC:
|
||||||
@@ -1231,6 +1232,7 @@ curs_vert_status_vals(int win_width)
|
|||||||
if (fld_width < hp_width + 3) /* +3: " " gap and "("...")" */
|
if (fld_width < hp_width + 3) /* +3: " " gap and "("...")" */
|
||||||
Sprintf(leadingspace, "%*s",
|
Sprintf(leadingspace, "%*s",
|
||||||
(hp_width + 3) - fld_width, " ");
|
(hp_width + 3) - fld_width, " ");
|
||||||
|
FALLTHROUGH;
|
||||||
/*FALLTHRU*/
|
/*FALLTHRU*/
|
||||||
case BL_VERS:
|
case BL_VERS:
|
||||||
case BL_EXP:
|
case BL_EXP:
|
||||||
|
|||||||
@@ -98,6 +98,7 @@ curses_create_window(int wid, int width, int height, orient orientation)
|
|||||||
switch (orientation) {
|
switch (orientation) {
|
||||||
default:
|
default:
|
||||||
impossible("curses_create_window: Bad orientation");
|
impossible("curses_create_window: Bad orientation");
|
||||||
|
FALLTHROUGH;
|
||||||
/*FALLTHRU*/
|
/*FALLTHRU*/
|
||||||
case CENTER:
|
case CENTER:
|
||||||
startx = (term_cols / 2) - (width / 2);
|
startx = (term_cols / 2) - (width / 2);
|
||||||
|
|||||||
@@ -1341,6 +1341,7 @@ s_atr2str(int n)
|
|||||||
/* if italic isn't available, fall through to underline */
|
/* if italic isn't available, fall through to underline */
|
||||||
if (ZH && *ZH)
|
if (ZH && *ZH)
|
||||||
return ZH;
|
return ZH;
|
||||||
|
FALLTHROUGH;
|
||||||
/*FALLTHRU*/
|
/*FALLTHRU*/
|
||||||
case ATR_BLINK:
|
case ATR_BLINK:
|
||||||
case ATR_ULINE:
|
case ATR_ULINE:
|
||||||
@@ -1351,6 +1352,7 @@ s_atr2str(int n)
|
|||||||
if (nh_US && *nh_US)
|
if (nh_US && *nh_US)
|
||||||
return nh_US;
|
return nh_US;
|
||||||
}
|
}
|
||||||
|
FALLTHROUGH;
|
||||||
/*FALLTHRU*/
|
/*FALLTHRU*/
|
||||||
case ATR_BOLD:
|
case ATR_BOLD:
|
||||||
if (MD && *MD)
|
if (MD && *MD)
|
||||||
@@ -1378,15 +1380,18 @@ e_atr2str(int n)
|
|||||||
/* send ZR unless we didn't have ZH and substituted US */
|
/* send ZR unless we didn't have ZH and substituted US */
|
||||||
if (ZR && *ZR && ZH && *ZH)
|
if (ZR && *ZR && ZH && *ZH)
|
||||||
return ZR;
|
return ZR;
|
||||||
|
FALLTHROUGH;
|
||||||
/*FALLTHRU*/
|
/*FALLTHRU*/
|
||||||
case ATR_ULINE:
|
case ATR_ULINE:
|
||||||
if (nh_UE && *nh_UE)
|
if (nh_UE && *nh_UE)
|
||||||
return nh_UE;
|
return nh_UE;
|
||||||
|
FALLTHROUGH;
|
||||||
/*FALLTHRU*/
|
/*FALLTHRU*/
|
||||||
case ATR_BOLD:
|
case ATR_BOLD:
|
||||||
case ATR_BLINK:
|
case ATR_BLINK:
|
||||||
if (nh_HE && *nh_HE)
|
if (nh_HE && *nh_HE)
|
||||||
return nh_HE;
|
return nh_HE;
|
||||||
|
FALLTHROUGH;
|
||||||
/*FALLTHRU*/
|
/*FALLTHRU*/
|
||||||
case ATR_DIM:
|
case ATR_DIM:
|
||||||
case ATR_INVERSE:
|
case ATR_INVERSE:
|
||||||
|
|||||||
@@ -665,6 +665,7 @@ tty_askname(void)
|
|||||||
case -1:
|
case -1:
|
||||||
bail("Until next time then..."); /* quit */
|
bail("Until next time then..."); /* quit */
|
||||||
/*NOTREACHED*/
|
/*NOTREACHED*/
|
||||||
|
break;
|
||||||
case 0:
|
case 0:
|
||||||
break; /* no game chosen; start new game */
|
break; /* no game chosen; start new game */
|
||||||
case 1:
|
case 1:
|
||||||
@@ -1084,6 +1085,7 @@ tty_clear_nhwindow(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 */
|
||||||
disp.botlx = TRUE;
|
disp.botlx = TRUE;
|
||||||
|
FALLTHROUGH;
|
||||||
/*FALLTHRU*/
|
/*FALLTHRU*/
|
||||||
case NHW_BASE:
|
case NHW_BASE:
|
||||||
/* if erasing_tty_screen is True, calling sequence is
|
/* if erasing_tty_screen is True, calling sequence is
|
||||||
@@ -1721,6 +1723,7 @@ process_menu_window(winid window, struct WinDesc *cw)
|
|||||||
break;
|
break;
|
||||||
case MENU_EXPLICIT_CHOICE:
|
case MENU_EXPLICIT_CHOICE:
|
||||||
morc = really_morc;
|
morc = really_morc;
|
||||||
|
FALLTHROUGH;
|
||||||
/*FALLTHRU*/
|
/*FALLTHRU*/
|
||||||
default:
|
default:
|
||||||
if (cw->how == PICK_NONE || !strchr(resp, morc)) {
|
if (cw->how == PICK_NONE || !strchr(resp, morc)) {
|
||||||
@@ -1878,12 +1881,14 @@ tty_display_nhwindow(
|
|||||||
tty_display_nhwindow(WIN_MESSAGE, TRUE);
|
tty_display_nhwindow(WIN_MESSAGE, TRUE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
FALLTHROUGH;
|
||||||
/*FALLTHRU*/
|
/*FALLTHRU*/
|
||||||
case NHW_BASE:
|
case NHW_BASE:
|
||||||
(void) fflush(stdout);
|
(void) fflush(stdout);
|
||||||
break;
|
break;
|
||||||
case NHW_TEXT:
|
case NHW_TEXT:
|
||||||
cw->maxcol = ttyDisplay->cols; /* force full-screen mode */
|
cw->maxcol = ttyDisplay->cols; /* force full-screen mode */
|
||||||
|
FALLTHROUGH;
|
||||||
/*FALLTHRU*/
|
/*FALLTHRU*/
|
||||||
case NHW_MENU:
|
case NHW_MENU:
|
||||||
cw->active = 1;
|
cw->active = 1;
|
||||||
@@ -1951,6 +1956,7 @@ tty_dismiss_nhwindow(winid window)
|
|||||||
if (ttyDisplay->toplin != TOPLINE_EMPTY)
|
if (ttyDisplay->toplin != TOPLINE_EMPTY)
|
||||||
tty_display_nhwindow(WIN_MESSAGE, TRUE);
|
tty_display_nhwindow(WIN_MESSAGE, TRUE);
|
||||||
nhassert(ttyDisplay->toplin == TOPLINE_EMPTY);
|
nhassert(ttyDisplay->toplin == TOPLINE_EMPTY);
|
||||||
|
FALLTHROUGH;
|
||||||
/*FALLTHRU*/
|
/*FALLTHRU*/
|
||||||
case NHW_STATUS:
|
case NHW_STATUS:
|
||||||
case NHW_BASE:
|
case NHW_BASE:
|
||||||
@@ -4438,6 +4444,7 @@ tty_status_update(
|
|||||||
switch (fldidx) {
|
switch (fldidx) {
|
||||||
case BL_RESET:
|
case BL_RESET:
|
||||||
reset_state = FORCE_RESET;
|
reset_state = FORCE_RESET;
|
||||||
|
FALLTHROUGH;
|
||||||
/*FALLTHRU*/
|
/*FALLTHRU*/
|
||||||
case BL_FLUSH:
|
case BL_FLUSH:
|
||||||
if (make_things_fit(reset_state) || truncation_expected) {
|
if (make_things_fit(reset_state) || truncation_expected) {
|
||||||
@@ -4458,6 +4465,7 @@ tty_status_update(
|
|||||||
break;
|
break;
|
||||||
case BL_GOLD:
|
case BL_GOLD:
|
||||||
text = decode_mixed(goldbuf, text);
|
text = decode_mixed(goldbuf, text);
|
||||||
|
FALLTHROUGH;
|
||||||
/*FALLTHRU*/
|
/*FALLTHRU*/
|
||||||
default:
|
default:
|
||||||
attrmask = (color >> 8) & 0x00FF;
|
attrmask = (color >> 8) & 0x00FF;
|
||||||
@@ -4506,6 +4514,7 @@ tty_status_update(
|
|||||||
break;
|
break;
|
||||||
case BL_LEVELDESC:
|
case BL_LEVELDESC:
|
||||||
dlvl_shrinklvl = 0; /* caller is passing full length string */
|
dlvl_shrinklvl = 0; /* caller is passing full length string */
|
||||||
|
FALLTHROUGH;
|
||||||
/*FALLTHRU*/
|
/*FALLTHRU*/
|
||||||
case BL_HUNGER:
|
case BL_HUNGER:
|
||||||
/* The core sends trailing blanks for some fields.
|
/* The core sends trailing blanks for some fields.
|
||||||
|
|||||||
+4
-2
@@ -146,7 +146,8 @@ GetlinDlgProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
|
|||||||
(WPARAM) sizeof(wbuf2), (LPARAM) wbuf2);
|
(WPARAM) sizeof(wbuf2), (LPARAM) wbuf2);
|
||||||
NH_W2A(wbuf2, data->result, data->result_size);
|
NH_W2A(wbuf2, data->result, data->result_size);
|
||||||
|
|
||||||
/* Fall through. */
|
FALLTHROUGH;
|
||||||
|
/* FALLTHRU */
|
||||||
|
|
||||||
/* cancel button was pressed */
|
/* cancel button was pressed */
|
||||||
case IDCANCEL:
|
case IDCANCEL:
|
||||||
@@ -246,7 +247,8 @@ ExtCmdDlgProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
|
|||||||
hWnd, IDC_EXTCMD_LIST, LB_GETCURSEL, (WPARAM) 0, (LPARAM) 0);
|
hWnd, IDC_EXTCMD_LIST, LB_GETCURSEL, (WPARAM) 0, (LPARAM) 0);
|
||||||
if (*data->selection == LB_ERR)
|
if (*data->selection == LB_ERR)
|
||||||
*data->selection = -1;
|
*data->selection = -1;
|
||||||
/* Fall through. */
|
FALLTHROUGH;
|
||||||
|
/* FALLTHRU */
|
||||||
|
|
||||||
/* CANCEL button ws clicked */
|
/* CANCEL button ws clicked */
|
||||||
case IDCANCEL:
|
case IDCANCEL:
|
||||||
|
|||||||
Reference in New Issue
Block a user