Silence warnings: Remove unused variables. Enclose some initializers in in {}.

This commit is contained in:
Hallvard Furuseth 1999-03-09 07:15:35 +00:00
parent ead12e1cda
commit 5ef648a109
14 changed files with 12 additions and 26 deletions

View File

@ -26,7 +26,6 @@ do_abandon(
)
{
int id;
Backend *be;
Operation *o;
Debug( LDAP_DEBUG_TRACE, "do_abandon\n", 0, 0, 0 );

View File

@ -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';

View File

@ -87,7 +87,7 @@ parse_acl(
)
{
int i;
char *e, *left, *right;
char *left, *right;
struct acl *a;
struct access *b;

View File

@ -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,

View File

@ -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( "" );
}

View File

@ -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;

View File

@ -26,7 +26,6 @@ do_compare(
{
char *ndn;
Ava ava;
int rc;
Backend *be;
Debug( LDAP_DEBUG_TRACE, "do_compare\n", 0, 0, 0 );

View File

@ -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;

View File

@ -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;

View File

@ -217,7 +217,6 @@ entry2str(
void
entry_free( Entry *e )
{
int i;
Attribute *a, *next;
if ( e->e_dn != NULL ) {

View File

@ -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;

View File

@ -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 );

View File

@ -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;

View File

@ -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;