Commit d6cc9475 authored by Hallvard Furuseth's avatar Hallvard Furuseth
Browse files

Silence "unused <something>" warnings

parent 8dddff80
......@@ -36,7 +36,6 @@ do_abandon( Operation *op, SlapReply *rs )
{
ber_int_t id;
Operation *o;
int i;
Debug( LDAP_DEBUG_TRACE, "do_abandon\n", 0, 0, 0 );
......
......@@ -990,8 +990,6 @@ file2anlist( AttributeName *an, const char *fname, const char *brkstr )
}
while ( fgets( lcur, LBUFSIZ, fp ) != NULL ) {
char *str, *s, *next;
const char *delimstr = brkstr;
if ( ( c = strchr( lcur, '\n' ) ) ) {
if ( c == line ) {
*c = '\0';
......
......@@ -884,9 +884,11 @@ bdb_cache_add(
u_int32_t locker )
{
EntryInfo *new, ei;
struct berval rdn = e->e_name;
DB_LOCK lock;
int rc;
#ifdef BDB_HIER
struct berval rdn = e->e_name;
#endif
ei.bei_id = e->e_id;
ei.bei_parent = eip;
......@@ -981,8 +983,10 @@ bdb_cache_modrdn(
DB_LOCK *lock )
{
EntryInfo *ei = BEI(e), *pei;
struct berval rdn;
int rc;
#ifdef BDB_HIER
struct berval rdn;
#endif
/* Get write lock on data */
rc = bdb_cache_entry_db_relock( bdb->bi_dbenv, locker, ei, 1, 0, lock );
......
......@@ -263,7 +263,7 @@ bdb_online_index( void *ctx, void *arg )
id++;
getnext = 1;
}
out:
ldap_pvt_thread_mutex_lock( &slapd_rq.rq_mutex );
ldap_pvt_runqueue_stoptask( &slapd_rq, rtask );
bdb->bi_index_task = NULL;
......
......@@ -555,7 +555,7 @@ hdb_dn2id_delete(
DBT key, data;
DBC *cursor;
diskNode *d;
int rc, nrlen;
int rc;
ID nid;
unsigned char dlen[2];
......@@ -705,7 +705,6 @@ hdb_dn2id_parent(
int rc = 0;
diskNode *d;
char *ptr;
unsigned char *pt2;
ID nid;
DBTzero(&key);
......
......@@ -1212,8 +1212,6 @@ ID bdb_idl_next( ID *ids, ID *cursor )
*/
int bdb_idl_append_one( ID *ids, ID id )
{
unsigned x;
if (BDB_IDL_IS_RANGE( ids )) {
/* if already in range, treat as a dup */
if (id >= BDB_IDL_FIRST(ids) && id <= BDB_IDL_LAST(ids))
......
......@@ -389,7 +389,7 @@ bdb_index_entry(
#ifdef LDAP_COMP_MATCH
ComponentReference *cr_list = NULL;
ComponentReference *cr = NULL, *dupped_cr = NULL;
void* decoded_comp, *extracted_comp;
void* decoded_comp;
ComponentSyntaxInfo* csi_attr;
Syntax* syn;
AttributeType* at;
......
......@@ -246,7 +246,6 @@ bdb_db_recover( BackendDB *be )
return bdb_do_recovery( be );
}
re_exit:
Debug( LDAP_DEBUG_ANY,
"bdb_db_recover: Database cannot be recovered. "\
"Restore from backup!\n", 0, 0, 0);
......
......@@ -26,8 +26,6 @@
int
ldbm_back_db_close( Backend *be )
{
struct ldbminfo *li = (struct ldbminfo *) be->be_private;
Debug( LDAP_DEBUG_TRACE, "ldbm backend syncing\n", 0, 0, 0 );
ldbm_cache_flush_all( be );
......
......@@ -50,10 +50,6 @@
* A possible extension will include the handling of multiple suffixes
*/
static int
meta_back_is_candidate_unique(
metainfo_t *mi,
struct berval *ndn );
/*
* returns 1 if suffix is candidate for dn, otherwise 0
......@@ -80,6 +76,7 @@ meta_back_is_candidate(
return META_NOT_CANDIDATE;
}
#if 0
/*
* meta_back_is_candidate_unique
*
......@@ -99,6 +96,7 @@ meta_back_is_candidate_unique(
return 1;
}
#endif /* 0 */
/*
* meta_back_select_unique_candidate
......
......@@ -71,7 +71,6 @@ meta_back_compare( Operation *op, SlapReply *rs )
dc.ctx = "compareDN";
for ( i = 0; i < mi->mi_ntargets; i++ ) {
metasingleconn_t *msc = &mc->mc_conns[ i ];
struct berval mdn = BER_BVNULL;
struct berval mapped_attr = op->orc_ava->aa_desc->ad_cname;
struct berval mapped_value = op->orc_ava->aa_value;
......
......@@ -570,7 +570,6 @@ meta_back_candidates_get( Operation *op )
{
metainfo_t *mi = ( metainfo_t * )op->o_bd->be_private;
metacandidates_t *mc;
SlapReply *rs;
if ( op->o_threadctx ) {
void *data = NULL;
......
......@@ -74,7 +74,6 @@ over_db_config(
BackendInfo *bi_orig = be->bd_info;
struct ConfigOCs *be_cf_ocs = be->be_cf_ocs;
ConfigArgs ca = {0};
ConfigTable *ct;
int rc = 0;
if ( oi->oi_orig->bi_db_config ) {
......
......@@ -99,7 +99,7 @@ componentFilterMatch (
{
ComponentSyntaxInfo *csi_attr = (ComponentSyntaxInfo*)value;
MatchingRuleAssertion * ma = (MatchingRuleAssertion*)assertedValue;
int num_attr, rc, i;
int rc;
if ( !mr || !ma->ma_cf ) return LDAP_INAPPROPRIATE_MATCHING;
......@@ -154,8 +154,6 @@ allComponentsMatch(
static int
slapd_ber2cav( struct berval* bv, ComponentAssertionValue* cav )
{
int len;
cav->cav_ptr = cav->cav_buf = bv->bv_val;
cav->cav_end = bv->bv_val + bv->bv_len;
......@@ -165,11 +163,9 @@ slapd_ber2cav( struct berval* bv, ComponentAssertionValue* cav )
ComponentReference*
dup_comp_ref ( Operation* op, ComponentReference* cr )
{
int rc, count = 0;
ComponentReference* dup_cr;
ComponentId* ci_curr;
ComponentId** ci_temp;
ber_int_t type;
dup_cr = op->o_tmpalloc( sizeof( ComponentReference ), op->o_tmpmemctx );
......@@ -234,7 +230,6 @@ dup_comp_filter_item (
ComponentAssertion* in_ca,
ComponentAssertion** out_ca )
{
ComponentAssertion* ca;
int len;
if ( !in_ca->ca_comp_ref ) return SLAPD_DISCONNECT;
......@@ -301,9 +296,7 @@ dup_comp_filter (
int
get_aliased_filter_aa ( Operation* op, AttributeAssertion* a_assert, AttributeAliasing* aa, const char** text )
{
int rc;
struct berval assert_bv;
ComponentAssertion* ca;
Debug( LDAP_DEBUG_FILTER, "get_aliased_filter\n", 0, 0, 0 );
......@@ -324,9 +317,7 @@ get_aliased_filter( Operation* op,
MatchingRuleAssertion* ma, AttributeAliasing* aa,
const char** text )
{
int rc;
struct berval assert_bv;
ComponentAssertion* ca;
Debug( LDAP_DEBUG_FILTER, "get_aliased_filter\n", 0, 0, 0 );
......@@ -956,7 +947,6 @@ get_item( Operation *op, ComponentAssertionValue* cav, ComponentAssertion** ca,
{
int rc;
ComponentAssertion* _ca;
struct berval t_bv;
struct berval value;
MatchingRule* mr;
......@@ -1268,7 +1258,7 @@ test_comp_filter_item(
ComponentSyntaxInfo *csi_attr,
ComponentAssertion *ca )
{
int rc, len;
int rc;
void *attr_nm, *assert_nm;
if ( strcmp(ca->ca_ma_rule->smr_mrule.mr_oid,
......
......@@ -32,7 +32,9 @@ static SLAP_CTRL_PARSE_FN parseProxyAuthz;
static SLAP_CTRL_PARSE_FN parseManageDIT;
#endif
static SLAP_CTRL_PARSE_FN parseManageDSAit;
#ifdef LDAP_CONTROL_MODIFY_INCREMENT
static SLAP_CTRL_PARSE_FN parseModifyIncrement;
#endif
static SLAP_CTRL_PARSE_FN parseNoOp;
static SLAP_CTRL_PARSE_FN parsePagedResults;
#ifdef LDAP_DEVEL
......@@ -672,7 +674,6 @@ int get_ctrls(
rs->sr_text = "critical extension is not recognized";
goto return_results;
}
next_ctrl:;
}
return_results:
......@@ -693,6 +694,7 @@ return_results:
return rs->sr_err;
}
#ifdef LDAP_CONTROL_MODIFY_INCREMENT
static int parseModifyIncrement (
Operation *op,
SlapReply *rs,
......@@ -718,6 +720,7 @@ static int parseModifyIncrement (
return LDAP_SUCCESS;
}
#endif
#ifdef LDAP_DEVEL
static int parseManageDIT (
......
......@@ -176,9 +176,7 @@ slap_dup_sync_cookie(
struct sync_cookie *src
)
{
int i;
struct sync_cookie *new;
struct berval tmp_bv;
if ( src == NULL )
return NULL;
......
......@@ -604,7 +604,7 @@ oc_unparse( BerVarray *res, ObjectClass *start, ObjectClass *end, int sys )
ObjectClass *oc;
int i, num;
struct berval bv, *bva = NULL, idx;
char ibuf[32], *ptr;
char ibuf[32];
if ( !start )
start = LDAP_STAILQ_FIRST( &oc_list );
......
......@@ -156,7 +156,7 @@ void oidm_unparse( BerVarray *res, OidMacro *start, OidMacro *end, int sys )
{
OidMacro *om;
int i, j, num;
struct berval bv, *bva = NULL, idx;
struct berval *bva = NULL, idx;
char ibuf[32], *ptr;
if ( !start )
......
......@@ -43,6 +43,7 @@
ispunct((unsigned char) (x)) || \
isdigit((unsigned char) (x)) || (x) == '\0')
#if 0
static char *
first_word( char *s )
{
......@@ -98,6 +99,7 @@ word_dup( char *w )
return( ret );
}
#endif /* 0 */
#ifndef MAXPHONEMELEN
#define MAXPHONEMELEN 4
......
......@@ -53,7 +53,6 @@ root_dse_info(
{
Entry *e;
struct berval val, *bv;
struct berval nval;
int i, j;
char ** supportedSASLMechanisms;
BackendDB *be;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment