From: Hallvard Furuseth Date: Thu, 30 Dec 2010 23:34:55 +0000 (+0000) Subject: Remove lint (unused vars/labels/funcs/default:s) X-Git-Tag: MIGRATION_CVS2GIT~314 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=cd6e9156e72f4c7b529ad0685cd2a2b3afc41790;p=openldap Remove lint (unused vars/labels/funcs/default:s) --- diff --git a/contrib/slapd-modules/nssov/pam.c b/contrib/slapd-modules/nssov/pam.c index 6d6702c67f..3a074b3074 100644 --- a/contrib/slapd-modules/nssov/pam.c +++ b/contrib/slapd-modules/nssov/pam.c @@ -206,7 +206,6 @@ int pam_authc(nssov_info *ni,TFILE *fp,Operation *op) int32_t tmpint32; int rc; slap_callback cb = {0}; - SlapReply rs = {REP_RESULT}; char dnc[1024]; char uidc[32]; char svcc[256]; diff --git a/contrib/slapd-modules/usn/usn.c b/contrib/slapd-modules/usn/usn.c index cfb882dfc3..bbf09c5cbb 100644 --- a/contrib/slapd-modules/usn/usn.c +++ b/contrib/slapd-modules/usn/usn.c @@ -233,7 +233,6 @@ usn_db_close( void *thrctx; Modifications mod; - SlapReply rsm = { 0 }; slap_callback cb = {0}; char intbuf[64]; struct berval bv[2]; diff --git a/servers/slapd/back-bdb/compare.c b/servers/slapd/back-bdb/compare.c index 095033eb14..e11c03ea42 100644 --- a/servers/slapd/back-bdb/compare.c +++ b/servers/slapd/back-bdb/compare.c @@ -27,7 +27,6 @@ bdb_compare( Operation *op, SlapReply *rs ) struct bdb_info *bdb = (struct bdb_info *) op->o_bd->be_private; Entry *e = NULL; EntryInfo *ei; - Attribute *a; int manageDSAit = get_manageDSAit( op ); DB_TXN *rtxn; diff --git a/servers/slapd/back-bdb/dn2id.c b/servers/slapd/back-bdb/dn2id.c index dc7132bb8e..7de67bfe93 100644 --- a/servers/slapd/back-bdb/dn2id.c +++ b/servers/slapd/back-bdb/dn2id.c @@ -151,7 +151,6 @@ bdb_dn2id_delete( DB *db = bdb->bi_dn2id->bdi_db; char *buf; DBT key; - DB_LOCK lock; struct berval pdn, ptr; int rc; @@ -614,7 +613,6 @@ hdb_dn2id_delete( int rc; ID nid; unsigned char dlen[2]; - DB_LOCK lock; Debug( LDAP_DEBUG_TRACE, "=> hdb_dn2id_delete 0x%lx: \"%s\"\n", e->e_id, e->e_ndn, 0 ); diff --git a/servers/slapd/back-ldap/distproc.c b/servers/slapd/back-ldap/distproc.c index 8084e7dc64..f64c04621b 100644 --- a/servers/slapd/back-ldap/distproc.c +++ b/servers/slapd/back-ldap/distproc.c @@ -107,6 +107,7 @@ typedef struct ContinuationReference_t { } ContinuationReference_t; #define CR_INIT { NULL, BER_BVNULL, LDAP_DP_RT_UNKNOWN, BER_BVNULL, LDAP_DP_SS_UNKNOWN, NULL, BER_BVNULL } +#ifdef unused static struct berval bv2rt[] = { BER_BVC( "superior" ), BER_BVC( "subordinate" ), @@ -196,6 +197,7 @@ ldap_distproc_str2ss( const char *s ) ber_str2bv( s, 0, 0, &bv ); return ldap_distproc_bv2ss( &bv ); } +#endif /* unused */ /* * NOTE: this overlay assumes that the chainingBehavior control @@ -239,12 +241,6 @@ static int ldap_distproc_db_init_one( BackendDB *be ); #define ldap_distproc_db_close_one(be) (0) #define ldap_distproc_db_destroy_one(be, ca) (lback)->bi_db_destroy( (be), (ca) ) -static int -ldap_distproc_parse_ctrl( - Operation *op, - SlapReply *rs, - LDAPControl *ctrl ); - static int ldap_distproc_uri_cmp( const void *c1, const void *c2 ) { diff --git a/servers/slapd/back-monitor/compare.c b/servers/slapd/back-monitor/compare.c index 8fa2fa4154..c071f6bddf 100644 --- a/servers/slapd/back-monitor/compare.c +++ b/servers/slapd/back-monitor/compare.c @@ -31,7 +31,6 @@ monitor_back_compare( Operation *op, SlapReply *rs ) { monitor_info_t *mi = ( monitor_info_t * ) op->o_bd->be_private; Entry *e, *matched = NULL; - Attribute *a; int rc; /* get entry with reader lock */ @@ -58,17 +57,12 @@ monitor_back_compare( Operation *op, SlapReply *rs ) } rs->sr_err = slap_compare_entry( op, e, op->orc_ava ); - -return_results:; rc = rs->sr_err; switch ( rc ) { case LDAP_COMPARE_FALSE: case LDAP_COMPARE_TRUE: rc = LDAP_SUCCESS; break; - - default: - break; } send_ldap_result( op, rs ); diff --git a/servers/slapd/overlays/memberof.c b/servers/slapd/overlays/memberof.c index 1f6671ebbb..90d6795bea 100644 --- a/servers/slapd/overlays/memberof.c +++ b/servers/slapd/overlays/memberof.c @@ -1186,8 +1186,6 @@ memberof_res_add( Operation *op, SlapReply *rs ) ma = attr_find( op->ora_e->e_attrs, mo->mo_ad_memberof ); if ( ma != NULL ) { - char relax = op->o_relax; - /* relax is required to allow to add * a non-existing member */ op->o_relax = SLAP_CONTROL_CRITICAL; diff --git a/servers/slapd/overlays/pcache.c b/servers/slapd/overlays/pcache.c index ea9820b045..e15b768feb 100644 --- a/servers/slapd/overlays/pcache.c +++ b/servers/slapd/overlays/pcache.c @@ -2616,7 +2616,7 @@ pc_bind_attrs( Operation *op, Entry *e, QueryTemplate *temp, { int i, len = 0; struct berval *vals, pres = BER_BVC("*"); - char *p1, *p2, *t1; + char *p1, *p2; Attribute *a; vals = op->o_tmpalloc( temp->bindnattrs * sizeof( struct berval ), @@ -3224,7 +3224,6 @@ refresh_merge( Operation *op, SlapReply *rs ) { if ( rs->sr_type == REP_SEARCH ) { refresh_info *ri = op->o_callback->sc_private; - BackendDB *be = op->o_bd; Entry *e; dnlist *dnl; slap_callback *ocb; diff --git a/servers/slapd/overlays/rwm.c b/servers/slapd/overlays/rwm.c index 4fe78e6e8b..54dc366c3a 100644 --- a/servers/slapd/overlays/rwm.c +++ b/servers/slapd/overlays/rwm.c @@ -866,12 +866,7 @@ rwm_entry_get_rw( Operation *op, struct berval *ndn, ObjectClass *oc, AttributeDescription *at, int rw, Entry **ep ) { slap_overinst *on = (slap_overinst *) op->o_bd->bd_info; - struct ldaprwmap *rwmap = - (struct ldaprwmap *)on->on_bi.bi_private; - int rc; - dncookie dc; - BackendDB db; Operation op2; SlapReply rs = { REP_SEARCH }; @@ -2036,6 +2031,7 @@ rwm_bva_rewrite_add( return rwm_bva_add( &rwmap->rwm_bva_rewrite, idx, argv ); } +#ifdef unused static int rwm_bva_map_add( struct ldaprwmap *rwmap, @@ -2044,6 +2040,7 @@ rwm_bva_map_add( { return rwm_bva_add( &rwmap->rwm_bva_map, idx, argv ); } +#endif /* unused */ static int rwm_info_init( struct rewrite_info ** rwm_rw ) diff --git a/servers/slapd/overlays/syncprov.c b/servers/slapd/overlays/syncprov.c index 72730c0686..911631ac58 100644 --- a/servers/slapd/overlays/syncprov.c +++ b/servers/slapd/overlays/syncprov.c @@ -818,8 +818,6 @@ syncprov_free_syncop( syncops *so ) static int syncprov_sendresp( Operation *op, opcookie *opc, syncops *so, int mode ) { - slap_overinst *on = opc->son; - SlapReply rs = { REP_SEARCH }; LDAPControl *ctrls[2]; struct berval cookie = BER_BVNULL, csns[2]; @@ -915,7 +913,6 @@ syncprov_qplay( Operation *op, syncops *so ) { slap_overinst *on = LDAP_SLIST_FIRST(&so->s_op->o_extra)->oe_key; syncres *sr; - Entry *e; opcookie opc; int rc = 0; @@ -1377,7 +1374,7 @@ syncprov_op_cleanup( Operation *op, SlapReply *rs ) slap_overinst *on = opc->son; syncprov_info_t *si = on->on_bi.bi_private; syncmatches *sm, *snext; - modtarget *mt, mtdummy; + modtarget *mt; ldap_pvt_thread_mutex_lock( &si->si_ops_mutex ); if ( si->si_active ) diff --git a/servers/slapd/overlays/translucent.c b/servers/slapd/overlays/translucent.c index 63f283c009..d4d77b2551 100644 --- a/servers/slapd/overlays/translucent.c +++ b/servers/slapd/overlays/translucent.c @@ -724,8 +724,6 @@ static int translucent_pwmod(Operation *op, SlapReply *rs) { } static int translucent_exop(Operation *op, SlapReply *rs) { - SlapReply nrs = { REP_RESULT }; - slap_overinst *on = (slap_overinst *) op->o_bd->bd_info; translucent_info *ov = on->on_bi.bi_private; const struct berval bv_exop_pwmod = BER_BVC(LDAP_EXOP_MODIFY_PASSWD); diff --git a/servers/slapd/syncrepl.c b/servers/slapd/syncrepl.c index 214e2c6fb8..0036638ff4 100644 --- a/servers/slapd/syncrepl.c +++ b/servers/slapd/syncrepl.c @@ -3587,7 +3587,6 @@ dn_callback( * in the provider are always propagated. */ if ( dni->new_entry ) { - Modifications **modtail, **ml; Attribute *old, *new; struct berval old_rdn, new_rdn; struct berval old_p, new_p;