Mesa (master): mesa: move declaration before code

Brian Paul brianp at kemper.freedesktop.org
Fri Feb 27 22:27:27 UTC 2015


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

Author: Brian Paul <brianp at vmware.com>
Date:   Fri Feb 27 13:05:16 2015 -0700

mesa: move declaration before code

To fix MinGW warning.

Reviewed-by: Anuj Phogat <anuj.phogat at gmail.com>

---

 src/mesa/main/queryobj.c |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/mesa/main/queryobj.c b/src/mesa/main/queryobj.c
index e02969d2..0842b54 100644
--- a/src/mesa/main/queryobj.c
+++ b/src/mesa/main/queryobj.c
@@ -146,12 +146,13 @@ static struct gl_query_object **
 get_pipe_stats_binding_point(struct gl_context *ctx,
                              GLenum target)
 {
+   const int which = target - GL_VERTICES_SUBMITTED_ARB;
+   assert(which < MAX_PIPELINE_STATISTICS);
+
    if (!_mesa_is_desktop_gl(ctx) ||
        !ctx->Extensions.ARB_pipeline_statistics_query)
       return NULL;
 
-   const int which = target - GL_VERTICES_SUBMITTED_ARB;
-   assert(which < MAX_PIPELINE_STATISTICS);
    return &ctx->Query.pipeline_stats[which];
 }
 




More information about the mesa-commit mailing list