From edc6a89398f1fff9de55e77e84b441bfab955869 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Wed, 29 Oct 2014 11:52:37 +0100 Subject: [PATCH] lib/ldb: fix compiler warnings in ldb_modules_list_from_string() Signed-off-by: Stefan Metzmacher Reviewed-by: Jeremy Allison --- lib/ldb/common/ldb_modules.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/ldb/common/ldb_modules.c b/lib/ldb/common/ldb_modules.c index 05a8d8aa1dc..91412a69aee 100644 --- a/lib/ldb/common/ldb_modules.c +++ b/lib/ldb/common/ldb_modules.c @@ -87,7 +87,7 @@ const char **ldb_modules_list_from_string(struct ldb_context *ldb, TALLOC_CTX *m if (modstr[0] == '\0') { modules[0] = NULL; - m = (const char **)modules; + m = discard_const_p(const char *, modules); return m; } @@ -110,7 +110,7 @@ const char **ldb_modules_list_from_string(struct ldb_context *ldb, TALLOC_CTX *m modules[i + 1] = NULL; - m = (const char **)modules; + m = discard_const_p(const char *, modules); return m; }