summaryrefslogtreecommitdiffstats
path: root/larn/object.c
diff options
context:
space:
mode:
authormrg <mrg@NetBSD.org>2019-02-03 03:19:25 +0000
committermrg <mrg@NetBSD.org>2019-02-03 03:19:25 +0000
commitdc6514954049bf3d7c993996025a81414423c89b (patch)
tree62f1a633c2e85d4bfcee4a574b5fa5c66ba88816 /larn/object.c
parent2d315c293c005d7227edf8d5800e4f9dc2795baa (diff)
downloadbsdgames-darwin-dc6514954049bf3d7c993996025a81414423c89b.tar.gz
bsdgames-darwin-dc6514954049bf3d7c993996025a81414423c89b.tar.zst
bsdgames-darwin-dc6514954049bf3d7c993996025a81414423c89b.zip
- add or adjust /* FALLTHROUGH */ where appropriate
- add __unreachable() after functions that can return but won't in this case, and thus can't be marked __dead easily
Diffstat (limited to 'larn/object.c')
-rw-r--r--larn/object.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/larn/object.c b/larn/object.c
index a8e14496..942b6bce 100644
--- a/larn/object.c
+++ b/larn/object.c
@@ -1,10 +1,10 @@
-/* $NetBSD: object.c,v 1.16 2012/06/19 05:30:43 dholland Exp $ */
+/* $NetBSD: object.c,v 1.17 2019/02/03 03:19:25 mrg Exp $ */
/* object.c Larn is copyrighted 1986 by Noah Morgan. */
#include <sys/cdefs.h>
#ifndef lint
-__RCSID("$NetBSD: object.c,v 1.16 2012/06/19 05:30:43 dholland Exp $");
+__RCSID("$NetBSD: object.c,v 1.17 2019/02/03 03:19:25 mrg Exp $");
#endif /* not lint */
#include "header.h"
#include "extern.h"
@@ -148,6 +148,7 @@ lookforobject(void)
item[playerx][playery] = OTELEPORTER;
know[playerx][playery] = 1;
+ /* FALLTHROUGH */
case OTELEPORTER:
lprcat("\nZaaaappp! You've been teleported!\n");
beep();
@@ -404,6 +405,7 @@ lookforobject(void)
item[playerx][playery] = OTRAPARROW;
know[playerx][playery] = 0;
+ /* FALLTHROUGH */
case OTRAPARROW:
lprcat("\nYou are hit by an arrow");
beep(); /* for an arrow trap */
@@ -418,6 +420,7 @@ lookforobject(void)
item[playerx][playery] = ODARTRAP;
know[playerx][playery] = 0;
+ /* FALLTHROUGH */
case ODARTRAP:
lprcat("\nYou are hit by a dart");
beep(); /* for a dart trap */
@@ -434,6 +437,7 @@ lookforobject(void)
item[playerx][playery] = OTRAPDOOR;
know[playerx][playery] = 1;
+ /* FALLTHROUGH */
case OTRAPDOOR:
lastnum = 272; /* a trap door */
if ((level == MAXLEVEL - 1) || (level == MAXLEVEL + MAXVLEVEL - 1)) {