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

Warnings: Unused vars. funcptr=0, not =NULL. if(b=...) -> if((b=...) != NULL).

parent c2f210a1
......@@ -482,7 +482,6 @@ int
ldap_pvt_thread_pool_destroy ( ldap_pvt_thread_pool_t *tpool, int run_pending )
{
struct ldap_int_thread_pool_s *pool, *pptr;
long waiting;
ldap_int_thread_ctx_t *ctx;
if (tpool == NULL)
......
......@@ -95,7 +95,7 @@ bdb_db_open( BackendDB *be )
u_int32_t flags;
char path[MAXPATHLEN];
char *dbhome;
int do_recover = 0, do_alock_recover = 0, open_env = 1;
int do_recover = 0, do_alock_recover = 0;
int alockt, quick = 0;
if ( be->be_suffix == NULL ) {
......
......@@ -54,7 +54,6 @@ monitor_subsys_conn_init(
monitor_info_t *mi;
Entry *e, **ep, *e_conn;
monitor_entry_t *mp;
char buf[ BACKMONITOR_BUFSIZE ];
struct berval bv;
assert( be != NULL );
......
......@@ -65,7 +65,6 @@ monitor_subsys_ops_init(
Entry *e_op, **ep;
monitor_entry_t *mp;
char buf[ BACKMONITOR_BUFSIZE ];
int i;
struct berval bv_zero = BER_BVC( "0" );
......
......@@ -86,7 +86,6 @@ monitor_subsys_rww_init(
ep = &mp->mp_children;
for ( i = 0; i < MONITOR_RWW_LAST; i++ ) {
char buf[ BACKMONITOR_BUFSIZE ];
struct berval nrdn, bv;
Entry *e;
......
......@@ -89,7 +89,6 @@ monitor_subsys_sent_init(
ep = &mp->mp_children;
for ( i = 0; i < MONITOR_SENT_LAST; i++ ) {
char buf[ BACKMONITOR_BUFSIZE ];
struct berval nrdn, bv;
Entry *e;
......
......@@ -46,7 +46,6 @@ monitor_subsys_time_init(
Entry *e, **ep, *e_time;
monitor_entry_t *mp;
char buf[ BACKMONITOR_BUFSIZE ];
struct berval bv;
assert( be != NULL );
......
......@@ -84,8 +84,6 @@ perl_back_search(
send_entry = 1;
if (send_entry) {
int rc;
rs->sr_entry = e;
rs->sr_attrs = op->ors_attrs;
rs->sr_flags = REP_ENTRY_MODIFIABLE;
......
......@@ -766,7 +766,7 @@ glue_db_close(
{
slap_overinst *on = (slap_overinst *)be->bd_info;
on->on_info->oi_bi.bi_db_close = NULL;
on->on_info->oi_bi.bi_db_close = 0;
return 0;
}
......
......@@ -2051,8 +2051,6 @@ static int connection_bind_cleanup_cb( Operation *op, SlapReply *rs )
static int connection_bind_cb( Operation *op, SlapReply *rs )
{
slap_callback *cb = op->o_callback;
ldap_pvt_thread_mutex_lock( &op->o_conn->c_mutex );
op->o_conn->c_conn_state = SLAP_C_ACTIVE;
op->o_conn->c_sasl_bind_in_progress =
......
......@@ -236,8 +236,6 @@ slap_init( int mode, const char *name )
int slap_startup( Backend *be )
{
int rc;
Debug( LDAP_DEBUG_TRACE,
"%s startup: initiated.\n",
slap_name, 0, 0 );
......@@ -248,8 +246,6 @@ int slap_startup( Backend *be )
int slap_shutdown( Backend *be )
{
int rc;
Debug( LDAP_DEBUG_TRACE,
"%s shutdown: initiated\n",
slap_name, 0, 0 );
......
......@@ -52,7 +52,7 @@ static int auditlog_response(Operation *op, SlapReply *rs) {
Attribute *a;
Modifications *m;
struct berval *b;
char *what, *subop, *suffix, *who = NULL;
char *what, *suffix, *who = NULL;
long stamp = slap_get_time();
int i;
......@@ -111,7 +111,7 @@ static int auditlog_response(Operation *op, SlapReply *rs) {
switch(op->o_tag) {
case LDAP_REQ_ADD:
for(a = op->ora_e->e_attrs; a; a = a->a_next)
if(b = a->a_vals)
if((b = a->a_vals) != NULL)
for(i = 0; b[i].bv_val; i++)
fprint_ldif(f, a->a_desc->ad_cname.bv_val, b[i].bv_val, b[i].bv_len);
break;
......@@ -128,7 +128,8 @@ static int auditlog_response(Operation *op, SlapReply *rs) {
continue;
}
fprintf(f, "%s: %s\n", what, m->sml_desc->ad_cname.bv_val);
if(b = m->sml_values) for(i = 0; b[i].bv_val; i++)
if((b = m->sml_values) != NULL)
for(i = 0; b[i].bv_val; i++)
fprint_ldif(f, m->sml_desc->ad_cname.bv_val, b[i].bv_val, b[i].bv_len);
fprintf(f, "-\n");
}
......
......@@ -417,7 +417,6 @@ strings_containment(struct berval* stored, struct berval* incoming)
static int
substr_containment_substr(Operation *op, Filter* stored, Filter* incoming)
{
int i;
int rc = 0;
struct berval init_incoming;
......@@ -608,7 +607,6 @@ static void
free_query (CachedQuery* qc)
{
Query* q = (Query*)qc;
int i;
free(qc->q_uuid.bv_val);
filter_free(q->filter);
......@@ -1205,8 +1203,6 @@ pcache_op_search(
cache_manager *cm = on->on_bi.bi_private;
query_manager* qm = cm->qm;
int count;
int i = -1;
AttributeName *filter_attrs = NULL;
......@@ -1219,7 +1215,6 @@ pcache_op_search(
int cacheable = 0;
int fattr_cnt=0;
int fattr_got_oc = 0;
int oc_attr_absent = 1;
struct berval tempstr;
......@@ -2014,7 +2009,7 @@ pcache_db_close(
slap_overinst *on = (slap_overinst *)be->bd_info;
cache_manager *cm = on->on_bi.bi_private;
query_manager *qm = cm->qm;
int i, j, rc = 0;
int i, rc = 0;
/* cleanup stuff inherited from the original database... */
cm->db.be_limits = NULL;
......
......@@ -3406,8 +3406,6 @@ syncrepl_config( ConfigArgs *c )
}
return 1;
} else if ( c->op == LDAP_MOD_DELETE ) {
struct re_s *re;
if ( c->be->be_syncinfo ) {
syncinfo_free( c->be->be_syncinfo );
c->be->be_syncinfo = NULL;
......
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