/* 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++; \
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 );
{
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;
}
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;