From dc414747a7ce53992856be8d3984d4a68de5227a Mon Sep 17 00:00:00 2001 From: Pierangelo Masarati Date: Tue, 16 Sep 2008 14:44:24 +0000 Subject: [PATCH] silence warnings --- servers/slapd/back-bdb/dn2id.c | 1 - servers/slapd/back-bdb/tools.c | 2 +- servers/slapd/back-ldap/init.c | 4 ---- servers/slapd/backover.c | 2 +- servers/slapd/bconfig.c | 4 +--- servers/slapd/overlays/collect.c | 4 +++- servers/slapd/overlays/constraint.c | 1 - servers/slapd/overlays/syncprov.c | 3 --- 8 files changed, 6 insertions(+), 15 deletions(-) diff --git a/servers/slapd/back-bdb/dn2id.c b/servers/slapd/back-bdb/dn2id.c index d28ed33f73..ec1d70c69a 100644 --- a/servers/slapd/back-bdb/dn2id.c +++ b/servers/slapd/back-bdb/dn2id.c @@ -620,7 +620,6 @@ hdb_dn2id_add( } } -func_leave: op->o_tmpfree( d, op->o_tmpmemctx ); Debug( LDAP_DEBUG_TRACE, "<= hdb_dn2id_add 0x%lx: %d\n", e->e_id, rc, 0 ); diff --git a/servers/slapd/back-bdb/tools.c b/servers/slapd/back-bdb/tools.c index 235e35042e..eb09962c78 100644 --- a/servers/slapd/back-bdb/tools.c +++ b/servers/slapd/back-bdb/tools.c @@ -241,7 +241,6 @@ ID bdb_tool_dn2id_get( Entry* bdb_tool_entry_get( BackendDB *be, ID id ) { - struct bdb_info *bdb = (struct bdb_info *) be->be_private; Entry *e = NULL; char *dptr; int rc, eoff; @@ -298,6 +297,7 @@ Entry* bdb_tool_entry_get( BackendDB *be, ID id ) e->e_id = id; #ifdef BDB_HIER if ( slapMode & SLAP_TOOL_READONLY ) { + struct bdb_info *bdb = (struct bdb_info *) be->be_private; EntryInfo *ei = NULL; Operation op = {0}; Opheader ohdr = {0}; diff --git a/servers/slapd/back-ldap/init.c b/servers/slapd/back-ldap/init.c index fa32fd47f4..22d7adc53f 100644 --- a/servers/slapd/back-ldap/init.c +++ b/servers/slapd/back-ldap/init.c @@ -233,14 +233,10 @@ ldap_back_db_open( BackendDB *be, ConfigReply *cr ) if ( rc != 0 ) { /* ignore by now */ rc = 0; -#if 0 - goto fail; -#endif } li->li_flags |= LDAP_BACK_F_ISOPEN; -fail:; return rc; } diff --git a/servers/slapd/backover.c b/servers/slapd/backover.c index e14a0192a5..f0194a739d 100644 --- a/servers/slapd/backover.c +++ b/servers/slapd/backover.c @@ -1107,7 +1107,7 @@ void overlay_remove( BackendDB *be, slap_overinst *on ) { slap_overinfo *oi = on->on_info; - slap_overinst **oidx, *on2; + slap_overinst **oidx; /* remove overlay from oi_list an call db_close and db_destroy * handlers */ diff --git a/servers/slapd/bconfig.c b/servers/slapd/bconfig.c index 56a9fdb151..6aa066c766 100644 --- a/servers/slapd/bconfig.c +++ b/servers/slapd/bconfig.c @@ -5236,8 +5236,6 @@ config_back_delete( Operation *op, SlapReply *rs ) CfBackInfo *cfb; CfEntryInfo *ce, *last, *ce2; - slap_mask_t mask; - cfb = (CfBackInfo *)op->o_bd->be_private; ce = config_find_base( cfb->cb_root, &op->o_req_ndn, &last ); @@ -5249,7 +5247,7 @@ config_back_delete( Operation *op, SlapReply *rs ) rs->sr_err = LDAP_UNWILLING_TO_PERFORM; } else if ( ce->ce_type == Cft_Overlay || ce->ce_type == Cft_Database ){ char *iptr; - int count, ixold, rc; + int count, ixold; ldap_pvt_thread_pool_pause( &connection_pool ); diff --git a/servers/slapd/overlays/collect.c b/servers/slapd/overlays/collect.c index 00834d3c06..4852022f95 100644 --- a/servers/slapd/overlays/collect.c +++ b/servers/slapd/overlays/collect.c @@ -31,6 +31,8 @@ #include "slap.h" #include "config.h" +#include "lutil.h" + /* This is a cheap hack to implement a collective attribute. * * This demonstration overlay looks for a specified attribute in an @@ -266,7 +268,7 @@ collect_modify( Operation *op, SlapReply *rs) collect_info *ci = on->on_bi.bi_private; Modifications *ml; char errMsg[100]; - int rc, idx; + int idx; for ( ml = op->orm_modlist; ml != NULL; ml = ml->sml_next) { for (; ci; ci=ci->ci_next ) { diff --git a/servers/slapd/overlays/constraint.c b/servers/slapd/overlays/constraint.c index 4e958e05a5..6d8b40e5e7 100644 --- a/servers/slapd/overlays/constraint.c +++ b/servers/slapd/overlays/constraint.c @@ -498,7 +498,6 @@ static int constraint_add( Operation *op, SlapReply *rs ) { slap_overinst *on = (slap_overinst *) op->o_bd->bd_info; - Backend *be = op->o_bd; Attribute *a; constraint *c = on->on_bi.bi_private, *cp; BerVarray b = NULL; diff --git a/servers/slapd/overlays/syncprov.c b/servers/slapd/overlays/syncprov.c index 5c9cff1317..e05ee7fe47 100644 --- a/servers/slapd/overlays/syncprov.c +++ b/servers/slapd/overlays/syncprov.c @@ -393,9 +393,6 @@ static struct berval generic_filterstr = BER_BVC("(objectclass=*)"); static int syncprov_findbase( Operation *op, fbase_cookie *fc ) { - opcookie *opc = op->o_callback->sc_private; - slap_overinst *on = opc->son; - /* Use basic parameters from syncrepl search, but use * current op's threadctx / tmpmemctx */ -- 2.39.5