Fix compiler warnings under WIN32

This commit is contained in:
Giuseppe Scrivano 2010-04-12 12:18:57 +02:00 committed by Nick Mathewson
parent ab30e553c4
commit d469c503c5

View File

@ -1863,7 +1863,7 @@ evbuffer_read(struct evbuffer *buf, evutil_socket_t fd, int howmuch)
unsigned char *p; unsigned char *p;
#endif #endif
#if defined(FIONREAD) && defined(WIN32) #if defined(FIONREAD) && defined(WIN32)
long lng = n; unsigned long lng = EVBUFFER_MAX_READ;
#endif #endif
EVBUFFER_LOCK(buf); EVBUFFER_LOCK(buf);
@ -2019,7 +2019,7 @@ evbuffer_write_iovec(struct evbuffer *buffer, evutil_socket_t fd,
if (chain->flags & EVBUFFER_SENDFILE) if (chain->flags & EVBUFFER_SENDFILE)
break; break;
#endif #endif
iov[i].IOV_PTR_FIELD = chain->buffer + chain->misalign; iov[i].IOV_PTR_FIELD = (void *) (chain->buffer + chain->misalign);
if ((size_t)howmuch >= chain->off) { if ((size_t)howmuch >= chain->off) {
iov[i++].IOV_LEN_FIELD = chain->off; iov[i++].IOV_LEN_FIELD = chain->off;
howmuch -= chain->off; howmuch -= chain->off;