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.
This commit is contained in:
Hallvard Furuseth 2008-10-17 23:35:44 +00:00
parent 08852acb80
commit 6fbd42a90a
2 changed files with 4 additions and 4 deletions
servers/slapd/back-bdb

View File

@ -30,14 +30,14 @@
* set point for insertion if ins is non-NULL * set point for insertion if ins is non-NULL
*/ */
int 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 base = 0, cursor = 0;
unsigned n = bdb->bi_nattrs; unsigned n = bdb->bi_nattrs;
int val = 0; int val = 0;
while ( 0 < n ) { while ( 0 < n ) {
int pivot = n >> 1; unsigned pivot = n >> 1;
cursor = base + pivot; cursor = base + pivot;
val = SLAP_PTRCMP( ad, bdb->bi_attrs[cursor]->ai_desc ); 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 static int
ainfo_insert( struct bdb_info *bdb, AttrInfo *a ) ainfo_insert( struct bdb_info *bdb, AttrInfo *a )
{ {
unsigned x; int x;
int i = bdb_attr_slot( bdb, a->ai_desc, &x ); int i = bdb_attr_slot( bdb, a->ai_desc, &x );
/* Is it a dup? */ /* Is it a dup? */

View File

@ -45,7 +45,7 @@ AttrInfo *bdb_attr_mask( struct bdb_info *bdb,
void bdb_attr_flush( struct bdb_info *bdb ); void bdb_attr_flush( struct bdb_info *bdb );
int bdb_attr_slot( 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, int bdb_attr_index_config LDAP_P(( struct bdb_info *bdb,
const char *fname, int lineno, const char *fname, int lineno,