summaryrefslogtreecommitdiffstats
path: root/hack
diff options
context:
space:
mode:
authorlukem <lukem@NetBSD.org>2009-01-18 00:24:29 +0000
committerlukem <lukem@NetBSD.org>2009-01-18 00:24:29 +0000
commitbbaddd455190c6e1fff13f67b55db4bc5018a05a (patch)
treeb46e05c07b6efd2bc9dc490ca721378687c14d6f /hack
parentd306d8ad357a5ceda8627e0852bcf3fb609cbd1b (diff)
downloadbsdgames-darwin-bbaddd455190c6e1fff13f67b55db4bc5018a05a.tar.gz
bsdgames-darwin-bbaddd455190c6e1fff13f67b55db4bc5018a05a.tar.zst
bsdgames-darwin-bbaddd455190c6e1fff13f67b55db4bc5018a05a.zip
fix -Wsign-compare issues
Diffstat (limited to 'hack')
-rw-r--r--hack/extern.h4
-rw-r--r--hack/hack.lev.c8
-rw-r--r--hack/hack.o_init.c6
3 files changed, 9 insertions, 9 deletions
diff --git a/hack/extern.h b/hack/extern.h
index 8adb0cbc..ce4dd452 100644
--- a/hack/extern.h
+++ b/hack/extern.h
@@ -1,4 +1,4 @@
-/* $NetBSD: extern.h,v 1.8 2008/04/28 20:22:54 martin Exp $ */
+/* $NetBSD: extern.h,v 1.9 2009/01/18 00:34:03 lukem Exp $ */
/*-
* Copyright (c) 1997 The NetBSD Foundation, Inc.
@@ -236,7 +236,7 @@ int dosuspend(void);
/* hack.lev.c */
void savelev(int, xchar);
-void bwrite(int, const void *, unsigned);
+void bwrite(int, const void *, size_t);
void saveobjchn(int, struct obj *);
void savemonchn(int, struct monst *);
void savegoldchn(int, struct gold *);
diff --git a/hack/hack.lev.c b/hack/hack.lev.c
index e65bfea6..87465433 100644
--- a/hack/hack.lev.c
+++ b/hack/hack.lev.c
@@ -1,4 +1,4 @@
-/* $NetBSD: hack.lev.c,v 1.7 2008/01/28 06:55:41 dholland Exp $ */
+/* $NetBSD: hack.lev.c,v 1.8 2009/01/18 00:34:03 lukem Exp $ */
/*
* Copyright (c) 1985, Stichting Centrum voor Wiskunde en Informatica,
@@ -63,7 +63,7 @@
#include <sys/cdefs.h>
#ifndef lint
-__RCSID("$NetBSD: hack.lev.c,v 1.7 2008/01/28 06:55:41 dholland Exp $");
+__RCSID("$NetBSD: hack.lev.c,v 1.8 2009/01/18 00:34:03 lukem Exp $");
#endif /* not lint */
#include <stdlib.h>
@@ -133,10 +133,10 @@ void
bwrite(fd, loc, num)
int fd;
const void *loc;
- unsigned num;
+ size_t num;
{
/* lint wants the 3rd arg of write to be an int; lint -p an unsigned */
- if (write(fd, loc, (int) num) != num)
+ if ((size_t)write(fd, loc, num) != num)
panic("cannot write %u bytes to file #%d", num, fd);
}
diff --git a/hack/hack.o_init.c b/hack/hack.o_init.c
index dc5bf933..1f99752e 100644
--- a/hack/hack.o_init.c
+++ b/hack/hack.o_init.c
@@ -1,4 +1,4 @@
-/* $NetBSD: hack.o_init.c,v 1.7 2003/04/02 18:36:38 jsm Exp $ */
+/* $NetBSD: hack.o_init.c,v 1.8 2009/01/18 00:34:03 lukem Exp $ */
/*
* Copyright (c) 1985, Stichting Centrum voor Wiskunde en Informatica,
@@ -63,7 +63,7 @@
#include <sys/cdefs.h>
#ifndef lint
-__RCSID("$NetBSD: hack.o_init.c,v 1.7 2003/04/02 18:36:38 jsm Exp $");
+__RCSID("$NetBSD: hack.o_init.c,v 1.8 2009/01/18 00:34:03 lukem Exp $");
#endif /* not lint */
#include <string.h>
@@ -180,7 +180,7 @@ savenames(fd)
int fd;
{
int i;
- unsigned len;
+ size_t len;
bwrite(fd, (char *) bases, sizeof bases);
bwrite(fd, (char *) objects, sizeof objects);
/*