From 01e004951e60cd0c91f689262bce61acada91f0c Mon Sep 17 00:00:00 2001 From: Michael Beck Date: Wed, 9 Jul 2008 02:11:36 +0000 Subject: [PATCH] - fixed warnings [r20383] --- ir/adt/hashset.c | 26 +++++++++++++------------- ir/ir/irlinkednodemap.c | 3 +-- ir/ir/irlinkednodeset.c | 3 +-- ir/ir/valueset.c | 3 +-- 4 files changed, 16 insertions(+), 19 deletions(-) diff --git a/ir/adt/hashset.c b/ir/adt/hashset.c index d159c7d6f..0e8e5291e 100644 --- a/ir/adt/hashset.c +++ b/ir/adt/hashset.c @@ -266,6 +266,19 @@ InsertReturnValue insert_nogrow(HashSet *self, KeyType key) } } +/** + * calculate shrink and enlarge limits + * @internal + */ +static INLINE +void reset_thresholds(HashSet *self) +{ + self->enlarge_threshold = (size_t) HT_OCCUPANCY_FLT(self->num_buckets); + self->shrink_threshold = (size_t) HT_EMPTY_FLT(self->num_buckets); + self->consider_shrink = 0; +} + +#ifndef HAVE_OWN_RESIZE /** * Inserts an element into a hashset under the assumption that the hashset * contains no deleted entries and the element doesn't exist in the hashset yet. @@ -309,19 +322,6 @@ void insert_new(HashSet *self, unsigned hash, ValueType value) } } -/** - * calculate shrink and enlarge limits - * @internal - */ -static INLINE -void reset_thresholds(HashSet *self) -{ - self->enlarge_threshold = (size_t) HT_OCCUPANCY_FLT(self->num_buckets); - self->shrink_threshold = (size_t) HT_EMPTY_FLT(self->num_buckets); - self->consider_shrink = 0; -} - -#ifndef HAVE_OWN_RESIZE /** * Resize the hashset * @internal diff --git a/ir/ir/irlinkednodemap.c b/ir/ir/irlinkednodemap.c index ffd0c542d..f3aa3ce99 100644 --- a/ir/ir/irlinkednodemap.c +++ b/ir/ir/irlinkednodemap.c @@ -72,10 +72,9 @@ static ir_lnk_nodemap_entry_t null_nodemap_entry; * Resize the hashset * @internal */ -static INLINE +static void resize(HashSet *self, size_t new_size) { - size_t num_buckets = self->num_buckets; HashSetEntry *old_entries = self->entries; HashSetEntry *new_entries; list_head list = self->elem_list; diff --git a/ir/ir/irlinkednodeset.c b/ir/ir/irlinkednodeset.c index 36a113c4a..8f77c0a63 100644 --- a/ir/ir/irlinkednodeset.c +++ b/ir/ir/irlinkednodeset.c @@ -72,10 +72,9 @@ static ir_lnk_nodeset_entry_t null_nodeset_entry; * Resize the hashset * @internal */ -static INLINE +static void resize(HashSet *self, size_t new_size) { - size_t num_buckets = self->num_buckets; HashSetEntry *old_entries = self->entries; HashSetEntry *new_entries; list_head list = self->elem_list; diff --git a/ir/ir/valueset.c b/ir/ir/valueset.c index 997501705..7f99aa290 100644 --- a/ir/ir/valueset.c +++ b/ir/ir/valueset.c @@ -69,10 +69,9 @@ static ir_valueset_entry_t null_valueset_entry; * Resize the hashset * @internal */ -static INLINE +static void resize(HashSet *self, size_t new_size) { - size_t num_buckets = self->num_buckets; HashSetEntry *old_entries = self->entries; HashSetEntry *new_entries; list_head list = self->elem_list; -- 2.20.1