From: Hallvard Furuseth Date: Sat, 6 Mar 1999 16:29:05 +0000 (+0000) Subject: Remove unused variables X-Git-Tag: OPENLDAP_SLAPD_BACK_LDAP~458 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=3277a27b1019073130dd7c4f0f6c0369c247e9d6;p=openldap Remove unused variables --- diff --git a/clients/gopher/go500gw.c b/clients/gopher/go500gw.c index e420821389..b0c1a65d5b 100644 --- a/clients/gopher/go500gw.c +++ b/clients/gopher/go500gw.c @@ -798,8 +798,7 @@ do_search( LDAP *ld, FILE *fp, char *query ) } if ( count == 1 ) { - char *dn, **s, **oc; - int rc; + char *dn, **oc; e = ldap_first_entry( ld, res ); oc = ldap_get_values( ld, e, "objectClass" ); diff --git a/clients/mail500/main.c b/clients/mail500/main.c index f885feec4c..7aa2a7d1b5 100644 --- a/clients/mail500/main.c +++ b/clients/mail500/main.c @@ -935,7 +935,7 @@ add_member( { char *ndn; char **mail; - int i, rc; + int rc; LDAPMessage *res, *e; struct timeval timeout; @@ -1621,7 +1621,7 @@ get_attributes_mail_dn( ) { LDAPMessage *ee, *res; - char **vals, **dnlist, **mail, **grname, **graddr; + char **vals, **dnlist, **mail, **grname; char *dn; int nto = 0, i, rc; struct timeval timeout; diff --git a/clients/rcpt500/main.c b/clients/rcpt500/main.c index 449c1b8a5a..fc12b247e9 100644 --- a/clients/rcpt500/main.c +++ b/clients/rcpt500/main.c @@ -55,7 +55,6 @@ main( int argc, char **argv ) char *prog, *usage = "%s [-l] [-U] [-h ldaphost] [-p ldapport] [-b searchbase] [-a] [-z sizelimit] [-u dapuser] [-f filterfile] [-t templatefile] [-c rdncount]\n"; struct msginfo msg; int c, errflg; - char *replytext; *reply = '\0'; diff --git a/clients/rcpt500/query.c b/clients/rcpt500/query.c index f9675ba470..b82f5215d9 100644 --- a/clients/rcpt500/query.c +++ b/clients/rcpt500/query.c @@ -40,7 +40,7 @@ query_cmd( struct msginfo *msgp, char *reply ) { LDAP *ldp; LDAPMessage *ldmsgp, *entry; - char *s, *dn; + char *dn; int matches, rc, ld_errno, ufn; LDAPFiltDesc *lfdp; LDAPFiltInfo *lfi; diff --git a/clients/ud/main.c b/clients/ud/main.c index 75d8fede0d..6dd447411a 100644 --- a/clients/ud/main.c +++ b/clients/ud/main.c @@ -170,7 +170,6 @@ do_commands( void ) LDAPMessage *mp; /* returned by find() */ register char *cp; /* misc char pointer */ register char *ap; /* misc char pointer */ - static char buf[MED_BUF_SIZE]; /* for prompting */ static char cmd[MED_BUF_SIZE]; /* holds the command */ static char input[MED_BUF_SIZE]; /* buffer for input */ diff --git a/libraries/libldap/charset.c b/libraries/libldap/charset.c index 5a324ed2df..430eaa98d2 100644 --- a/libraries/libldap/charset.c +++ b/libraries/libldap/charset.c @@ -1027,7 +1027,6 @@ ldap_t61_to_8859( char **bufp, unsigned long *buflenp, int free_input ) unsigned int n; int c; unsigned long len; - Couple *cc; Debug( LDAP_DEBUG_TRACE, "ldap_t61_to_8859 input length: %ld\n", *buflenp, 0, 0 ); diff --git a/servers/slapd/back-ldbm/cache.c b/servers/slapd/back-ldbm/cache.c index 53a7428cb9..e5bd055b51 100644 --- a/servers/slapd/back-ldbm/cache.c +++ b/servers/slapd/back-ldbm/cache.c @@ -427,7 +427,6 @@ cache_find_entry_dn2id( char *dn ) { - struct ldbminfo *li = (struct ldbminfo *) be->be_private; Entry e, *ep; ID id; diff --git a/servers/slapd/back-ldbm/dn2id.c b/servers/slapd/back-ldbm/dn2id.c index 31fd296185..a29557e11d 100644 --- a/servers/slapd/back-ldbm/dn2id.c +++ b/servers/slapd/back-ldbm/dn2id.c @@ -116,7 +116,6 @@ dn2id_delete( char *dn ) { - struct ldbminfo *li = (struct ldbminfo *) be->be_private; struct dbcache *db; Datum key; int rc; diff --git a/servers/slapd/back-ldbm/id2children.c b/servers/slapd/back-ldbm/id2children.c index 904a37f970..3d09ef412a 100644 --- a/servers/slapd/back-ldbm/id2children.c +++ b/servers/slapd/back-ldbm/id2children.c @@ -19,8 +19,6 @@ id2children_add( { struct dbcache *db; Datum key; - int len, rc; - ID_BLOCK *idl; char buf[20]; ldbm_datum_init( key ); @@ -63,8 +61,6 @@ id2children_remove( { struct dbcache *db; Datum key; - int len, rc; - ID_BLOCK *idl; char buf[20]; Debug( LDAP_DEBUG_TRACE, "=> id2children_remove( %ld, %ld )\n", p ? p->e_id diff --git a/servers/slapd/back-ldbm/index.c b/servers/slapd/back-ldbm/index.c index 0d595119c6..e634e912b4 100644 --- a/servers/slapd/back-ldbm/index.c +++ b/servers/slapd/back-ldbm/index.c @@ -20,7 +20,6 @@ index_add_entry( ) { Attribute *ap; - char *dnval; struct berval bv; struct berval *bvals[2]; diff --git a/servers/slapd/back-ldbm/init.c b/servers/slapd/back-ldbm/init.c index 95947769dc..579f9ddacf 100644 --- a/servers/slapd/back-ldbm/init.c +++ b/servers/slapd/back-ldbm/init.c @@ -82,7 +82,6 @@ ldbm_back_db_init( { struct ldbminfo *li; char *argv[ 4 ]; - int i; /* allocate backend-database-specific stuff */ li = (struct ldbminfo *) ch_calloc( 1, sizeof(struct ldbminfo) ); diff --git a/servers/slapd/back-ldbm/nextid.c b/servers/slapd/back-ldbm/nextid.c index 5d31754a45..1589f63b99 100644 --- a/servers/slapd/back-ldbm/nextid.c +++ b/servers/slapd/back-ldbm/nextid.c @@ -54,7 +54,6 @@ static int next_id_write( Backend *be, ID id ) { struct ldbminfo *li = (struct ldbminfo *) be->be_private; - char buf[20]; char* file = li->li_nextid_file; FILE* fp; int rc; diff --git a/servers/slapd/back-ldbm/search.c b/servers/slapd/back-ldbm/search.c index a754e21e2a..5def38a2b3 100644 --- a/servers/slapd/back-ldbm/search.c +++ b/servers/slapd/back-ldbm/search.c @@ -51,7 +51,7 @@ ldbm_back_search( Attribute *ref; char *matched = NULL; int rmaxsize, nrefs; - char *rbuf, *rcur, *r; + char *rbuf, *rcur; int nentries = 0; char *realBase; @@ -186,7 +186,7 @@ ldbm_back_search( strncmp( e->e_ndn, "REF=", 4 ) == 0 && (ref = attr_find( e->e_attrs, "ref" )) != NULL ) { - int i, len; + int i; if ( ref->a_vals == NULL ) { Debug( LDAP_DEBUG_ANY, "null ref in (%s)\n", @@ -326,8 +326,6 @@ base_candidates( ) { struct ldbminfo *li = (struct ldbminfo *) be->be_private; - int rc; - ID id; ID_BLOCK *idl; Entry *e; diff --git a/servers/slapd/phonetic.c b/servers/slapd/phonetic.c index 27f3f91e54..ac33f4abb2 100644 --- a/servers/slapd/phonetic.c +++ b/servers/slapd/phonetic.c @@ -87,8 +87,7 @@ phonetic( char *s ) { char code, adjacent, ch; char *p; - char **c; - int i, cmax; + int i; char phoneme[MAXPHONEMELEN + 1]; p = s; diff --git a/servers/slapd/result.c b/servers/slapd/result.c index 1213b9b853..e23b518b04 100644 --- a/servers/slapd/result.c +++ b/servers/slapd/result.c @@ -25,7 +25,7 @@ send_ldap_result2( ) { BerElement *ber; - int rc, sd; + int rc; unsigned long tag, bytes; if ( err == LDAP_PARTIAL_RESULTS && (text == NULL || *text == '\0') ) @@ -186,7 +186,7 @@ send_search_entry( { BerElement *ber; Attribute *a; - int i, rc, bytes, sd; + int i, rc, bytes; struct acl *acl; char *edn; diff --git a/servers/slapd/schema.c b/servers/slapd/schema.c index f4fab6022c..a20b3fab8b 100644 --- a/servers/slapd/schema.c +++ b/servers/slapd/schema.c @@ -22,7 +22,6 @@ int oc_schema_check( Entry *e ) { Attribute *a, *aoc; - struct objclass *oc; int i; int ret = 0;