summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/r300
diff options
context:
space:
mode:
authorVinson Lee <[email protected]>2010-01-03 18:32:07 -0800
committerVinson Lee <[email protected]>2010-01-03 18:32:07 -0800
commit58531029e6eba11c374d996ea031f1bbe4386c54 (patch)
treeb027a0129995b2cd5fbd2d3ed1314e74d9c6d5e8 /src/mesa/drivers/dri/r300
parent3e196f433dc02654f1c0f7989e2e7e7a5c4b425d (diff)
r300: Silence 'mixed declarations and code' warning.
Diffstat (limited to 'src/mesa/drivers/dri/r300')
-rw-r--r--src/mesa/drivers/dri/r300/compiler/memory_pool.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/mesa/drivers/dri/r300/compiler/memory_pool.c b/src/mesa/drivers/dri/r300/compiler/memory_pool.c
index 37aa2b65798..76c7c60d8f5 100644
--- a/src/mesa/drivers/dri/r300/compiler/memory_pool.c
+++ b/src/mesa/drivers/dri/r300/compiler/memory_pool.c
@@ -71,12 +71,14 @@ static void refill_pool(struct memory_pool * pool)
void * memory_pool_malloc(struct memory_pool * pool, unsigned int bytes)
{
if (bytes < POOL_LARGE_ALLOC) {
+ void * ptr;
+
if (pool->head + bytes > pool->end)
refill_pool(pool);
assert(pool->head + bytes <= pool->end);
- void * ptr = pool->head;
+ ptr = pool->head;
pool->head += bytes;
pool->head = (unsigned char*)(((unsigned long)pool->head + POOL_ALIGN - 1) & ~(POOL_ALIGN - 1));