mirror of
https://github.com/libevent/libevent.git
synced 2025-01-31 09:12:55 +08:00
Fix compiler warnings under WIN32
This commit is contained in:
parent
ab30e553c4
commit
d469c503c5
4
buffer.c
4
buffer.c
@ -1863,7 +1863,7 @@ evbuffer_read(struct evbuffer *buf, evutil_socket_t fd, int howmuch)
|
||||
unsigned char *p;
|
||||
#endif
|
||||
#if defined(FIONREAD) && defined(WIN32)
|
||||
long lng = n;
|
||||
unsigned long lng = EVBUFFER_MAX_READ;
|
||||
#endif
|
||||
|
||||
EVBUFFER_LOCK(buf);
|
||||
@ -2019,7 +2019,7 @@ evbuffer_write_iovec(struct evbuffer *buffer, evutil_socket_t fd,
|
||||
if (chain->flags & EVBUFFER_SENDFILE)
|
||||
break;
|
||||
#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) {
|
||||
iov[i++].IOV_LEN_FIELD = chain->off;
|
||||
howmuch -= chain->off;
|
||||
|
Loading…
x
Reference in New Issue
Block a user