summaryrefslogtreecommitdiff
path: root/source4/lib/ldb
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2007-09-07 15:08:14 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 15:05:27 -0500
commitcd962355abad90a2161765a7be7d26e63572cab7 (patch)
tree21a1e180cfa6396c491301e3e171d8105208bb44 /source4/lib/ldb
parent6c79213eb80283bb211d2e2161c25337c0a549b7 (diff)
downloadsamba-cd962355abad90a2161765a7be7d26e63572cab7.tar.gz
samba-cd962355abad90a2161765a7be7d26e63572cab7.tar.bz2
samba-cd962355abad90a2161765a7be7d26e63572cab7.zip
r25000: Fix some more C++ compatibility warnings.
(This used to be commit 08bb1ef643ab906f1645cf6f32763dc73b1884e4)
Diffstat (limited to 'source4/lib/ldb')
-rw-r--r--source4/lib/ldb/ldb_tdb/ldb_cache.c16
-rw-r--r--source4/lib/ldb/ldb_tdb/ldb_index.c12
-rw-r--r--source4/lib/ldb/ldb_tdb/ldb_search.c6
3 files changed, 17 insertions, 17 deletions
diff --git a/source4/lib/ldb/ldb_tdb/ldb_cache.c b/source4/lib/ldb/ldb_tdb/ldb_cache.c
index 6bbf31dee7..a7f72dd6d0 100644
--- a/source4/lib/ldb/ldb_tdb/ldb_cache.c
+++ b/source4/lib/ldb/ldb_tdb/ldb_cache.c
@@ -58,7 +58,7 @@ static const struct {
*/
static void ltdb_attributes_unload(struct ldb_module *module)
{
- struct ltdb_private *ltdb = module->private_data;
+ struct ltdb_private *ltdb = (struct ltdb_private *)module->private_data;
struct ldb_message *msg;
int i;
@@ -105,7 +105,7 @@ static int ltdb_attributes_flags(struct ldb_message_element *el, unsigned *v)
*/
static int ltdb_attributes_load(struct ldb_module *module)
{
- struct ltdb_private *ltdb = module->private_data;
+ struct ltdb_private *ltdb = (struct ltdb_private *)module->private_data;
struct ldb_message *msg = ltdb->cache->attributes;
struct ldb_dn *dn;
int i, r;
@@ -172,7 +172,7 @@ failed:
*/
static int ltdb_subclasses_load(struct ldb_module *module)
{
- struct ltdb_private *ltdb = module->private_data;
+ struct ltdb_private *ltdb = (struct ltdb_private *)module->private_data;
struct ldb_message *msg = ltdb->cache->subclasses;
struct ldb_dn *dn;
int i, j, r;
@@ -208,7 +208,7 @@ failed:
*/
static void ltdb_subclasses_unload(struct ldb_module *module)
{
- struct ltdb_private *ltdb = module->private_data;
+ struct ltdb_private *ltdb = (struct ltdb_private *)module->private_data;
struct ldb_message *msg;
int i;
@@ -232,7 +232,7 @@ static void ltdb_subclasses_unload(struct ldb_module *module)
*/
static int ltdb_baseinfo_init(struct ldb_module *module)
{
- struct ltdb_private *ltdb = module->private_data;
+ struct ltdb_private *ltdb = (struct ltdb_private *)module->private_data;
struct ldb_message *msg;
struct ldb_message_element el;
struct ldb_val val;
@@ -285,7 +285,7 @@ failed:
*/
static void ltdb_cache_free(struct ldb_module *module)
{
- struct ltdb_private *ltdb = module->private_data;
+ struct ltdb_private *ltdb = (struct ltdb_private *)module->private_data;
ltdb->sequence_number = 0;
talloc_free(ltdb->cache);
@@ -308,7 +308,7 @@ int ltdb_cache_reload(struct ldb_module *module)
*/
int ltdb_cache_load(struct ldb_module *module)
{
- struct ltdb_private *ltdb = module->private_data;
+ struct ltdb_private *ltdb = (struct ltdb_private *)module->private_data;
struct ldb_dn *baseinfo_dn = NULL;
struct ldb_dn *indexlist_dn = NULL;
uint64_t seq;
@@ -417,7 +417,7 @@ failed:
*/
int ltdb_increase_sequence_number(struct ldb_module *module)
{
- struct ltdb_private *ltdb = module->private_data;
+ struct ltdb_private *ltdb = (struct ltdb_private *)module->private_data;
struct ldb_message *msg;
struct ldb_message_element el[2];
struct ldb_val val;
diff --git a/source4/lib/ldb/ldb_tdb/ldb_index.c b/source4/lib/ldb/ldb_tdb/ldb_index.c
index 1fe697f277..bcab3acafe 100644
--- a/source4/lib/ldb/ldb_tdb/ldb_index.c
+++ b/source4/lib/ldb/ldb_tdb/ldb_index.c
@@ -45,7 +45,7 @@ static int ldb_list_find(const void *needle,
const void *base, size_t nmemb, size_t size,
comparison_fn_t comp_fn)
{
- const char *base_p = base;
+ const char *base_p = (const char *)base;
size_t min_i, max_i, test_i;
if (nmemb == 0) {
@@ -1014,7 +1014,7 @@ static int ltdb_index_add1(struct ldb_module *module, const char *dn,
static int ltdb_index_add0(struct ldb_module *module, const char *dn,
struct ldb_message_element *elements, int num_el)
{
- struct ltdb_private *ltdb = module->private_data;
+ struct ltdb_private *ltdb = (struct ltdb_private *)module->private_data;
int ret;
unsigned int i, j;
@@ -1138,7 +1138,7 @@ int ltdb_index_del_value(struct ldb_module *module, const char *dn,
*/
int ltdb_index_del(struct ldb_module *module, const struct ldb_message *msg)
{
- struct ltdb_private *ltdb = module->private_data;
+ struct ltdb_private *ltdb = (struct ltdb_private *)module->private_data;
int ret;
const char *dn;
unsigned int i, j;
@@ -1180,7 +1180,7 @@ int ltdb_index_del(struct ldb_module *module, const struct ldb_message *msg)
*/
int ltdb_index_one(struct ldb_module *module, const struct ldb_message *msg, int add)
{
- struct ltdb_private *ltdb = module->private_data;
+ struct ltdb_private *ltdb = (struct ltdb_private *)module->private_data;
struct ldb_message_element el;
struct ldb_val val;
struct ldb_dn *pdn;
@@ -1244,7 +1244,7 @@ static int delete_index(struct tdb_context *tdb, TDB_DATA key, TDB_DATA data, vo
*/
static int re_index(struct tdb_context *tdb, TDB_DATA key, TDB_DATA data, void *state)
{
- struct ldb_module *module = state;
+ struct ldb_module *module = (struct ldb_module *)state;
struct ldb_message *msg;
const char *dn = NULL;
int ret;
@@ -1309,7 +1309,7 @@ static int re_index(struct tdb_context *tdb, TDB_DATA key, TDB_DATA data, void *
*/
int ltdb_reindex(struct ldb_module *module)
{
- struct ltdb_private *ltdb = module->private_data;
+ struct ltdb_private *ltdb = (struct ltdb_private *)module->private_data;
int ret;
if (ltdb_cache_reload(module) != 0) {
diff --git a/source4/lib/ldb/ldb_tdb/ldb_search.c b/source4/lib/ldb/ldb_tdb/ldb_search.c
index 013b341d42..a195a39391 100644
--- a/source4/lib/ldb/ldb_tdb/ldb_search.c
+++ b/source4/lib/ldb/ldb_tdb/ldb_search.c
@@ -210,7 +210,7 @@ static struct ldb_message *ltdb_pull_attrs(struct ldb_module *module,
*/
int ltdb_search_dn1(struct ldb_module *module, struct ldb_dn *dn, struct ldb_message *msg)
{
- struct ltdb_private *ltdb = module->private_data;
+ struct ltdb_private *ltdb = (struct ltdb_private *)module->private_data;
int ret;
TDB_DATA tdb_key, tdb_data;
@@ -252,7 +252,7 @@ int ltdb_search_dn1(struct ldb_module *module, struct ldb_dn *dn, struct ldb_mes
*/
static int ltdb_lock_read(struct ldb_module *module)
{
- struct ltdb_private *ltdb = module->private_data;
+ struct ltdb_private *ltdb = (struct ltdb_private *)module->private_data;
return tdb_lockall_read(ltdb->tdb);
}
@@ -261,7 +261,7 @@ static int ltdb_lock_read(struct ldb_module *module)
*/
static int ltdb_unlock_read(struct ldb_module *module)
{
- struct ltdb_private *ltdb = module->private_data;
+ struct ltdb_private *ltdb = (struct ltdb_private *)module->private_data;
return tdb_unlockall_read(ltdb->tdb);
}