summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2008-08-24 12:43:36 +0200
committerVolker Lendecke <vl@samba.org>2008-08-24 12:48:23 +0200
commit3d13cdfa92221907f1bfce400e5eb1d02abf72c8 (patch)
treef2e836dd3e2d0943f77634506d685b34fb51cd2d
parent1924e7931cf83124529edb79620a8494ddcad0e9 (diff)
downloadsamba-3d13cdfa92221907f1bfce400e5eb1d02abf72c8.tar.gz
samba-3d13cdfa92221907f1bfce400e5eb1d02abf72c8.tar.bz2
samba-3d13cdfa92221907f1bfce400e5eb1d02abf72c8.zip
Fix some C++ warnings
(This used to be commit dd9e4e6db04acf20f6ef7705955358c7ca442bbd)
-rw-r--r--source3/lib/dbwrap_ctdb.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/source3/lib/dbwrap_ctdb.c b/source3/lib/dbwrap_ctdb.c
index 7c1ef8fed8..d173ab4006 100644
--- a/source3/lib/dbwrap_ctdb.c
+++ b/source3/lib/dbwrap_ctdb.c
@@ -130,7 +130,8 @@ static struct ctdb_marshall_buffer *db_ctdb_marshall_add(TALLOC_CTX *mem_ctx,
}
if (m == NULL) {
- m = talloc_zero_size(mem_ctx, offsetof(struct ctdb_marshall_buffer, data));
+ m = (struct ctdb_marshall_buffer *)talloc_zero_size(
+ mem_ctx, offsetof(struct ctdb_marshall_buffer, data));
if (m == NULL) {
return NULL;
}
@@ -140,7 +141,8 @@ static struct ctdb_marshall_buffer *db_ctdb_marshall_add(TALLOC_CTX *mem_ctx,
m_size = talloc_get_size(m);
r_size = talloc_get_size(r);
- m2 = talloc_realloc_size(mem_ctx, m, m_size + r_size);
+ m2 = (struct ctdb_marshall_buffer *)talloc_realloc_size(
+ mem_ctx, m, m_size + r_size);
if (m2 == NULL) {
talloc_free(m);
return NULL;
@@ -228,7 +230,7 @@ static int db_ctdb_transaction_fetch_start(struct db_ctdb_transaction_handle *h)
struct db_ctdb_ctx *ctx = h->ctx;
TDB_DATA data;
- key.dptr = discard_const(keyname);
+ key.dptr = (uint8_t *)discard_const(keyname);
key.dsize = strlen(keyname);
again:
@@ -492,7 +494,7 @@ static int db_ctdb_transaction_store(struct db_ctdb_transaction_handle *h,
}
rec.dsize = data.dsize + sizeof(struct ctdb_ltdb_header);
- rec.dptr = talloc_size(tmp_ctx, rec.dsize);
+ rec.dptr = (uint8_t *)talloc_size(tmp_ctx, rec.dsize);
if (rec.dptr == NULL) {
DEBUG(0,(__location__ " Failed to alloc record\n"));
talloc_free(tmp_ctx);