[Patch] fix some warnings in ldb
Volker Lendecke
Volker.Lendecke at SerNet.DE
Fri Aug 16 06:06:20 MDT 2013
On Thu, Aug 15, 2013 at 11:26:37PM -0700, Matthieu Patou wrote:
> Please review & push.
Could the first one also be fixed with the attached patch? I
don't think the const is strictly required here. I'm taking
a look at this code for the first time how, so it might be
perfectly possible that I'm missing something. But I think
if we can avoid a discard_const, we should do so.
Volker
--
SerNet GmbH, Bahnhofsallee 1b, 37081 Göttingen
phone: +49-551-370000-0, fax: +49-551-370000-9
AG Göttingen, HRB 2816, GF: Dr. Johannes Loxen
http://www.sernet.de, mailto:kontakt at sernet.de
-------------- next part --------------
From 597ff455001ef1219955fc7bbff52a154792fad0 Mon Sep 17 00:00:00 2001
From: Volker Lendecke <vl at samba.org>
Date: Fri, 16 Aug 2013 12:56:04 +0000
Subject: [PATCH] ldb: Fix a const warning
Signed-off-by: Volker Lendecke <vl at samba.org>
---
lib/ldb/ldb_map/ldb_map.c | 4 ++--
lib/ldb/ldb_map/ldb_map_private.h | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/lib/ldb/ldb_map/ldb_map.c b/lib/ldb/ldb_map/ldb_map.c
index d35e5c6..d95f050 100644
--- a/lib/ldb/ldb_map/ldb_map.c
+++ b/lib/ldb/ldb_map/ldb_map.c
@@ -869,9 +869,9 @@ static int map_objectclass_convert_operator(struct ldb_module *module, void *mem
* ============================== */
/* Build a request to search a record by its DN. */
-struct ldb_request *map_search_base_req(struct map_context *ac, struct ldb_dn *dn, const char * const *attrs, const struct ldb_parse_tree *tree, void *context, ldb_map_callback_t callback)
+struct ldb_request *map_search_base_req(struct map_context *ac, struct ldb_dn *dn, const char * const *attrs, struct ldb_parse_tree *tree, void *context, ldb_map_callback_t callback)
{
- const struct ldb_parse_tree *search_tree;
+ struct ldb_parse_tree *search_tree;
struct ldb_context *ldb;
struct ldb_request *req;
int ret;
diff --git a/lib/ldb/ldb_map/ldb_map_private.h b/lib/ldb/ldb_map/ldb_map_private.h
index 7faaa99..6e4a9dd 100644
--- a/lib/ldb/ldb_map/ldb_map_private.h
+++ b/lib/ldb/ldb_map/ldb_map_private.h
@@ -75,7 +75,7 @@ struct ldb_dn *ldb_dn_map_rebase_remote(struct ldb_module *module, void *mem_ctx
struct ldb_request *map_search_base_req(struct map_context *ac,
struct ldb_dn *dn,
const char * const *attrs,
- const struct ldb_parse_tree *tree,
+ struct ldb_parse_tree *tree,
void *context,
ldb_map_callback_t callback);
struct ldb_request *map_build_fixup_req(struct map_context *ac,
--
1.8.1.2
More information about the samba-technical
mailing list