]> git.sur5r.net Git - openldap/commitdiff
Warnings: Unused vars. funcptr=0, not =NULL. if(b=...) -> if((b=...) != NULL).
authorHallvard Furuseth <hallvard@openldap.org>
Sun, 2 Apr 2006 19:54:24 +0000 (19:54 +0000)
committerHallvard Furuseth <hallvard@openldap.org>
Sun, 2 Apr 2006 19:54:24 +0000 (19:54 +0000)
14 files changed:
libraries/libldap_r/tpool.c
servers/slapd/back-bdb/init.c
servers/slapd/back-monitor/conn.c
servers/slapd/back-monitor/operation.c
servers/slapd/back-monitor/rww.c
servers/slapd/back-monitor/sent.c
servers/slapd/back-monitor/time.c
servers/slapd/back-perl/search.c
servers/slapd/backglue.c
servers/slapd/connection.c
servers/slapd/init.c
servers/slapd/overlays/auditlog.c
servers/slapd/overlays/pcache.c
servers/slapd/syncrepl.c

index a9ec8f4795d212e6a5e8a57f29884f9437abd750..31d27b7d3638ac32b2724b96f42b6d93bbca4cc4 100644 (file)
@@ -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)
index b766f6b1c6f56e604b36115643de242cd98809b0..6fe2a3060944d22cdfdf3f6abf5f8c6126b41dc2 100644 (file)
@@ -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 ) {
index f34f215b9ae4104502079aae09cf80df18a45800..21f0a1d34da0c8c6292e237ebfc1a2a6e8699f2f 100644 (file)
@@ -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 );
index c9dbf3b627535691a6d3ff0469ec538dbd8a5cc3..c84088dcb8c155a8531d9462034e53eb92ba3105 100644 (file)
@@ -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" );
 
index e8ae7bf6178ee44d81cbc3e3827e58746b471bc3..76cb031603ce4e773d16bb6611d848e40374b0f2 100644 (file)
@@ -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;
                
index 23ed6419ca3dc698507fb3a963d930e98849a5a9..caa6beab52381704c8db52519ad42e9e6ff86140 100644 (file)
@@ -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;
 
index c8588e8048f3942b6a5f8f34ba8633718da3f8b2..ac2f61543edc415e2530a8f530bc3b6f503c262e 100644 (file)
@@ -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 );
index 1524900eb3ae6d3a8b640d37150ca288f387b777..d249825a4be0f9abb19ef04c66ef1ee85ea5bc39 100644 (file)
@@ -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;
index e2fa8a2ff85b2d12cc356d97ad641b820d3072ab..5cd6c42f80a16628ca101583de3d006acf1ccac3 100644 (file)
@@ -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;
 }
 
index cf43c239c1bb34312510e92c7e19499e52caf481..0c788c7b1a7db28e17fd483a261bae28ad012efd 100644 (file)
@@ -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 =
index 5ee2f1d934093105e55b04c50e4afbefd8874d67..ac710dfcbca31415b00715a83bc3be3cf2ac0a0d 100644 (file)
@@ -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 );
index dd338bbfa7da1dc870e8507ab00085758c7db5f5..6a2e5b4c770206586ba5d92e748e56c8001727d9 100644 (file)
@@ -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");
                }
index 7eef3c5d2aa82730e503411791e017bf210020a3..d6b44f082dfc390afd3f4bdb4f96c6db12ca5676 100644 (file)
@@ -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;
index c8dc5281e80b06d045477b9078c9eaec7d0274af..3cac0d0a965c460b1edb4ebc7cb342b4edbc211a 100644 (file)
@@ -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;