Mesa (master): ralloc: Move declaration before code.

Vinson Lee vlee at kemper.freedesktop.org
Tue Oct 25 20:31:38 PDT 2011


Module: Mesa
Branch: master
Commit: 20a20c781ac2143e92807fa8dfab086a5b7c1d53
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=20a20c781ac2143e92807fa8dfab086a5b7c1d53

Author: Vinson Lee <vlee at vmware.com>
Date:   Tue Oct 25 20:30:27 2011 -0700

ralloc: Move declaration before code.

Fixes build error with MSVC.

---

 src/glsl/ralloc.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/src/glsl/ralloc.c b/src/glsl/ralloc.c
index 2967598..f5f3934 100644
--- a/src/glsl/ralloc.c
+++ b/src/glsl/ralloc.c
@@ -439,8 +439,9 @@ ralloc_asprintf_append(char **str, const char *fmt, ...)
 bool
 ralloc_vasprintf_append(char **str, const char *fmt, va_list args)
 {
+   size_t existing_length;
    assert(str != NULL);
-   size_t existing_length = *str ? strlen(*str) : 0;
+   existing_length = *str ? strlen(*str) : 0;
    return ralloc_vasprintf_rewrite_tail(str, existing_length, fmt, args);
 }
 



More information about the mesa-commit mailing list