summaryrefslogtreecommitdiffstats
path: root/monop
diff options
context:
space:
mode:
authordholland <dholland@NetBSD.org>2008-02-24 06:07:06 +0000
committerdholland <dholland@NetBSD.org>2008-02-24 06:07:06 +0000
commit84200264cf0a41781f9ebd56643526065acec647 (patch)
treef64479ee04fe96f66a4bf7ca3f2b92e75da8f3a1 /monop
parent26ed5a094d93bb19c3fa7e2a29ccca62a7955c64 (diff)
downloadbsdgames-darwin-84200264cf0a41781f9ebd56643526065acec647.tar.gz
bsdgames-darwin-84200264cf0a41781f9ebd56643526065acec647.tar.zst
bsdgames-darwin-84200264cf0a41781f9ebd56643526065acec647.zip
Fix a bit more lint.
Diffstat (limited to 'monop')
-rw-r--r--monop/monop.h4
-rw-r--r--monop/morg.c11
-rw-r--r--monop/roll.c8
3 files changed, 11 insertions, 12 deletions
diff --git a/monop/monop.h b/monop/monop.h
index ad62ef62..bcbf97f7 100644
--- a/monop/monop.h
+++ b/monop/monop.h
@@ -1,4 +1,4 @@
-/* $NetBSD: monop.h,v 1.17 2008/02/24 03:01:13 dholland Exp $ */
+/* $NetBSD: monop.h,v 1.18 2008/02/24 06:07:06 dholland Exp $ */
/*
* Copyright (c) 1980, 1993
@@ -67,7 +67,7 @@
#define lucky(str) printf("%s%s\n",str,lucky_mes[roll(1,num_luck)-1])
#define printline() printf("------------------------------\n")
-#define sqnum(sqp) (sqp - board)
+#define sqnum(sqp) ((short)(sqp - board))
struct sqr_st { /* structure for square */
const char *name; /* place name */
diff --git a/monop/morg.c b/monop/morg.c
index e56ef7b0..cc930781 100644
--- a/monop/morg.c
+++ b/monop/morg.c
@@ -1,4 +1,4 @@
-/* $NetBSD: morg.c,v 1.17 2008/02/24 02:55:20 dholland Exp $ */
+/* $NetBSD: morg.c,v 1.18 2008/02/24 06:07:06 dholland Exp $ */
/*
* Copyright (c) 1980, 1993
@@ -34,7 +34,7 @@
#if 0
static char sccsid[] = "@(#)morg.c 8.1 (Berkeley) 5/31/93";
#else
-__RCSID("$NetBSD: morg.c,v 1.17 2008/02/24 02:55:20 dholland Exp $");
+__RCSID("$NetBSD: morg.c,v 1.18 2008/02/24 06:07:06 dholland Exp $");
#endif
#endif /* not lint */
@@ -201,8 +201,7 @@ set_umlist()
* This routine actually unmortgages the property
*/
static void
-unm(propnum)
- int propnum;
+unm(int propnum)
{
int price;
@@ -211,7 +210,7 @@ unm(propnum)
price += price/10;
printf("That cost you $%d\n",price);
cur_p->money -= price;
- set_umlist();
+ (void)set_umlist();
}
/*
@@ -219,7 +218,7 @@ unm(propnum)
* financial woes. It is fine to have $0 but not to be in debt.
*/
void
-force_morg()
+force_morg(void)
{
told_em = fixing = TRUE;
while (cur_p->money < 0) {
diff --git a/monop/roll.c b/monop/roll.c
index 43f42fc1..ccae9d5a 100644
--- a/monop/roll.c
+++ b/monop/roll.c
@@ -1,4 +1,4 @@
-/* $NetBSD: roll.c,v 1.12 2008/02/24 02:58:33 dholland Exp $ */
+/* $NetBSD: roll.c,v 1.13 2008/02/24 06:07:06 dholland Exp $ */
/*
* Copyright (c) 1980, 1993
@@ -34,7 +34,7 @@
#if 0
static char sccsid[] = "@(#)roll.c 8.1 (Berkeley) 5/31/93";
#else
-__RCSID("$NetBSD: roll.c,v 1.12 2008/02/24 02:58:33 dholland Exp $");
+__RCSID("$NetBSD: roll.c,v 1.13 2008/02/24 06:07:06 dholland Exp $");
#endif
#endif /* not lint */
@@ -50,10 +50,10 @@ int
roll(ndie, nsides)
int ndie, nsides;
{
- int tot;
+ long tot;
tot = 0;
while (ndie--)
tot += (random() % nsides) + 1;
- return tot;
+ return (int)tot;
}