if ((chain = evbuffer_expand_singlechain(buf, size)) == NULL)
goto done;
- vec[0].iov_base = CHAIN_SPACE_PTR(chain);
- vec[0].iov_len = (size_t) CHAIN_SPACE_LEN(chain);
+ vec[0].iov_base = (void *)CHAIN_SPACE_PTR(chain);
+ vec[0].iov_len = (size_t)CHAIN_SPACE_LEN(chain);
EVUTIL_ASSERT(size<0 || (size_t)vec[0].iov_len >= (size_t)size);
n = 1;
} else {
result = 0;
goto done;
} else if (n_vecs == 1 &&
- (buf->last && vec[0].iov_base == (void*)CHAIN_SPACE_PTR(buf->last))) {
+ (buf->last && vec[0].iov_base == (void *)CHAIN_SPACE_PTR(buf->last))) {
/* The user only got or used one chain; it might not
* be the first one with space in it. */
if ((size_t)vec[0].iov_len > (size_t)CHAIN_SPACE_LEN(buf->last))
for (i=0; i<n_vecs; ++i) {
if (!chain)
goto done;
- if (vec[i].iov_base != (void*)CHAIN_SPACE_PTR(chain) ||
+ if (vec[i].iov_base != (void *)CHAIN_SPACE_PTR(chain) ||
(size_t)vec[i].iov_len > CHAIN_SPACE_LEN(chain))
goto done;
chain = chain->next;
size_t avail = (size_t) CHAIN_SPACE_LEN(chain);
if (avail > (howmuch - so_far) && exact)
avail = howmuch - so_far;
- vecs[i].iov_base = CHAIN_SPACE_PTR(chain);
+ vecs[i].iov_base = (void *)CHAIN_SPACE_PTR(chain);
vecs[i].iov_len = avail;
so_far += avail;
chain = chain->next;
- start_at->internal_.pos_in_chain;
idx = 1;
if (n_vec > 0) {
- vec[0].iov_base = chain->buffer + chain->misalign
- + start_at->internal_.pos_in_chain;
+ vec[0].iov_base = (void *)(chain->buffer + chain->misalign
+ + start_at->internal_.pos_in_chain);
vec[0].iov_len = len_so_far;
}
chain = chain->next;
if (len >= 0 && len_so_far >= len)
break;
if (idx<n_vec) {
- vec[idx].iov_base = chain->buffer + chain->misalign;
+ vec[idx].iov_base = (void *)(chain->buffer + chain->misalign);
vec[idx].iov_len = chain->off;
} else if (len<0) {
break;
n = evbuffer_peek(src, -1, NULL, v_in, 1);
if (n) {
p->avail_in = v_in[0].iov_len;
- p->next_in = v_in[0].iov_base;
+ p->next_in = (unsigned char *)v_in[0].iov_base;
} else {
p->avail_in = 0;
p->next_in = 0;
}
evbuffer_reserve_space(dst, 4096, v_out, 1);
- p->next_out = v_out[0].iov_base;
+ p->next_out = (unsigned char *)v_out[0].iov_base;
p->avail_out = v_out[0].iov_len;
/* we need to flush zlib if we got a flush */
n = evbuffer_peek(src, -1, NULL, v_in, 1);
if (n) {
p->avail_in = v_in[0].iov_len;
- p->next_in = v_in[0].iov_base;
+ p->next_in = (unsigned char *)v_in[0].iov_base;
} else {
p->avail_in = 0;
p->next_in = 0;
}
evbuffer_reserve_space(dst, 4096, v_out, 1);
- p->next_out = v_out[0].iov_base;
+ p->next_out = (unsigned char *)v_out[0].iov_base;
p->avail_out = v_out[0].iov_len;
/* we need to flush zlib if we got a flush */