]> git.sur5r.net Git - openldap/commitdiff
Warning cleanup: signed meets unsigned.
authorHallvard Furuseth <hallvard@openldap.org>
Mon, 13 Oct 2008 08:35:31 +0000 (08:35 +0000)
committerHallvard Furuseth <hallvard@openldap.org>
Mon, 13 Oct 2008 08:35:31 +0000 (08:35 +0000)
servers/slapd/back-bdb/back-bdb.h
servers/slapd/back-bdb/cache.c
servers/slapd/back-bdb/monitor.c
servers/slapd/back-bdb/tools.c

index 19c30cc5e110f6ce7864c325b84b6861fb5ee4ae..6493a4583c96d75d380fb6cd3cd25fe4a0074035 100644 (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++;        \
index 9c7d4f8949433c6067be404511e55c7fdc850d20..e72bf30db64284d43d8c4909d648c99ac58af5ce 100644 (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 );
index 7421cb1cd4b9e34c1537243cfa1d6f726a330197..5f7134043b668b1d909b5b1f8cc75b6da09ed31d 100644 (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;
 }
index eb09962c78d553a3e664238cc8b0429e2765021d..66b2e9a32f389443b95a446a5a96946165fc870f 100644 (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;