From b6c4b63dc59d10e7f93e726282b6f93f64dd7bb8 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Tue, 30 Nov 2004 22:55:36 +0000 Subject: r4022: fix compiler warnings metze (This used to be commit 79d0eb2f677f9e985ba476a9680f68537d41be6f) --- source4/lib/ldb/ldb_tdb/ldb_index.c | 5 +++-- source4/lib/ldb/ldb_tdb/ldb_pack.c | 4 ++-- source4/lib/ldb/ldb_tdb/ldb_search.c | 2 +- source4/lib/ldb/ldb_tdb/ldb_tdb.h | 2 +- 4 files changed, 7 insertions(+), 6 deletions(-) (limited to 'source4/lib') diff --git a/source4/lib/ldb/ldb_tdb/ldb_index.c b/source4/lib/ldb/ldb_tdb/ldb_index.c index b651aa38c1..df0a436172 100644 --- a/source4/lib/ldb/ldb_tdb/ldb_index.c +++ b/source4/lib/ldb/ldb_tdb/ldb_index.c @@ -80,7 +80,7 @@ static char *ldb_dn_key(struct ldb_context *ldb, see if a attribute value is in the list of indexed attributes */ static int ldb_msg_find_idx(const struct ldb_message *msg, const char *attr, - int *v_idx, const char *key) + unsigned int *v_idx, const char *key) { unsigned int i, j; for (i=0;inum_elements;i++) { @@ -509,7 +509,8 @@ static int ldb_index_filter(struct ldb_module *module, struct ldb_parse_tree *tr const struct dn_list *dn_list, const char * const attrs[], struct ldb_message ***res) { - unsigned int count = 0, i; + unsigned int i; + int count = 0; for (i=0;icount;i++) { struct ldb_message msg; diff --git a/source4/lib/ldb/ldb_tdb/ldb_pack.c b/source4/lib/ldb/ldb_tdb/ldb_pack.c index 9515beeaa7..bfbc4841a6 100644 --- a/source4/lib/ldb/ldb_tdb/ldb_pack.c +++ b/source4/lib/ldb/ldb_tdb/ldb_pack.c @@ -44,7 +44,7 @@ #define LTDB_PACKING_FORMAT_NODN 0x26011966 /* use a portable integer format */ -static void put_uint32(uint8_t *p, int ofs, unsigned int val) +static void put_uint32(char *p, int ofs, unsigned int val) { p += ofs; p[0] = val&0xFF; @@ -53,7 +53,7 @@ static void put_uint32(uint8_t *p, int ofs, unsigned int val) p[3] = (val>>24) & 0xFF; } -static unsigned int pull_uint32(uint8_t *p, int ofs) +static unsigned int pull_uint32(char *p, int ofs) { p += ofs; return p[0] | (p[1]<<8) | (p[2]<<16) | (p[3]<<24); diff --git a/source4/lib/ldb/ldb_tdb/ldb_search.c b/source4/lib/ldb/ldb_tdb/ldb_search.c index 903c4cb802..27718a4c86 100644 --- a/source4/lib/ldb/ldb_tdb/ldb_search.c +++ b/source4/lib/ldb/ldb_tdb/ldb_search.c @@ -353,7 +353,7 @@ int ltdb_search_dn(struct ldb_module *module, char *dn, */ int ltdb_add_attr_results(struct ldb_module *module, struct ldb_message *msg, const char * const attrs[], - unsigned int *count, + int *count, struct ldb_message ***res) { struct ldb_context *ldb = module->ldb; diff --git a/source4/lib/ldb/ldb_tdb/ldb_tdb.h b/source4/lib/ldb/ldb_tdb/ldb_tdb.h index 7b926e21a2..2cc25b3152 100644 --- a/source4/lib/ldb/ldb_tdb/ldb_tdb.h +++ b/source4/lib/ldb/ldb_tdb/ldb_tdb.h @@ -90,7 +90,7 @@ int ltdb_search_dn(struct ldb_module *module, char *dn, const char * const attrs[], struct ldb_message ***res); int ltdb_add_attr_results(struct ldb_module *module, struct ldb_message *msg, const char * const attrs[], - unsigned int *count, + int *count, struct ldb_message ***res); int ltdb_search_free(struct ldb_module *module, struct ldb_message **msgs); int ltdb_search(struct ldb_module *module, const char *base, -- cgit