summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Dieter Wallnöfer <mdw@samba.org>2010-09-10 22:22:14 +0200
committerMatthias Dieter Wallnöfer <mdw@samba.org>2010-09-10 22:45:49 +0200
commit5c33ef2758d8e8d3978feef9056e79bce31c9d74 (patch)
tree64f6f454b5fd01e133b677eb8b840b3c4960647f
parentece428f02c981eea4b8a0997fbe55d5ecf39c1a0 (diff)
downloadsamba-5c33ef2758d8e8d3978feef9056e79bce31c9d74.tar.gz
samba-5c33ef2758d8e8d3978feef9056e79bce31c9d74.tar.bz2
samba-5c33ef2758d8e8d3978feef9056e79bce31c9d74.zip
s3/s4:libcli/tstream - add more "char *" casts in order to suppress Solaris warnings
-rw-r--r--libcli/named_pipe_auth/npa_tstream.c24
-rw-r--r--libcli/util/tstream.c4
2 files changed, 14 insertions, 14 deletions
diff --git a/libcli/named_pipe_auth/npa_tstream.c b/libcli/named_pipe_auth/npa_tstream.c
index f6ce951ef0..b0ef11fdfb 100644
--- a/libcli/named_pipe_auth/npa_tstream.c
+++ b/libcli/named_pipe_auth/npa_tstream.c
@@ -172,7 +172,7 @@ struct tevent_req *tstream_npa_connect_send(TALLOC_CTX *mem_ctx,
goto post;
}
- state->auth_req_iov.iov_base = state->auth_req_blob.data;
+ state->auth_req_iov.iov_base = (char *) state->auth_req_blob.data;
state->auth_req_iov.iov_len = state->auth_req_blob.length;
subreq = tstream_unix_connect_send(state,
@@ -313,7 +313,7 @@ static int tstream_npa_connect_next_vector(struct tstream_context *unix_stream,
if (!vector) {
return -1;
}
- vector[0].iov_base = state->auth_rep_blob.data + ofs;
+ vector[0].iov_base = (char *) (state->auth_rep_blob.data + ofs);
vector[0].iov_len = state->auth_rep_blob.length - ofs;
count = 1;
@@ -575,7 +575,7 @@ static struct tevent_req *tstream_npa_readv_send(TALLOC_CTX *mem_ctx,
memcpy(base, pbase + ofs, left);
base += left;
- state->vector[0].iov_base = base;
+ state->vector[0].iov_base = (char *) base;
state->vector[0].iov_len -= left;
ofs += left;
@@ -600,7 +600,7 @@ static struct tevent_req *tstream_npa_readv_send(TALLOC_CTX *mem_ctx,
if (left > 0) {
memmove(pbase, pbase + ofs, left);
- npas->pending.iov_base = pbase;
+ npas->pending.iov_base = (char *) pbase;
npas->pending.iov_len = left;
/*
* this cannot fail and even if it
@@ -608,7 +608,7 @@ static struct tevent_req *tstream_npa_readv_send(TALLOC_CTX *mem_ctx,
*/
pbase = talloc_realloc(npas, pbase, uint8_t, left);
if (pbase) {
- npas->pending.iov_base = pbase;
+ npas->pending.iov_base = (char *) pbase;
}
pbase = NULL;
}
@@ -696,7 +696,7 @@ static int tstream_npa_readv_next_vector(struct tstream_context *unix_stream,
return -1;
}
ZERO_STRUCT(state->hdr);
- vector[0].iov_base = state->hdr;
+ vector[0].iov_base = (char *) state->hdr;
vector[0].iov_len = sizeof(state->hdr);
count = 1;
@@ -732,11 +732,11 @@ static int tstream_npa_readv_next_vector(struct tstream_context *unix_stream,
if (left < state->vector[0].iov_len) {
uint8_t *base;
base = (uint8_t *)state->vector[0].iov_base;
- vector[count].iov_base = base;
+ vector[count].iov_base = (char *) base;
vector[count].iov_len = left;
count++;
base += left;
- state->vector[0].iov_base = base;
+ state->vector[0].iov_base = (char *) base;
state->vector[0].iov_len -= left;
break;
}
@@ -754,7 +754,7 @@ static int tstream_npa_readv_next_vector(struct tstream_context *unix_stream,
* into the pending buffer, where the next readv can
* be served from.
*/
- npas->pending.iov_base = talloc_array(npas, uint8_t, left);
+ npas->pending.iov_base = talloc_array(npas, char, left);
if (!npas->pending.iov_base) {
return -1;
}
@@ -865,7 +865,7 @@ static struct tevent_req *tstream_npa_writev_send(TALLOC_CTX *mem_ctx,
if (tevent_req_nomem(new_vector, req)) {
goto post;
}
- new_vector[0].iov_base = state->hdr;
+ new_vector[0].iov_base = (char *) state->hdr;
new_vector[0].iov_len = sizeof(state->hdr);
memcpy(new_vector + 1, vector, sizeof(struct iovec)*count);
@@ -1238,7 +1238,7 @@ static int tstream_npa_accept_next_vector(struct tstream_context *unix_stream,
if (!vector) {
return -1;
}
- vector[0].iov_base = state->npa_blob.data + ofs;
+ vector[0].iov_base = (char *) (state->npa_blob.data + ofs);
vector[0].iov_len = state->npa_blob.length - ofs;
count = 1;
@@ -1442,7 +1442,7 @@ reply:
state->accept_status = pipe_reply.status;
- state->out_iov.iov_base = out.data;
+ state->out_iov.iov_base = (char *) out.data;
state->out_iov.iov_len = out.length;
subreq = tstream_writev_send(state, state->ev,
diff --git a/libcli/util/tstream.c b/libcli/util/tstream.c
index 9c42ca1f4e..5d0e561193 100644
--- a/libcli/util/tstream.c
+++ b/libcli/util/tstream.c
@@ -75,7 +75,7 @@ struct tevent_req *tstream_read_pdu_blob_send(TALLOC_CTX *mem_ctx,
state->pdu_blob.data = buf;
state->pdu_blob.length = initial_read_size;
- state->tmp_vector.iov_base = buf;
+ state->tmp_vector.iov_base = (char *) buf;
state->tmp_vector.iov_len = initial_read_size;
subreq = tstream_readv_send(state, ev, stream, &state->tmp_vector, 1);
@@ -128,7 +128,7 @@ static void tstream_read_pdu_blob_done(struct tevent_req *subreq)
state->pdu_blob.data = buf;
state->pdu_blob.length = pdu_size;
- state->tmp_vector.iov_base = buf + state->tmp_vector.iov_len;
+ state->tmp_vector.iov_base = (char *) (buf + state->tmp_vector.iov_len);
state->tmp_vector.iov_len = pdu_size - state->tmp_vector.iov_len;
subreq = tstream_readv_send(state,