From 1593f77658cd0b2be7df107da7b33197da5edf7e Mon Sep 17 00:00:00 2001 From: Gary Lockyer Date: Fri, 7 Jun 2019 14:38:59 +1200 Subject: [PATCH] lib ldb ldb_key_value: csbuild unused parm ldb_kv MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Fixes csbuild error. Error: COMPILER_WARNING: lib/ldb/ldb_key_value/ldb_kv.c:158:33: warning: unused parameter ‘ldb_kv’ [-Wunused-parameter] Signed-off-by: Gary Lockyer Reviewed-by: Andreas Schneider --- lib/ldb/ldb_key_value/ldb_kv.c | 7 +++---- lib/ldb/ldb_key_value/ldb_kv.h | 3 +-- lib/ldb/ldb_key_value/ldb_kv_index.c | 2 +- 3 files changed, 5 insertions(+), 7 deletions(-) diff --git a/lib/ldb/ldb_key_value/ldb_kv.c b/lib/ldb/ldb_key_value/ldb_kv.c index aa857cb413a..27e65c331da 100644 --- a/lib/ldb/ldb_key_value/ldb_kv.c +++ b/lib/ldb/ldb_key_value/ldb_kv.c @@ -153,8 +153,7 @@ failed: } /* The caller is to provide a correctly sized key */ -int ldb_kv_guid_to_key(struct ldb_kv_private *ldb_kv, - const struct ldb_val *GUID_val, +int ldb_kv_guid_to_key(const struct ldb_val *GUID_val, struct ldb_val *key) { const char *GUID_prefix = LDB_KV_GUID_KEY_PREFIX; @@ -184,7 +183,7 @@ int ldb_kv_idx_to_key(struct ldb_module *module, struct ldb_dn *dn; if (ldb_kv->cache->GUID_index_attribute != NULL) { - return ldb_kv_guid_to_key(ldb_kv, idx_val, key); + return ldb_kv_guid_to_key(idx_val, key); } dn = ldb_dn_from_ldb_val(mem_ctx, ldb, idx_val); @@ -256,7 +255,7 @@ struct ldb_val ldb_kv_key_msg(struct ldb_module *module, } key.length = talloc_get_size(key.data); - ret = ldb_kv_guid_to_key(ldb_kv, guid_val, &key); + ret = ldb_kv_guid_to_key(guid_val, &key); if (ret != LDB_SUCCESS) { errno = EINVAL; diff --git a/lib/ldb/ldb_key_value/ldb_kv.h b/lib/ldb/ldb_key_value/ldb_kv.h index a8ba3fd60d9..3de29039a98 100644 --- a/lib/ldb/ldb_key_value/ldb_kv.h +++ b/lib/ldb/ldb_key_value/ldb_kv.h @@ -281,8 +281,7 @@ struct ldb_val ldb_kv_key_dn(TALLOC_CTX *mem_ctx, struct ldb_val ldb_kv_key_msg(struct ldb_module *module, TALLOC_CTX *mem_ctx, const struct ldb_message *msg); -int ldb_kv_guid_to_key(struct ldb_kv_private *ldb_kv, - const struct ldb_val *GUID_val, +int ldb_kv_guid_to_key(const struct ldb_val *GUID_val, struct ldb_val *key); int ldb_kv_idx_to_key(struct ldb_module *module, struct ldb_kv_private *ldb_kv, diff --git a/lib/ldb/ldb_key_value/ldb_kv_index.c b/lib/ldb/ldb_key_value/ldb_kv_index.c index eead0c7f56f..a2eb570917d 100644 --- a/lib/ldb/ldb_key_value/ldb_kv_index.c +++ b/lib/ldb/ldb_key_value/ldb_kv_index.c @@ -608,7 +608,7 @@ int ldb_kv_key_dn_from_idx(struct ldb_module *module, } /* The ldb_key memory is allocated by the caller */ - ret = ldb_kv_guid_to_key(ldb_kv, &list->dn[index], ldb_key); + ret = ldb_kv_guid_to_key(&list->dn[index], ldb_key); TALLOC_FREE(list); if (ret != LDB_SUCCESS) { -- 2.47.3