From: Hallvard Furuseth Date: Tue, 9 Mar 1999 07:15:35 +0000 (+0000) Subject: Silence warnings: Remove unused variables. Enclose some initializers in in {}. X-Git-Tag: OPENLDAP_SLAPD_BACK_LDAP~430 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=5ef648a109669cd4a8a776f2233a51436cebcdb8;p=openldap Silence warnings: Remove unused variables. Enclose some initializers in in {}. --- diff --git a/servers/slapd/abandon.c b/servers/slapd/abandon.c index 4b5986e585..ea29321b3f 100644 --- a/servers/slapd/abandon.c +++ b/servers/slapd/abandon.c @@ -26,7 +26,6 @@ do_abandon( ) { int id; - Backend *be; Operation *o; Debug( LDAP_DEBUG_TRACE, "do_abandon\n", 0, 0, 0 ); diff --git a/servers/slapd/acl.c b/servers/slapd/acl.c index d6e92eb53b..f029d3ccfd 100644 --- a/servers/slapd/acl.c +++ b/servers/slapd/acl.c @@ -107,7 +107,7 @@ acl_get_applicable( regmatch_t *matches ) { - int i, j; + int i; struct acl *a; char *edn; @@ -477,7 +477,6 @@ string_expand( } else if (*sp >= '0' && *sp <= '9' ) { int n; int i; - char *ep; int l; n = *sp - '0'; diff --git a/servers/slapd/aclparse.c b/servers/slapd/aclparse.c index b3741a0b70..d89fb84035 100644 --- a/servers/slapd/aclparse.c +++ b/servers/slapd/aclparse.c @@ -87,7 +87,7 @@ parse_acl( ) { int i; - char *e, *left, *right; + char *left, *right; struct acl *a; struct access *b; diff --git a/servers/slapd/attr.c b/servers/slapd/attr.c index 50f170e017..c1178c94e9 100644 --- a/servers/slapd/attr.c +++ b/servers/slapd/attr.c @@ -65,8 +65,6 @@ attr_merge_fast( Attribute ***a ) { - int i; - if ( *a == NULL ) { for ( *a = &e->e_attrs; **a != NULL; *a = &(**a)->a_next ) { if ( strcasecmp( (**a)->a_type, type ) == 0 ) { @@ -101,7 +99,6 @@ attr_merge( struct berval **vals ) { - int i; Attribute **a; for ( a = &e->e_attrs; *a != NULL; a = &(*a)->a_next ) { @@ -263,7 +260,7 @@ attr_syntax_config( { char *save; struct asyntaxinfo *a; - int i, lasti; + int lasti; if ( argc < 2 ) { Debug( LDAP_DEBUG_ANY, diff --git a/servers/slapd/backend.c b/servers/slapd/backend.c index 9f9f82f45e..ed09a15ac1 100644 --- a/servers/slapd/backend.c +++ b/servers/slapd/backend.c @@ -453,8 +453,6 @@ be_isroot( Backend *be, char *ndn ) char * be_root_dn( Backend *be ) { - int rc; - if ( be->be_root_dn == NULL ) { return( "" ); } diff --git a/servers/slapd/bind.c b/servers/slapd/bind.c index 3e69c967e3..cf0b2af328 100644 --- a/servers/slapd/bind.c +++ b/servers/slapd/bind.c @@ -28,7 +28,7 @@ do_bind( ) { BerElement *ber = op->o_ber; - int version, method, len; + int version, method; char *cdn, *ndn; unsigned long rc; struct berval cred; diff --git a/servers/slapd/compare.c b/servers/slapd/compare.c index 45461d5687..0d1c50abdb 100644 --- a/servers/slapd/compare.c +++ b/servers/slapd/compare.c @@ -26,7 +26,6 @@ do_compare( { char *ndn; Ava ava; - int rc; Backend *be; Debug( LDAP_DEBUG_TRACE, "do_compare\n", 0, 0, 0 ); diff --git a/servers/slapd/daemon.c b/servers/slapd/daemon.c index 807b705d87..c58ed25bca 100644 --- a/servers/slapd/daemon.c +++ b/servers/slapd/daemon.c @@ -53,16 +53,12 @@ slapd_daemon( void *port ) { - Operation *o; - BerElement ber; - unsigned long len, tag, msgid; int i; int tcps, ns; struct sockaddr_in addr; fd_set readfds; fd_set writefds; FILE *fp; - int on = 1; #ifdef HAVE_SYSCONF dtblsize = sysconf( _SC_OPEN_MAX ); @@ -150,7 +146,7 @@ slapd_daemon( struct hostent *hp; struct timeval zero; struct timeval *tvp; - int len, pid; + int len; int data_ready; char *client_name; diff --git a/servers/slapd/dn.c b/servers/slapd/dn.c index 2d02628ed3..57d8788ecd 100644 --- a/servers/slapd/dn.c +++ b/servers/slapd/dn.c @@ -155,7 +155,7 @@ dn_parent( ) { char *s; - int inquote, gotesc; + int inquote; if( dn == NULL ) { return NULL; @@ -225,7 +225,7 @@ char * dn_rdn( char *dn ) { char *s; - int inquote, gotesc; + int inquote; if( dn == NULL ) { return NULL; diff --git a/servers/slapd/entry.c b/servers/slapd/entry.c index 61f315a507..563e01cec1 100644 --- a/servers/slapd/entry.c +++ b/servers/slapd/entry.c @@ -217,7 +217,6 @@ entry2str( void entry_free( Entry *e ) { - int i; Attribute *a, *next; if ( e->e_dn != NULL ) { diff --git a/servers/slapd/filter.c b/servers/slapd/filter.c index dff90b0446..2a977940e1 100644 --- a/servers/slapd/filter.c +++ b/servers/slapd/filter.c @@ -15,7 +15,7 @@ static int get_substring_filter(Connection *conn, BerElement *ber, Filter *f, ch int get_filter( Connection *conn, BerElement *ber, Filter **filt, char **fstr ) { - unsigned long tag, len; + unsigned long len; int err; Filter *f; char *ftmp; diff --git a/servers/slapd/filterentry.c b/servers/slapd/filterentry.c index a6528b2877..738b66f5b3 100644 --- a/servers/slapd/filterentry.c +++ b/servers/slapd/filterentry.c @@ -179,7 +179,7 @@ test_approx_filter( ) { char *w1, *w2, *c1, *c2; - int i, rc, match; + int i; Attribute *a; if ( be != NULL && ! access_allowed( be, conn, op, e, @@ -256,7 +256,7 @@ test_filter_list( int ftype ) { - int rc, nomatch; + int nomatch; Filter *f; Debug( LDAP_DEBUG_FILTER, "=> test_filter_list\n", 0, 0, 0 ); diff --git a/servers/slapd/main.c b/servers/slapd/main.c index f4ca8a58b0..0d13c4be68 100644 --- a/servers/slapd/main.c +++ b/servers/slapd/main.c @@ -38,7 +38,7 @@ static STRDISP syslog_types[] = { { "LOCAL5", 6, LOG_LOCAL5 }, { "LOCAL6", 6, LOG_LOCAL6 }, { "LOCAL7", 6, LOG_LOCAL7 }, - NULL + { NULL } }; static int cnvt_str2int( char *, STRDISP_P, int ); @@ -236,7 +236,6 @@ main( int argc, char **argv ) } else { Connection c; - Operation *o; BerElement ber; unsigned long len, tag; long msgid; diff --git a/servers/slapd/monitor.c b/servers/slapd/monitor.c index 62effcda9e..f065df6975 100644 --- a/servers/slapd/monitor.c +++ b/servers/slapd/monitor.c @@ -39,7 +39,7 @@ monitor_info( Connection *conn, Operation *op ) struct berval *vals[2]; int i, nconns, nwritewaiters, nreadwaiters; struct tm *ltm; - char *p, *tmpdn; + char *p; vals[0] = &val; vals[1] = NULL;