From 984bdfa605cccbe47ff1a83118b13c399b62821a Mon Sep 17 00:00:00 2001 From: Hallvard Furuseth Date: Sat, 6 Mar 1999 06:33:34 +0000 Subject: [PATCH] Remove unused variables --- servers/slapd/tools/centipede.c | 2 -- servers/slapd/tools/ldif2id2children-bdb2.c | 5 +---- servers/slapd/tools/ldif2id2children.c | 5 +---- servers/slapd/tools/ldif2id2entry-bdb2.c | 9 ++------- servers/slapd/tools/ldif2id2entry.c | 9 ++------- servers/slapd/tools/ldif2index-bdb2.c | 4 +--- servers/slapd/tools/ldif2index.c | 4 +--- servers/slapd/tools/ldif2ldbm-bdb2.c | 9 ++------- servers/slapd/tools/ldif2ldbm.c | 9 ++------- servers/slurpd/fm.c | 1 - servers/slurpd/main.c | 1 - tests/progs/slapd-addel.c | 2 +- tests/progs/slapd-read.c | 2 +- tests/progs/slapd-search.c | 2 +- tests/progs/slapd-tester.c | 2 +- 15 files changed, 16 insertions(+), 50 deletions(-) diff --git a/servers/slapd/tools/centipede.c b/servers/slapd/tools/centipede.c index 022d950878..536417b43f 100644 --- a/servers/slapd/tools/centipede.c +++ b/servers/slapd/tools/centipede.c @@ -1045,8 +1045,6 @@ charray_add_dup( char *s ) { - int n; - if ( *a == NULL ) { *a = (char **) malloc( (BUFSIZ + 1) * sizeof(char *) ); *cur = 0; diff --git a/servers/slapd/tools/ldif2id2children-bdb2.c b/servers/slapd/tools/ldif2id2children-bdb2.c index e75c5f47d9..1d3e01be20 100644 --- a/servers/slapd/tools/ldif2id2children-bdb2.c +++ b/servers/slapd/tools/ldif2id2children-bdb2.c @@ -29,9 +29,7 @@ usage( char *name ) int main( int argc, char **argv ) { - int i, cargc, indb, stop, status; - char *cargv[MAXARGS]; - char *defargv[MAXARGS]; + int i, stop; char *linep, *buf; char line[BUFSIZ]; int lineno, elineno; @@ -43,7 +41,6 @@ main( int argc, char **argv ) struct ldbminfo *li; struct berval bv; struct berval *vals[2]; - Avlnode *avltypes = NULL; tailorfile = SLAPD_DEFAULT_CONFIGFILE; dbnum = -1; diff --git a/servers/slapd/tools/ldif2id2children.c b/servers/slapd/tools/ldif2id2children.c index 2f26509dcc..16418a8d34 100644 --- a/servers/slapd/tools/ldif2id2children.c +++ b/servers/slapd/tools/ldif2id2children.c @@ -29,9 +29,7 @@ usage( char *name ) int main( int argc, char **argv ) { - int i, cargc, indb, stop, status; - char *cargv[MAXARGS]; - char *defargv[MAXARGS]; + int i, stop; char *linep, *buf; char line[BUFSIZ]; int lineno, elineno; @@ -43,7 +41,6 @@ main( int argc, char **argv ) struct ldbminfo *li; struct berval bv; struct berval *vals[2]; - Avlnode *avltypes = NULL; tailorfile = SLAPD_DEFAULT_CONFIGFILE; dbnum = -1; diff --git a/servers/slapd/tools/ldif2id2entry-bdb2.c b/servers/slapd/tools/ldif2id2entry-bdb2.c index fef6d6e460..b46cf26e8b 100644 --- a/servers/slapd/tools/ldif2id2entry-bdb2.c +++ b/servers/slapd/tools/ldif2id2entry-bdb2.c @@ -27,10 +27,8 @@ usage( char *name ) int main( int argc, char **argv ) { - int i, cargc, indb, stop, status; - char *cargv[MAXARGS]; - char *defargv[MAXARGS]; - char *linep, *buf; + int i, stop; + char *buf; char line[BUFSIZ], idbuf[BUFSIZ]; int lmax, lcur; int dbnum; @@ -40,7 +38,6 @@ main( int argc, char **argv ) struct ldbminfo *li; struct berval bv; struct berval *vals[2]; - Avlnode *avltypes = NULL; FILE *fp; tailorfile = SLAPD_DEFAULT_CONFIGFILE; @@ -125,8 +122,6 @@ main( int argc, char **argv ) vals[0] = &bv; vals[1] = NULL; while ( ! stop ) { - char *type, *val, *s; - int vlen; Datum key, data; ldbm_datum_init( key ); diff --git a/servers/slapd/tools/ldif2id2entry.c b/servers/slapd/tools/ldif2id2entry.c index 3d50040e0f..7dbf064f47 100644 --- a/servers/slapd/tools/ldif2id2entry.c +++ b/servers/slapd/tools/ldif2id2entry.c @@ -27,10 +27,8 @@ usage( char *name ) int main( int argc, char **argv ) { - int i, cargc, indb, stop, status; - char *cargv[MAXARGS]; - char *defargv[MAXARGS]; - char *linep, *buf; + int i, stop; + char *buf; char line[BUFSIZ], idbuf[BUFSIZ]; int lmax, lcur; int dbnum; @@ -40,7 +38,6 @@ main( int argc, char **argv ) struct ldbminfo *li; struct berval bv; struct berval *vals[2]; - Avlnode *avltypes = NULL; FILE *fp; tailorfile = SLAPD_DEFAULT_CONFIGFILE; @@ -125,8 +122,6 @@ main( int argc, char **argv ) vals[0] = &bv; vals[1] = NULL; while ( ! stop ) { - char *type, *val, *s; - int vlen; Datum key, data; ldbm_datum_init( key ); diff --git a/servers/slapd/tools/ldif2index-bdb2.c b/servers/slapd/tools/ldif2index-bdb2.c index cedb124bae..298906f193 100644 --- a/servers/slapd/tools/ldif2index-bdb2.c +++ b/servers/slapd/tools/ldif2index-bdb2.c @@ -26,9 +26,7 @@ usage( char *name ) int main( int argc, char **argv ) { - int i, cargc, indb, stop; - char *cargv[MAXARGS]; - char *defargv[MAXARGS]; + int i, stop; char *tailorfile, *inputfile; char *linep, *buf, *attr; char line[BUFSIZ]; diff --git a/servers/slapd/tools/ldif2index.c b/servers/slapd/tools/ldif2index.c index 7032ea63c3..0bba2cdeb2 100644 --- a/servers/slapd/tools/ldif2index.c +++ b/servers/slapd/tools/ldif2index.c @@ -26,9 +26,7 @@ usage( char *name ) int main( int argc, char **argv ) { - int i, cargc, indb, stop; - char *cargv[MAXARGS]; - char *defargv[MAXARGS]; + int i, stop; char *tailorfile, *inputfile; char *linep, *buf, *attr; char line[BUFSIZ]; diff --git a/servers/slapd/tools/ldif2ldbm-bdb2.c b/servers/slapd/tools/ldif2ldbm-bdb2.c index ae1b64cb35..b5e2309af5 100644 --- a/servers/slapd/tools/ldif2ldbm-bdb2.c +++ b/servers/slapd/tools/ldif2ldbm-bdb2.c @@ -23,7 +23,6 @@ static void fork_child( char *prog, char *args[] ); static void wait4kids( int nkidval ); -static char *indexcmd; static char *tailorfile; static char *inputfile; static int maxkids = 1; @@ -39,7 +38,7 @@ usage( char *name ) int main( int argc, char **argv ) { - int i, stop, status; + int i, stop; char *linep, *buf, *sbindir; char *args[MAXARGS]; char buf2[20], buf3[20]; @@ -216,10 +215,6 @@ main( int argc, char **argv ) while ( ! stop ) { char *type, *val, *s; int vlen, indexmask, syntaxmask; - Datum key, data; - - ldbm_datum_init( key ); - ldbm_datum_init( data ); if ( fgets( line, sizeof(line), stdin ) != NULL ) { int len; @@ -282,7 +277,7 @@ main( int argc, char **argv ) static void fork_child( char *prog, char *args[] ) { - int status, pid; + int pid; wait4kids( maxkids ); diff --git a/servers/slapd/tools/ldif2ldbm.c b/servers/slapd/tools/ldif2ldbm.c index 9cbdf52b37..834980e62a 100644 --- a/servers/slapd/tools/ldif2ldbm.c +++ b/servers/slapd/tools/ldif2ldbm.c @@ -23,7 +23,6 @@ static void fork_child( char *prog, char *args[] ); static void wait4kids( int nkidval ); -static char *indexcmd; static char *tailorfile; static char *inputfile; static int maxkids = 1; @@ -39,7 +38,7 @@ usage( char *name ) int main( int argc, char **argv ) { - int i, stop, status; + int i, stop; char *linep, *buf, *sbindir; char *args[MAXARGS]; char buf2[20], buf3[20]; @@ -216,10 +215,6 @@ main( int argc, char **argv ) while ( ! stop ) { char *type, *val, *s; int vlen, indexmask, syntaxmask; - Datum key, data; - - ldbm_datum_init( key ); - ldbm_datum_init( data ); if ( fgets( line, sizeof(line), stdin ) != NULL ) { int len; @@ -282,7 +277,7 @@ main( int argc, char **argv ) static void fork_child( char *prog, char *args[] ) { - int status, pid; + int pid; wait4kids( maxkids ); diff --git a/servers/slurpd/fm.c b/servers/slurpd/fm.c index 5523616ed1..0cb813caca 100644 --- a/servers/slurpd/fm.c +++ b/servers/slurpd/fm.c @@ -171,7 +171,6 @@ populate_queue( ) { FILE *fp, *lfp; - Rq *rq = sglob->rq; char *p; if ( acquire_lock( f, &fp, &lfp ) < 0 ) { diff --git a/servers/slurpd/main.c b/servers/slurpd/main.c index cc094ba446..3e3c811756 100644 --- a/servers/slurpd/main.c +++ b/servers/slurpd/main.c @@ -36,7 +36,6 @@ main( return( 1 ); #else - int status; int i; /* diff --git a/tests/progs/slapd-addel.c b/tests/progs/slapd-addel.c index d2adaae55e..7e3031865c 100644 --- a/tests/progs/slapd-addel.c +++ b/tests/progs/slapd-addel.c @@ -34,7 +34,7 @@ usage( char *name ) int main( int argc, char **argv ) { - int i, j; + int i; char *host = "localhost"; int port = -1; char *manager = NULL; diff --git a/tests/progs/slapd-read.c b/tests/progs/slapd-read.c index 2e15ce3dec..6564b936a1 100644 --- a/tests/progs/slapd-read.c +++ b/tests/progs/slapd-read.c @@ -30,7 +30,7 @@ usage( char *name ) int main( int argc, char **argv ) { - int i, j; + int i; char *host = "localhost"; int port = -1; char *entry = NULL; diff --git a/tests/progs/slapd-search.c b/tests/progs/slapd-search.c index 4b82c6d6b1..88f2ebef56 100644 --- a/tests/progs/slapd-search.c +++ b/tests/progs/slapd-search.c @@ -30,7 +30,7 @@ usage( char *name ) int main( int argc, char **argv ) { - int i, j; + int i; char *host = "localhost"; int port = -1; char *sbase = NULL; diff --git a/tests/progs/slapd-tester.c b/tests/progs/slapd-tester.c index 801b457466..51f8bee170 100644 --- a/tests/progs/slapd-tester.c +++ b/tests/progs/slapd-tester.c @@ -305,7 +305,7 @@ get_read_entries( char *filename, char *entries[] ) static void fork_child( char *prog, char *args[] ) { - int status, pid; + int pid; wait4kids( maxkids ); -- 2.39.5