summaryrefslogtreecommitdiffstats
path: root/hack/hack.makemon.c
diff options
context:
space:
mode:
authordholland <dholland@NetBSD.org>2008-01-28 06:55:41 +0000
committerdholland <dholland@NetBSD.org>2008-01-28 06:55:41 +0000
commitdfce1cca7e9f2a93d3246b5dba2113e20cbc447a (patch)
tree44b17315ece5b2f5ce5ec3ebea7e212a0525e0c3 /hack/hack.makemon.c
parente0675e304b50073e40bf7b5d3bfc9ef7d7358ace (diff)
downloadbsdgames-darwin-dfce1cca7e9f2a93d3246b5dba2113e20cbc447a.tar.gz
bsdgames-darwin-dfce1cca7e9f2a93d3246b5dba2113e20cbc447a.tar.zst
bsdgames-darwin-dfce1cca7e9f2a93d3246b5dba2113e20cbc447a.zip
Make hack build with WARNS=4.
Diffstat (limited to 'hack/hack.makemon.c')
-rw-r--r--hack/hack.makemon.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/hack/hack.makemon.c b/hack/hack.makemon.c
index 308ece9b..44202cca 100644
--- a/hack/hack.makemon.c
+++ b/hack/hack.makemon.c
@@ -1,4 +1,4 @@
-/* $NetBSD: hack.makemon.c,v 1.6 2003/04/02 18:36:37 jsm Exp $ */
+/* $NetBSD: hack.makemon.c,v 1.7 2008/01/28 06:55:41 dholland Exp $ */
/*
* Copyright (c) 1985, Stichting Centrum voor Wiskunde en Informatica,
@@ -63,7 +63,7 @@
#include <sys/cdefs.h>
#ifndef lint
-__RCSID("$NetBSD: hack.makemon.c,v 1.6 2003/04/02 18:36:37 jsm Exp $");
+__RCSID("$NetBSD: hack.makemon.c,v 1.7 2008/01/28 06:55:41 dholland Exp $");
#endif /* not lint */
#include "hack.h"
@@ -84,6 +84,7 @@ makemon(const struct permonst *ptr, int x, int y)
{
struct monst *mtmp;
int tmp, ct;
+ unsigned i;
boolean anything = (!ptr);
if (x != 0 || y != 0)
@@ -117,8 +118,8 @@ makemon(const struct permonst *ptr, int x, int y)
gotmon:
mtmp = newmonst(ptr->pxlth);
*mtmp = zeromonst; /* clear all entries in structure */
- for (ct = 0; ct < ptr->pxlth; ct++)
- ((char *) &(mtmp->mextra[0]))[ct] = 0;
+ for (i = 0; i < ptr->pxlth; i++)
+ ((char *) &(mtmp->mextra[0]))[i] = 0;
mtmp->nmon = fmon;
fmon = mtmp;
mtmp->m_id = flags.ident++;