From 6fbd42a90a619a6ed7078f2debbdad839a28222d Mon Sep 17 00:00:00 2001 From: Hallvard Furuseth Date: Fri, 17 Oct 2008 23:35:44 +0000 Subject: [PATCH] Warning cleanup: Signed meets unsigned: Change insertion index bdb_attr_slot(,, unsigned *ins) to int *ins. This index is signed elsewhere, including the index returned by the same function. --- servers/slapd/back-bdb/attr.c | 6 +++--- servers/slapd/back-bdb/proto-bdb.h | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/servers/slapd/back-bdb/attr.c b/servers/slapd/back-bdb/attr.c index dd9d06f2db..0ccbc0e862 100644 --- a/servers/slapd/back-bdb/attr.c +++ b/servers/slapd/back-bdb/attr.c @@ -30,14 +30,14 @@ * set point for insertion if ins is non-NULL */ int -bdb_attr_slot( struct bdb_info *bdb, AttributeDescription *ad, unsigned *ins ) +bdb_attr_slot( struct bdb_info *bdb, AttributeDescription *ad, int *ins ) { unsigned base = 0, cursor = 0; unsigned n = bdb->bi_nattrs; int val = 0; while ( 0 < n ) { - int pivot = n >> 1; + unsigned pivot = n >> 1; cursor = base + pivot; val = SLAP_PTRCMP( ad, bdb->bi_attrs[cursor]->ai_desc ); @@ -61,7 +61,7 @@ bdb_attr_slot( struct bdb_info *bdb, AttributeDescription *ad, unsigned *ins ) static int ainfo_insert( struct bdb_info *bdb, AttrInfo *a ) { - unsigned x; + int x; int i = bdb_attr_slot( bdb, a->ai_desc, &x ); /* Is it a dup? */ diff --git a/servers/slapd/back-bdb/proto-bdb.h b/servers/slapd/back-bdb/proto-bdb.h index 0659c6b1e2..f255334675 100644 --- a/servers/slapd/back-bdb/proto-bdb.h +++ b/servers/slapd/back-bdb/proto-bdb.h @@ -45,7 +45,7 @@ AttrInfo *bdb_attr_mask( struct bdb_info *bdb, void bdb_attr_flush( struct bdb_info *bdb ); int bdb_attr_slot( struct bdb_info *bdb, - AttributeDescription *desc, unsigned *insert ); + AttributeDescription *desc, int *insert ); int bdb_attr_index_config LDAP_P(( struct bdb_info *bdb, const char *fname, int lineno,