From c403dd11fb33755809a23338ecac99676d766b88 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Mon, 9 Oct 2006 08:00:18 +0000 Subject: r19188: merge from samba3: fix compiler warnings metze (This used to be commit dc139d8715f58b27363266f1426da451907845eb) --- source4/lib/ldb/common/ldb_parse.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'source4/lib/ldb/common/ldb_parse.c') diff --git a/source4/lib/ldb/common/ldb_parse.c b/source4/lib/ldb/common/ldb_parse.c index d9044a8b0c..26f88769e6 100644 --- a/source4/lib/ldb/common/ldb_parse.c +++ b/source4/lib/ldb/common/ldb_parse.c @@ -67,7 +67,7 @@ struct ldb_val ldb_binary_decode(void *mem_ctx, const char *str) struct ldb_val ret; int slen = str?strlen(str):0; - ret.data = talloc_size(mem_ctx, slen+1); + ret.data = (uint8_t *)talloc_size(mem_ctx, slen+1); ret.length = 0; if (ret.data == NULL) return ret; @@ -134,7 +134,7 @@ char *ldb_binary_encode(void *mem_ctx, struct ldb_val val) char *ldb_binary_encode_string(void *mem_ctx, const char *string) { struct ldb_val val; - val.data = discard_const(string); + val.data = discard_const_p(uint8_t, string); val.length = strlen(string); return ldb_binary_encode(mem_ctx, val); } @@ -285,7 +285,7 @@ static enum ldb_parse_op ldb_parse_filtertype(void *mem_ctx, char **type, char * } /* save name */ - name = talloc_memdup(mem_ctx, t, t1 - t + 1); + name = (char *)talloc_memdup(mem_ctx, t, t1 - t + 1); if (name == NULL) return 0; name[t1 - t] = '\0'; @@ -326,7 +326,7 @@ static enum ldb_parse_op ldb_parse_filtertype(void *mem_ctx, char **type, char * while (*p && ((*p != ')') || ((*p == ')') && (*(p - 1) == '\\')))) p++; - val = talloc_memdup(mem_ctx, t, p - t + 1); + val = (char *)talloc_memdup(mem_ctx, t, p - t + 1); if (val == NULL) { talloc_free(name); return 0; -- cgit