Jeremy.
if (header) {
/* Set up the header/trailer iovec. */
- hdtrl[0].iov_base = header->data;
+ hdtrl[0].iov_base = (void *)header->data;
hdtrl[0].iov_len = hdr_len = header->length;
} else {
hdtrl[0].iov_base = NULL;
hdtrl[0].iov_len = 0;
} else {
/* iov_base is defined as a void *... */
- hdtrl[0].iov_base = ((char *)hdtrl[0].iov_base) + nwritten;
+ hdtrl[0].iov_base = (void *)(((char *)hdtrl[0].iov_base) + nwritten);
hdtrl[0].iov_len -= nwritten;
nwritten = 0;
}
/* Set up the header iovec. */
if (header) {
- hdtrl.iov_base = header->data;
+ hdtrl.iov_base = (void *)header->data;
hdtrl.iov_len = hdr_len = header->length;
} else {
hdtrl.iov_base = NULL;
hdtrl.iov_len = 0;
} else {
hdtrl.iov_base =
- (caddr_t)hdtrl.iov_base + nwritten;
+ (void *)((caddr_t)hdtrl.iov_base + nwritten);
hdtrl.iov_len -= nwritten;
nwritten = 0;
}
if (thistime < iov[0].iov_len) {
char *new_base =
(char *)iov[0].iov_base + thistime;
- iov[0].iov_base = new_base;
+ iov[0].iov_base = (void *)new_base;
iov[0].iov_len -= thistime;
break;
}
ssize_t ret;
struct iovec iov;
- iov.iov_base = CONST_DISCARD(char *, buffer);
+ iov.iov_base = CONST_DISCARD(void *, buffer);
iov.iov_len = N;
ret = write_data_iov(fd, &iov, 1);
return NULL;
}
- state->iov[0].iov_base = wb_req;
+ state->iov[0].iov_base = (void *)wb_req;
state->iov[0].iov_len = sizeof(struct winbindd_request);
if (wb_req->extra_len != 0) {
- state->iov[1].iov_base = wb_req->extra_data.data;
+ state->iov[1].iov_base = (void *)wb_req->extra_data.data;
state->iov[1].iov_len = wb_req->extra_len;
count = 2;
}
return NULL;
}
- state->iov[0].iov_base = wb_resp;
+ state->iov[0].iov_base = (void *)wb_resp;
state->iov[0].iov_len = sizeof(struct winbindd_response);
if (wb_resp->length > sizeof(struct winbindd_response)) {
- state->iov[1].iov_base = wb_resp->extra_data.data;
+ state->iov[1].iov_base = (void *)wb_resp->extra_data.data;
state->iov[1].iov_len =
wb_resp->length - sizeof(struct winbindd_response);
count = 2;
SSVAL(state->bytecount_buf, 0, iov_len(bytes_iov, iov_count));
- state->iov[0].iov_base = state->header;
+ state->iov[0].iov_base = (void *)state->header;
state->iov[0].iov_len = sizeof(state->header);
- state->iov[1].iov_base = state->vwv;
+ state->iov[1].iov_base = (void *)state->vwv;
state->iov[1].iov_len = wct * sizeof(uint16_t);
- state->iov[2].iov_base = state->bytecount_buf;
+ state->iov[2].iov_base = (void *)state->bytecount_buf;
state->iov[2].iov_len = sizeof(uint16_t);
if (iov_count != 0) {
if (buf == NULL) {
return false;
}
- iov[0].iov_base = buf;
+ iov[0].iov_base = (void *)buf;
iov[0].iov_len = talloc_get_size(buf);
subreq = writev_send(state, state->ev, state->cli->outgoing,
state->cli->fd, iov, 1);
struct tevent_req *req;
struct iovec iov;
- iov.iov_base = CONST_DISCARD(char *, bytes);
+ iov.iov_base = CONST_DISCARD(void *, bytes);
iov.iov_len = num_bytes;
req = cli_smb_req_create(mem_ctx, ev, cli, smb_command,
* last byte.
*/
this_iov[0].iov_len = chain_padding+1;
- this_iov[0].iov_base = &state->header[
+ this_iov[0].iov_base = (void *)&state->header[
sizeof(state->header) - this_iov[0].iov_len];
memset(this_iov[0].iov_base, 0, this_iov[0].iov_len-1);
}
return NULL;
}
- state->bytes.iov_base = bytes;
+ state->bytes.iov_base = (void *)bytes;
state->bytes.iov_len = talloc_get_size(bytes);
subreq = cli_smb_req_create(state, ev, cli, SMBsesssetupX, 0, 13, vwv,
return NULL;
}
- state->bytes.iov_base = bytes;
+ state->bytes.iov_base = (void *)bytes;
state->bytes.iov_len = talloc_get_size(bytes);
subreq = cli_smb_req_create(state, ev, cli, SMBtconX, 0, 4, vwv,
return false;
}
- iov[0].iov_base = cli->outbuf;
+ iov[0].iov_base = (void *)cli->outbuf;
iov[0].iov_len = len;
- iov[1].iov_base = CONST_DISCARD(char *, p);
+ iov[1].iov_base = CONST_DISCARD(void *, p);
iov[1].iov_len = extradata;
nwritten = write_data_iov(cli->fd, iov, 2);
return tevent_req_post(req, ev);
}
- state->bytes.iov_base = bytes;
+ state->bytes.iov_base = (void *)bytes;
state->bytes.iov_len = talloc_get_size(bytes);
subreq = cli_smb_req_create(state, ev, cli, SMBopenX, additional_flags,
}
state->pad = 0;
- state->iov[0].iov_base = &state->pad;
+ state->iov[0].iov_base = (void *)&state->pad;
state->iov[0].iov_len = 1;
- state->iov[1].iov_base = CONST_DISCARD(uint8_t *, buf);
+ state->iov[1].iov_base = CONST_DISCARD(void *, buf);
state->iov[1].iov_len = size;
subreq = cli_smb_req_create(state, ev, cli, SMBwriteX, 0, wct, vwv,
switch (cmd) {
case SMBtrans:
pad[0] = 0;
- iov[0].iov_base = pad;
+ iov[0].iov_base = (void *)pad;
iov[0].iov_len = 1;
- iov[1].iov_base = state->pipe_name_conv;
+ iov[1].iov_base = (void *)state->pipe_name_conv;
iov[1].iov_len = state->pipe_name_conv_len;
wct = 14 + state->num_setup;
param_offset += iov[0].iov_len + iov[1].iov_len;
pad[0] = 0;
pad[1] = 'D'; /* Copy this from "old" 3.0 behaviour */
pad[2] = ' ';
- iov[0].iov_base = pad;
+ iov[0].iov_base = (void *)pad;
iov[0].iov_len = 3;
wct = 14 + state->num_setup;
param_offset += 3;
if (state->param_sent < state->num_param) {
this_param = MIN(state->num_param - state->param_sent,
useable_space);
- iov[0].iov_base = state->param + state->param_sent;
+ iov[0].iov_base = (void *)(state->param + state->param_sent);
iov[0].iov_len = this_param;
iov += 1;
}
if (state->data_sent < state->num_data) {
this_data = MIN(state->num_data - state->data_sent,
useable_space - this_param);
- iov[0].iov_base = state->data + state->data_sent;
+ iov[0].iov_base = (void *)(state->data + state->data_sent);
iov[0].iov_len = this_data;
iov += 1;
}
/* Set up the header iovec. */
if (header) {
- hdtrl.iov_base = header->data;
+ hdtrl.iov_base = (void *)header->data;
hdtrl.iov_len = hdr_len = header->length;
} else {
hdtrl.iov_base = NULL;
hdtrl.iov_len = 0;
} else {
hdtrl.iov_base =
- (caddr_t)hdtrl.iov_base + nwritten;
+ (void *)((caddr_t)hdtrl.iov_base + nwritten);
hdtrl.iov_len -= nwritten;
nwritten = 0;
}
msg.msg_name = NULL;
msg.msg_namelen = 0;
- iov[0].iov_base = ptr;
+ iov[0].iov_base = (void *)ptr;
iov[0].iov_len = nbytes;
msg.msg_iov = iov;
msg.msg_iovlen = 1;
msg.msg_namelen = 0;
ZERO_STRUCT(iov);
- iov[0].iov_base = ptr;
+ iov[0].iov_base = (void *)ptr;
iov[0].iov_len = nbytes;
msg.msg_iov = iov;
msg.msg_iovlen = 1;