Warning cleanup: signed meets unsigned.

This commit is contained in:
Hallvard Furuseth 2008-10-13 08:35:31 +00:00
parent e8afbb70fc
commit 6f39252bd0
4 changed files with 5 additions and 6 deletions

View file

@ -332,7 +332,7 @@ extern int __db_logmsg(const DB_ENV *env, DB_TXN *txn, const char *op, u_int32_t
/* Copy a pointer "src" to a pointer "dst" from big-endian to native order */
#define BDB_DISK2ID( src, dst ) \
do { int i0; ID tmp = 0; unsigned char *_p; \
do { unsigned i0; ID tmp = 0; unsigned char *_p; \
_p = (unsigned char *)(src); \
for ( i0=0; i0<sizeof(ID); i0++ ) { \
tmp <<= 8; tmp |= *_p++; \

View file

@ -747,7 +747,7 @@ bdb_cache_lru_purge( struct bdb_info *bdb )
if ( islocked )
bdb_cache_entryinfo_unlock( elru );
if ( count >= bdb->bi_cache.c_minfree ) {
if ( (unsigned) count >= bdb->bi_cache.c_minfree ) {
ldap_pvt_thread_mutex_lock( &bdb->bi_cache.c_count_mutex );
bdb->bi_cache.c_cursize -= count;
ldap_pvt_thread_mutex_unlock( &bdb->bi_cache.c_count_mutex );

View file

@ -551,9 +551,9 @@ bdb_monitor_bitmask2key( slap_mask_t bitmask )
{
int key;
for ( key = 0; key < 8*sizeof(slap_mask_t) && !( bitmask & 0x1U ); key++ ) {
for ( key = 0; key < 8 * (int)sizeof(slap_mask_t) && !( bitmask & 0x1U );
key++ )
bitmask >>= 1;
}
return key;
}

View file

@ -395,13 +395,12 @@ static int bdb_tool_next_id(
holes[nholes++].id = e->e_id;
}
} else if ( !hole ) {
unsigned i;
unsigned i, j;
e->e_id = ei->bei_id;
for ( i=0; i<nholes; i++) {
if ( holes[i].id == e->e_id ) {
int j;
free(holes[i].dn.bv_val);
for (j=i;j<nholes;j++) holes[j] = holes[j+1];
holes[j].id = 0;