summaryrefslogtreecommitdiff
path: root/source4/dsdb/samdb/ldb_modules
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2008-12-23 22:57:11 +0100
committerJelmer Vernooij <jelmer@samba.org>2008-12-23 22:57:11 +0100
commitbd64688c6aca6512efd0bd7d95000579beea3119 (patch)
treec05cf6c484f03b967c95508c13cce8179e08d3bc /source4/dsdb/samdb/ldb_modules
parent32e03f9fa55a4c897ade55b9b2e3740facfdcfd1 (diff)
downloadsamba-bd64688c6aca6512efd0bd7d95000579beea3119.tar.gz
samba-bd64688c6aca6512efd0bd7d95000579beea3119.tar.bz2
samba-bd64688c6aca6512efd0bd7d95000579beea3119.zip
Fix more compiler warnings in various places.
Diffstat (limited to 'source4/dsdb/samdb/ldb_modules')
-rw-r--r--source4/dsdb/samdb/ldb_modules/kludge_acl.c8
-rw-r--r--source4/dsdb/samdb/ldb_modules/partition.c8
2 files changed, 8 insertions, 8 deletions
diff --git a/source4/dsdb/samdb/ldb_modules/kludge_acl.c b/source4/dsdb/samdb/ldb_modules/kludge_acl.c
index 275e9b5299..bb95c7ee5a 100644
--- a/source4/dsdb/samdb/ldb_modules/kludge_acl.c
+++ b/source4/dsdb/samdb/ldb_modules/kludge_acl.c
@@ -93,7 +93,7 @@ static int kludge_acl_allowedAttributes(struct ldb_context *ldb, struct ldb_mess
struct ldb_message_element *allowedAttributes;
const struct dsdb_schema *schema = dsdb_get_schema(ldb);
TALLOC_CTX *mem_ctx;
- char **objectclass_list, **attr_list;
+ const char **objectclass_list, **attr_list;
int i, ret;
/* If we don't have a schema yet, we can't do anything... */
@@ -118,7 +118,7 @@ static int kludge_acl_allowedAttributes(struct ldb_context *ldb, struct ldb_mess
we alter the element array in ldb_msg_add_empty() */
oc_el = ldb_msg_find_element(msg, "objectClass");
- objectclass_list = talloc_array(mem_ctx, char *, oc_el->num_values + 1);
+ objectclass_list = talloc_array(mem_ctx, const char *, oc_el->num_values + 1);
if (!objectclass_list) {
ldb_oom(ldb);
talloc_free(mem_ctx);
@@ -126,11 +126,11 @@ static int kludge_acl_allowedAttributes(struct ldb_context *ldb, struct ldb_mess
}
for (i=0; oc_el && i < oc_el->num_values; i++) {
- objectclass_list[i] = (char *)oc_el->values[i].data;
+ objectclass_list[i] = (const char *)oc_el->values[i].data;
}
objectclass_list[i] = NULL;
- attr_list = dsdb_full_attribute_list(mem_ctx, schema, (const char **)objectclass_list, DSDB_SCHEMA_ALL);
+ attr_list = dsdb_full_attribute_list(mem_ctx, schema, objectclass_list, DSDB_SCHEMA_ALL);
if (!attr_list) {
ldb_asprintf_errstring(ldb, "kludge_acl: Failed to get list of attributes create %s attribute", attrName);
talloc_free(mem_ctx);
diff --git a/source4/dsdb/samdb/ldb_modules/partition.c b/source4/dsdb/samdb/ldb_modules/partition.c
index 0d2ce64604..0000c87f72 100644
--- a/source4/dsdb/samdb/ldb_modules/partition.c
+++ b/source4/dsdb/samdb/ldb_modules/partition.c
@@ -1065,11 +1065,11 @@ static int partition_extended(struct ldb_module *module, struct ldb_request *req
static int partition_sort_compare(const void *v1, const void *v2)
{
- struct dsdb_control_current_partition *p1;
- struct dsdb_control_current_partition *p2;
+ const struct dsdb_control_current_partition *p1;
+ const struct dsdb_control_current_partition *p2;
- p1 = *((struct dsdb_control_current_partition **)v1);
- p2 = *((struct dsdb_control_current_partition **)v2);
+ p1 = *((struct dsdb_control_current_partition * const*)v1);
+ p2 = *((struct dsdb_control_current_partition * const*)v2);
return ldb_dn_compare(p1->dn, p2->dn);
}