summaryrefslogtreecommitdiff
path: root/source4/cluster/ctdb/client
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2007-09-08 13:27:14 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 15:05:41 -0500
commitdccf3f99e45137b6cd18c1de1c79808ad67130d1 (patch)
tree7c0f8e64f4ded3701818b8968171597eccd62267 /source4/cluster/ctdb/client
parentffeee68e4b72dd94fee57366bd8d38b8c284c3d4 (diff)
downloadsamba-dccf3f99e45137b6cd18c1de1c79808ad67130d1.tar.gz
samba-dccf3f99e45137b6cd18c1de1c79808ad67130d1.tar.bz2
samba-dccf3f99e45137b6cd18c1de1c79808ad67130d1.zip
r25027: Fix more warnings.
(This used to be commit 5085c53fcfade614e83d21fc2c1a5bc43bb2a729)
Diffstat (limited to 'source4/cluster/ctdb/client')
-rw-r--r--source4/cluster/ctdb/client/ctdb_client.c25
1 files changed, 13 insertions, 12 deletions
diff --git a/source4/cluster/ctdb/client/ctdb_client.c b/source4/cluster/ctdb/client/ctdb_client.c
index 626ecf01c7..7525b296d6 100644
--- a/source4/cluster/ctdb/client/ctdb_client.c
+++ b/source4/cluster/ctdb/client/ctdb_client.c
@@ -79,7 +79,7 @@ int ctdb_call_local(struct ctdb_db_context *ctdb_db, struct ctdb_call *call,
c->key = call->key;
c->call_data = &call->call_data;
- c->record_data.dptr = talloc_memdup(c, data->dptr, data->dsize);
+ c->record_data.dptr = (unsigned char *)talloc_memdup(c, data->dptr, data->dsize);
c->record_data.dsize = data->dsize;
CTDB_NO_MEMORY(ctdb, c->record_data.dptr);
c->new_data = NULL;
@@ -311,9 +311,10 @@ int ctdb_call_recv(struct ctdb_client_call_state *state, struct ctdb_call *call)
}
if (state->call.reply_data.dsize) {
- call->reply_data.dptr = talloc_memdup(state->ctdb_db,
- state->call.reply_data.dptr,
- state->call.reply_data.dsize);
+ call->reply_data.dptr = (unsigned char *)talloc_memdup(
+ state->ctdb_db,
+ state->call.reply_data.dptr,
+ state->call.reply_data.dsize);
call->reply_data.dsize = state->call.reply_data.dsize;
} else {
call->reply_data.dptr = NULL;
@@ -484,7 +485,7 @@ int ctdb_set_message_handler(struct ctdb_context *ctdb, uint64_t srvid,
/*
tell the daemon we no longer want a srvid
*/
-int ctdb_remove_message_handler(struct ctdb_context *ctdb, uint64_t srvid, void *private_data)
+static int ctdb_remove_message_handler(struct ctdb_context *ctdb, uint64_t srvid, void *private_data)
{
int res;
int32_t status;
@@ -580,7 +581,7 @@ struct ctdb_record_handle *ctdb_fetch_lock(struct ctdb_db_context *ctdb_db, TALL
h->ctdb_db = ctdb_db;
h->key = key;
- h->key.dptr = talloc_memdup(h, key.dptr, key.dsize);
+ h->key.dptr = (unsigned char *)talloc_memdup(h, key.dptr, key.dsize);
if (h->key.dptr == NULL) {
talloc_free(h);
return NULL;
@@ -812,7 +813,7 @@ int ctdb_control(struct ctdb_context *ctdb, uint32_t destnode, uint64_t srvid,
if (outdata) {
*outdata = state->outdata;
- outdata->dptr = talloc_memdup(mem_ctx, outdata->dptr, outdata->dsize);
+ outdata->dptr = (unsigned char *)talloc_memdup(mem_ctx, outdata->dptr, outdata->dsize);
}
*status = state->status;
@@ -1156,10 +1157,10 @@ int ctdb_ctrl_pulldb(struct ctdb_context *ctdb, uint32_t destnode, uint32_t dbid
rec = (struct ctdb_rec_data *)&reply->data[0];
for (i=0;i<reply->count;i++) {
- keys->keys[i].dptr = talloc_memdup(mem_ctx, &rec->data[0], rec->keylen);
+ keys->keys[i].dptr = (unsigned char *)talloc_memdup(mem_ctx, &rec->data[0], rec->keylen);
keys->keys[i].dsize = rec->keylen;
- keys->data[i].dptr = talloc_memdup(mem_ctx, &rec->data[keys->keys[i].dsize], rec->datalen);
+ keys->data[i].dptr = (unsigned char *)talloc_memdup(mem_ctx, &rec->data[keys->keys[i].dsize], rec->datalen);
keys->data[i].dsize = rec->datalen;
if (keys->data[i].dsize < sizeof(struct ctdb_ltdb_header)) {
@@ -1333,7 +1334,7 @@ int ctdb_ctrl_createdb(struct ctdb_context *ctdb, struct timeval timeout, uint32
int32_t res;
TDB_DATA data;
- data.dptr = discard_const(name);
+ data.dptr = (unsigned char *)discard_const(name);
data.dsize = strlen(name)+1;
ret = ctdb_control(ctdb, destnode, 0,
@@ -1468,7 +1469,7 @@ struct ctdb_db_context *ctdb_attach(struct ctdb_context *ctdb, const char *name)
ctdb_db->db_name = talloc_strdup(ctdb_db, name);
CTDB_NO_MEMORY_NULL(ctdb, ctdb_db->db_name);
- data.dptr = discard_const(name);
+ data.dptr = (unsigned char *)discard_const(name);
data.dsize = strlen(name)+1;
/* tell ctdb daemon to attach */
@@ -1929,7 +1930,7 @@ int ctdb_ctrl_get_tunable(struct ctdb_context *ctdb,
int ret;
data.dsize = offsetof(struct ctdb_control_get_tunable, name) + strlen(name) + 1;
- data.dptr = talloc_size(ctdb, data.dsize);
+ data.dptr = (unsigned char *)talloc_size(ctdb, data.dsize);
CTDB_NO_MEMORY(ctdb, data.dptr);
t = (struct ctdb_control_get_tunable *)data.dptr;