Module Name: src Committed By: tron Date: Sat Sep 10 10:06:10 UTC 2011
Modified Files: src/lib/libperfuse: ops.c Log Message: Avoid comparison between signed and unsigned integer expressions by casting the offset to a unsigned type. This fixes the NetBSD/i386 and hopefully the NetBSD/amd64 build. To generate a diff of this commit: cvs rdiff -u -r1.41 -r1.42 src/lib/libperfuse/ops.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/lib/libperfuse/ops.c diff -u src/lib/libperfuse/ops.c:1.41 src/lib/libperfuse/ops.c:1.42 --- src/lib/libperfuse/ops.c:1.41 Fri Sep 9 22:51:44 2011 +++ src/lib/libperfuse/ops.c Sat Sep 10 10:06:10 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: ops.c,v 1.41 2011/09/09 22:51:44 christos Exp $ */ +/* $NetBSD: ops.c,v 1.42 2011/09/10 10:06:10 tron Exp $ */ /*- * Copyright (c) 2010-2011 Emmanuel Dreyfus. All rights reserved. @@ -2835,7 +2835,7 @@ vap = puffs_pn_getvap((struct puffs_node *)opc); pm = NULL; - if (offset + *resid > vap->va_size) + if ((u_quad_t)offset + *resid > vap->va_size) DWARNX("%s %p read %lld@%zu beyond EOF %" PRIu64 "\n", __func__, (void *)opc, (long long)offset, *resid, vap->va_size); @@ -2942,7 +2942,7 @@ /* * Serialize size access, see comment in perfuse_node_setattr(). */ - if (offset + *resid > vap->va_size) { + if ((u_quad_t)offset + *resid > vap->va_size) { while (pnd->pnd_flags & PND_INRESIZE) requeue_request(pu, opc, PCQ_RESIZE); pnd->pnd_flags |= PND_INRESIZE;