summaryrefslogtreecommitdiff
path: root/source3/lib/ldb/ldb_ldap/ldb_ldap.c
diff options
context:
space:
mode:
authorVolker Lendecke <vlendec@samba.org>2006-11-27 08:41:41 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:16:09 -0500
commit847644bdac520a3cca7f30ffa50c0de3eeedf6d9 (patch)
tree94026c95cc94cfbf00da44dd0b32da29aa07f747 /source3/lib/ldb/ldb_ldap/ldb_ldap.c
parentfb5d4f9c863c5486eed607dfb723254411758f89 (diff)
downloadsamba-847644bdac520a3cca7f30ffa50c0de3eeedf6d9.tar.gz
samba-847644bdac520a3cca7f30ffa50c0de3eeedf6d9.tar.bz2
samba-847644bdac520a3cca7f30ffa50c0de3eeedf6d9.zip
r19917: Fix warnings
(This used to be commit cf4309b9048a8417104cac660421a3dcd2e96ffe)
Diffstat (limited to 'source3/lib/ldb/ldb_ldap/ldb_ldap.c')
-rw-r--r--source3/lib/ldb/ldb_ldap/ldb_ldap.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/source3/lib/ldb/ldb_ldap/ldb_ldap.c b/source3/lib/ldb/ldb_ldap/ldb_ldap.c
index cdc1a500f8..6dc52b2484 100644
--- a/source3/lib/ldb/ldb_ldap/ldb_ldap.c
+++ b/source3/lib/ldb/ldb_ldap/ldb_ldap.c
@@ -154,7 +154,8 @@ static LDAPMod **lldb_msg_to_mods(void *mem_ctx, const struct ldb_message *msg,
if (!mods[num_mods]->mod_vals.modv_bvals[j]) {
goto failed;
}
- mods[num_mods]->mod_vals.modv_bvals[j]->bv_val = el->values[j].data;
+ mods[num_mods]->mod_vals.modv_bvals[j]->bv_val =
+ (char *)el->values[j].data;
mods[num_mods]->mod_vals.modv_bvals[j]->bv_len = el->values[j].length;
}
mods[num_mods]->mod_vals.modv_bvals[j] = NULL;
@@ -212,7 +213,8 @@ static int lldb_add_msg_attr(struct ldb_context *ldb,
for (i=0;i<count;i++) {
/* we have to ensure this is null terminated so that
ldb_msg_find_attr_as_string() can work */
- el->values[i].data = talloc_size(el->values, bval[i]->bv_len+1);
+ el->values[i].data =
+ (uint8_t *)talloc_size(el->values, bval[i]->bv_len+1);
if (!el->values[i].data) {
errno = ENOMEM;
return -1;
@@ -270,7 +272,9 @@ static int lldb_search(struct ldb_module *module, struct ldb_request *req)
return LDB_ERR_OPERATIONS_ERROR;
}
- expression = ldb_filter_from_tree(lldb_ac, req->op.search.tree);
+ expression = ldb_filter_from_tree(
+ lldb_ac,
+ CONST_DISCARD(struct ldb_parse_tree *, req->op.search.tree));
if (expression == NULL) {
return LDB_ERR_OPERATIONS_ERROR;
}