diff options
author | Jean-Pierre André <jpandre@users.sourceforge.net> | 2012-08-22 10:00:21 +0200 |
---|---|---|
committer | Jean-Pierre André <jpandre@users.sourceforge.net> | 2012-08-22 10:00:21 +0200 |
commit | cc7bc99d0c3a383ac94f705b09e3280725a7b906 (patch) | |
tree | 9dd5a3b785d79a1732b48aa8c029b9a6186cf4c8 /kernel/fuse_dev.c | |
parent | 82711a0dd69520946bdfc51673cd6c1d740cc03a (diff) | |
download | illumos-fusefs-cc7bc99d0c3a383ac94f705b09e3280725a7b906.tar.gz |
Silenced compiler warnings for comparing signed to unsigned
Diffstat (limited to 'kernel/fuse_dev.c')
-rw-r--r-- | kernel/fuse_dev.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/kernel/fuse_dev.c b/kernel/fuse_dev.c index 6ed55ef..e5f963c 100644 --- a/kernel/fuse_dev.c +++ b/kernel/fuse_dev.c @@ -317,7 +317,7 @@ fuse_dev_read(dev_t dev, struct uio *uiop, cred_t *credp) * Check if there is enough room to copy all data from this * iovbuf */ - if (uiop->uio_resid < msgp->ipdata.iovbuf[i].len) { + if ((size_t)uiop->uio_resid < msgp->ipdata.iovbuf[i].len) { DTRACE_PROBE2(fuse_dev_read_err_no_space, char *, "Buffer too small for request data", fuse_session_t *, sep); @@ -341,7 +341,8 @@ fuse_dev_read(dev_t dev, struct uio *uiop, cred_t *credp) static int fuse_ohead_audit(struct fuse_out_header *ohead, struct uio *uio) { - if (uio->uio_resid + sizeof (struct fuse_out_header) != ohead->len) { + if ((size_t)uio->uio_resid + sizeof (struct fuse_out_header) + != ohead->len) { DTRACE_PROBE3(fuse_ohead_audit_err_header, char *, "Invalid length in header", struct uio *, uio, @@ -462,7 +463,7 @@ fuse_dev_write(dev_t dev, struct uio *uiop, cred_t *cred_p) iovbuf = &msg_p->opdata.iovbuf; if (iovbuf->memsize && - iovbuf->memsize < uiop->uio_resid && + iovbuf->memsize < (size_t)uiop->uio_resid && iovbuf->memflag == MEM_TYPE_KMEM) { kmem_free(iovbuf->base, iovbuf->memsize); iovbuf->memsize = 0; @@ -472,7 +473,8 @@ fuse_dev_write(dev_t dev, struct uio *uiop, cred_t *cred_p) fuse_buf_alloc(iovbuf, uiop->uio_resid); } - iovbuf->len = min(iovbuf->memsize, uiop->uio_resid); + iovbuf->len = min(iovbuf->memsize, + (size_t)uiop->uio_resid); /* Save the start and length of arguments */ msg_p->opdata.outdata = iovbuf->base; |