X-Git-Url: https://git.cameronkatri.com/bsdgames-darwin.git/blobdiff_plain/8b1c71ee649fb41155da92995044e451c39ea700..679426dc52b7c5ef9223f9ec7065855f81102c78:/hack/hack.do_name.c diff --git a/hack/hack.do_name.c b/hack/hack.do_name.c index 31ca88e5..c01e35b4 100644 --- a/hack/hack.do_name.c +++ b/hack/hack.do_name.c @@ -1,4 +1,4 @@ -/* $NetBSD: hack.do_name.c,v 1.11 2009/08/12 07:28:40 dholland Exp $ */ +/* $NetBSD: hack.do_name.c,v 1.13 2011/08/07 06:03:45 dholland Exp $ */ /* * Copyright (c) 1985, Stichting Centrum voor Wiskunde en Informatica, @@ -63,7 +63,7 @@ #include #ifndef lint -__RCSID("$NetBSD: hack.do_name.c,v 1.11 2009/08/12 07:28:40 dholland Exp $"); +__RCSID("$NetBSD: hack.do_name.c,v 1.13 2011/08/07 06:03:45 dholland Exp $"); #endif /* not lint */ #include @@ -119,7 +119,8 @@ do_mname(void) { char buf[BUFSZ]; coord cc; - int cx, cy, lth; + int cx, cy; + size_t lth; unsigned i; struct monst *mtmp, *mtmp2; cc = getpos(0, "the monster you want to name"); @@ -173,7 +174,7 @@ static void do_oname(struct obj *obj) { struct obj *otmp, *otmp2; - int lth; + size_t lth; char buf[BUFSZ]; pline("What do you want to name %s? ", doname(obj)); getlin(buf); @@ -211,7 +212,7 @@ do_oname(struct obj *obj) #if 0 obfree(obj, otmp2); /* now unnecessary: no pointers on bill */ #endif - free((char *) obj); /* let us hope nobody else saved a pointer */ + free(obj); /* let us hope nobody else saved a pointer */ } int @@ -295,7 +296,7 @@ xmonnam(struct monst *mtmp, int vb) (void) strlcpy(buf, shkname(mtmp), sizeof(buf)); break; } - /* fall into next case */ + /* FALLTHROUGH */ default: (void) snprintf(buf, sizeof(buf), "the %s%s", mtmp->minvis ? "invisible " : "",