Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys fix sign-compare warnings
details: https://anonhg.NetBSD.org/src/rev/df31cd9339a6
branches: trunk
changeset: 768315:df31cd9339a6
user: christos <christos%NetBSD.org@localhost>
date: Sun Aug 14 12:37:09 2011 +0000
description:
fix sign-compare warnings
diffstat:
sys/kern/vfs_wapbl.c | 14 +++++++-------
sys/ufs/ffs/ffs_subr.c | 6 +++---
2 files changed, 10 insertions(+), 10 deletions(-)
diffs (69 lines):
diff -r 42b9bd87fa74 -r df31cd9339a6 sys/kern/vfs_wapbl.c
--- a/sys/kern/vfs_wapbl.c Sun Aug 14 12:36:02 2011 +0000
+++ b/sys/kern/vfs_wapbl.c Sun Aug 14 12:37:09 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: vfs_wapbl.c,v 1.45 2011/06/12 03:35:57 rmind Exp $ */
+/* $NetBSD: vfs_wapbl.c,v 1.46 2011/08/14 12:37:09 christos Exp $ */
/*-
* Copyright (c) 2003, 2008, 2009 The NetBSD Foundation, Inc.
@@ -36,7 +36,7 @@
#define WAPBL_INTERNAL
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: vfs_wapbl.c,v 1.45 2011/06/12 03:35:57 rmind Exp $");
+__KERNEL_RCSID(0, "$NetBSD: vfs_wapbl.c,v 1.46 2011/08/14 12:37:09 christos Exp $");
#include <sys/param.h>
#include <sys/bitops.h>
@@ -1043,9 +1043,9 @@
off_t new;
/* Define acceptable ranges for inputs. */
- KASSERT(delta <= size);
- KASSERT((old == 0) || (old >= off));
- KASSERT(old < (size + off));
+ KASSERT(delta <= (size_t)size);
+ KASSERT((old == 0) || ((size_t)old >= off));
+ KASSERT(old < (off_t)(size + off));
if ((old == 0) && (delta != 0))
new = off + delta;
@@ -1060,8 +1060,8 @@
KASSERT((delta != (size)) || (new == old));
/* Define acceptable ranges for output. */
- KASSERT((new == 0) || (new >= off));
- KASSERT(new < (size + off));
+ KASSERT((new == 0) || ((size_t)new >= off));
+ KASSERT((size_t)new < (size + off));
return new;
}
diff -r 42b9bd87fa74 -r df31cd9339a6 sys/ufs/ffs/ffs_subr.c
--- a/sys/ufs/ffs/ffs_subr.c Sun Aug 14 12:36:02 2011 +0000
+++ b/sys/ufs/ffs/ffs_subr.c Sun Aug 14 12:37:09 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ffs_subr.c,v 1.46 2011/03/06 17:08:38 bouyer Exp $ */
+/* $NetBSD: ffs_subr.c,v 1.47 2011/08/14 12:37:09 christos Exp $ */
/*
* Copyright (c) 1982, 1986, 1989, 1993
@@ -36,7 +36,7 @@
#endif
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ffs_subr.c,v 1.46 2011/03/06 17:08:38 bouyer Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ffs_subr.c,v 1.47 2011/08/14 12:37:09 christos Exp $");
#include <sys/param.h>
@@ -308,7 +308,7 @@
*/
start = blkno + 1;
end = start + fs->fs_contigsumsize;
- if (end >= ufs_rw32(cgp->cg_nclusterblks, needswap))
+ if ((uint32_t)end >= ufs_rw32(cgp->cg_nclusterblks, needswap))
end = ufs_rw32(cgp->cg_nclusterblks, needswap);
mapp = &freemapp[start / NBBY];
map = *mapp++;
Home |
Main Index |
Thread Index |
Old Index