summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/gallium/auxiliary/cso_cache/cso_hash.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/gallium/auxiliary/cso_cache/cso_hash.c b/src/gallium/auxiliary/cso_cache/cso_hash.c
index b40217c524b..e65d331a0b2 100644
--- a/src/gallium/auxiliary/cso_cache/cso_hash.c
+++ b/src/gallium/auxiliary/cso_cache/cso_hash.c
@@ -134,7 +134,7 @@ static void cso_data_rehash(struct cso_hash_data *hash, int hint)
hint = countBits(-hint);
if (hint < MinNumBits)
hint = MinNumBits;
- hash->userNumBits = hint;
+ hash->userNumBits = (short)hint;
while (primeForNumBits(hint) < (hash->size >> 1))
++hint;
} else if (hint < MinNumBits) {
@@ -147,7 +147,7 @@ static void cso_data_rehash(struct cso_hash_data *hash, int hint)
int oldNumBuckets = hash->numBuckets;
int i = 0;
- hash->numBits = hint;
+ hash->numBits = (short)hint;
hash->numBuckets = primeForNumBits(hint);
hash->buckets = malloc(sizeof(struct cso_node*) * hash->numBuckets);
for (i = 0; i < hash->numBuckets; ++i)
@@ -241,7 +241,7 @@ struct cso_hash * cso_hash_create(void)
hash->data.d->buckets = 0;
hash->data.d->size = 0;
hash->data.d->nodeSize = sizeof(struct cso_node);
- hash->data.d->userNumBits = MinNumBits;
+ hash->data.d->userNumBits = (short)MinNumBits;
hash->data.d->numBits = 0;
hash->data.d->numBuckets = 0;