summaryrefslogtreecommitdiffstats
path: root/battlestar
diff options
context:
space:
mode:
authormrg <mrg@NetBSD.org>2018-02-04 08:48:05 +0000
committermrg <mrg@NetBSD.org>2018-02-04 08:48:05 +0000
commitcb493735fd2604c5b7b2c82b9811302b5d58ef9d (patch)
tree338054c92302a96c06f506ef5b1a9d9115170223 /battlestar
parente5c17e55df9ac3ba0cc4e6836b1296ca4e09c863 (diff)
downloadbsdgames-darwin-cb493735fd2604c5b7b2c82b9811302b5d58ef9d.tar.gz
bsdgames-darwin-cb493735fd2604c5b7b2c82b9811302b5d58ef9d.tar.zst
bsdgames-darwin-cb493735fd2604c5b7b2c82b9811302b5d58ef9d.zip
fix issues found by GCC 6.4:
battlestar was missing some {} in its insane printf()+puts() usage. this is a literal code sequence i found: printf("The blast catches "); printf("the goddess in the "); printf("stomach, knocking "); puts("her to the ground."); printf("She writhes in the "); printf("dirt as the agony of "); puts("death taunts her."); puts("She has stopped moving."); no lines inserted or removed. tetris' checkscores() had wrong and missing {} usage.
Diffstat (limited to 'battlestar')
-rw-r--r--battlestar/command3.c7
-rw-r--r--battlestar/command7.c7
2 files changed, 8 insertions, 6 deletions
diff --git a/battlestar/command3.c b/battlestar/command3.c
index 0c8b20eb..62b09d23 100644
--- a/battlestar/command3.c
+++ b/battlestar/command3.c
@@ -1,4 +1,4 @@
-/* $NetBSD: command3.c,v 1.3 2005/07/01 06:04:54 jmc Exp $ */
+/* $NetBSD: command3.c,v 1.4 2018/02/04 08:48:05 mrg Exp $ */
/*
* Copyright (c) 1983, 1993
@@ -34,7 +34,7 @@
#if 0
static char sccsid[] = "@(#)com3.c 8.2 (Berkeley) 4/28/95";
#else
-__RCSID("$NetBSD: command3.c,v 1.3 2005/07/01 06:04:54 jmc Exp $");
+__RCSID("$NetBSD: command3.c,v 1.4 2018/02/04 08:48:05 mrg Exp $");
#endif
#endif /* not lint */
@@ -306,9 +306,10 @@ shoot(void)
if (wintime)
live();
break;
- } else
+ } else {
printf("I don't see any ");
puts("goddess around here.");
+ }
break;
case TIMER:
diff --git a/battlestar/command7.c b/battlestar/command7.c
index 1323f577..060f0890 100644
--- a/battlestar/command7.c
+++ b/battlestar/command7.c
@@ -1,4 +1,4 @@
-/* $NetBSD: command7.c,v 1.3 2005/07/01 06:04:54 jmc Exp $ */
+/* $NetBSD: command7.c,v 1.4 2018/02/04 08:48:05 mrg Exp $ */
/*
* Copyright (c) 1983, 1993
@@ -34,7 +34,7 @@
#if 0
static char sccsid[] = "@(#)com7.c 8.2 (Berkeley) 4/28/95";
#else
-__RCSID("$NetBSD: command7.c,v 1.3 2005/07/01 06:04:54 jmc Exp $");
+__RCSID("$NetBSD: command7.c,v 1.4 2018/02/04 08:48:05 mrg Exp $");
#endif
#endif /* not lint */
@@ -273,9 +273,10 @@ fighton:
}
if (lifeline >= strength) {
printf("You have killed the %s.\n", objsht[enemy]);
- if (enemy == ELF || enemy == DARK)
+ if (enemy == ELF || enemy == DARK) {
printf("A watery black smoke consumes his body and ");
puts("then vanishes with a peal of thunder!");
+ }
clearbit(location[position].objects, enemy);
power += 2;
notes[JINXED]++;