Mesa (mesa_7_7_branch): r300: Silence 'mixed declarations and code' warning .

Vinson Lee vlee at kemper.freedesktop.org
Mon Jan 4 02:32:57 UTC 2010


Module: Mesa
Branch: mesa_7_7_branch
Commit: 58531029e6eba11c374d996ea031f1bbe4386c54
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=58531029e6eba11c374d996ea031f1bbe4386c54

Author: Vinson Lee <vlee at vmware.com>
Date:   Sun Jan  3 18:32:07 2010 -0800

r300: Silence 'mixed declarations and code' warning.

---

 src/mesa/drivers/dri/r300/compiler/memory_pool.c |    4 +++-
 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 37aa2b6..76c7c60 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));




More information about the mesa-commit mailing list