From 397d7171c0fa49833153ccfa4719b0f7d6a87cb6 Mon Sep 17 00:00:00 2001 From: Hallvard Furuseth Date: Wed, 27 Jul 2005 08:44:11 +0000 Subject: [PATCH] Silence unused variable warnings with #ifdef LDAP_CONTROL_X_CHAINING_BEHAVIOR --- servers/slapd/back-ldap/chain.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/servers/slapd/back-ldap/chain.c b/servers/slapd/back-ldap/chain.c index 42ef4d923a..4b1bc2433b 100644 --- a/servers/slapd/back-ldap/chain.c +++ b/servers/slapd/back-ldap/chain.c @@ -679,9 +679,11 @@ enum { PC_CHAINING = 1 }; +#ifdef LDAP_CONTROL_X_CHAINING_BEHAVIOR static ConfigDriver chain_cf_gen; -static ConfigLDAPadd chain_ldadd; static ConfigCfAdd chain_cfadd; +#endif +static ConfigLDAPadd chain_ldadd; static ConfigTable chaincfg[] = { #ifdef LDAP_CONTROL_X_CHAINING_BEHAVIOR @@ -719,6 +721,8 @@ chain_ldadd( CfEntryInfo *p, Entry *e, ConfigArgs *ca ) return LDAP_SUCCESS; } +#ifdef LDAP_CONTROL_X_CHAINING_BEHAVIOR + static int chain_cfadd( Operation *op, SlapReply *rs, Entry *p, ConfigArgs *ca ) { @@ -742,7 +746,6 @@ chain_cfadd( Operation *op, SlapReply *rs, Entry *p, ConfigArgs *ca ) return 0; } -#ifdef LDAP_CONTROL_X_CHAINING_BEHAVIOR static slap_verbmasks chaining_mode[] = { { BER_BVC("referralsRequired"), LDAP_REFERRALS_REQUIRED }, { BER_BVC("referralsPreferred"), LDAP_REFERRALS_PREFERRED }, @@ -750,13 +753,14 @@ static slap_verbmasks chaining_mode[] = { { BER_BVC("chainingPreferred"), LDAP_CHAINING_PREFERRED }, { BER_BVNULL, 0 } }; -#endif static int chain_cf_gen( ConfigArgs *c ) { slap_overinst *on = (slap_overinst *)c->bi; +#ifdef LDAP_CONTROL_X_CHAINING_BEHAVIOR ldap_chain_t *lc = (ldap_chain_t *)on->on_bi.bi_private; +#endif int rc = 0; @@ -935,6 +939,8 @@ chain_cf_gen( ConfigArgs *c ) return rc; } +#endif /* LDAP_CONTROL_X_CHAINING_BEHAVIOR */ + static int ldap_chain_db_config( BackendDB *be, -- 2.39.5