Enable -Werror and fix a number of minor warnings that existed.

This commit is contained in:
Eric Haszlakiewicz
2013-02-09 16:35:24 -06:00
parent 92d289f5d3
commit ca8b27d183
7 changed files with 18 additions and 16 deletions

View File

@@ -134,7 +134,7 @@ int lh_table_insert(struct lh_table *t, void *k, const void *v)
while( 1 ) {
if(t->table[n].k == LH_EMPTY || t->table[n].k == LH_FREED) break;
t->collisions++;
if(++n == t->size) n = 0;
if ((int)++n == t->size) n = 0;
}
t->table[n].k = k;
@@ -166,7 +166,7 @@ struct lh_entry* lh_table_lookup_entry(struct lh_table *t, const void *k)
if(t->table[n].k == LH_EMPTY) return NULL;
if(t->table[n].k != LH_FREED &&
t->equal_fn(t->table[n].k, k)) return &t->table[n];
if(++n == t->size) n = 0;
if ((int)++n == t->size) n = 0;
count++;
}
return NULL;