]> git.cameronkatri.com Git - bsdgames-darwin.git/blobdiff - larn/main.c
cgram: adjust style to survive lint's strict bool mode
[bsdgames-darwin.git] / larn / main.c
index 1b442d6d9b95611fbd626c4f2f2769b9513b5db2..977c17d9b35547ee6de3f045190301b1d142e1d7 100644 (file)
@@ -1,9 +1,9 @@
-/*     $NetBSD: main.c,v 1.25 2012/06/19 05:30:43 dholland Exp $       */
+/*     $NetBSD: main.c,v 1.26 2019/02/03 03:19:25 mrg Exp $    */
 
 /* main.c               */
 #include <sys/cdefs.h>
 #ifndef lint
-__RCSID("$NetBSD: main.c,v 1.25 2012/06/19 05:30:43 dholland Exp $");
+__RCSID("$NetBSD: main.c,v 1.26 2019/02/03 03:19:25 mrg Exp $");
 #endif                         /* not lint */
 
 #include <sys/types.h>
@@ -37,6 +37,8 @@ static void eatcookie(void);
 static void quaff(void);
 static int whatitem(const char *);
 
+#define __unreachable() __builtin_unreachable()
+
 static char     copyright[] = "\nLarn is copyrighted 1986 by Noah Morgan.\n";
 int             srcount = 0;   /* line counter for showstr()    */
 int             dropflag = 0;  /* if 1 then don't lookforobject() next round */
@@ -793,6 +795,7 @@ parse(void)
                        savegame(savefilename);
                        wizard = 1;
                        died(-257);     /* save the game - doesn't return        */
+                       __unreachable();
 
                case 'Z':
                        yrepcount = 0;
@@ -918,6 +921,7 @@ parse(void)
                case 'g':
                        cursors();
                        lprintf("\nThe stuff you are carrying presently weighs %ld pounds", (long) packweight());
+                       /* FALLTHROUGH */
                case ' ':
                        yrepcount = 0;
                        nomove = 1;