[Mesa-dev] [PATCH 3/5] mesa: move declaration before code
Jose Fonseca
jfonseca at vmware.com
Fri Feb 27 14:02:26 PST 2015
I think this is fine now.
We need to update SCons to be less pedantic about the -Wdeclaration-after-statement / -Wpointer-arith this on a per-directory-basis, like my recent configure.ac change.
Jose
________________________________________
From: mesa-dev <mesa-dev-bounces at lists.freedesktop.org> on behalf of Brian Paul <brianp at vmware.com>
Sent: 27 February 2015 20:07
To: mesa-dev at lists.freedesktop.org
Subject: [Mesa-dev] [PATCH 3/5] mesa: move declaration before code
To fix MinGW warning.
---
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];
}
--
1.9.1
_______________________________________________
mesa-dev mailing list
mesa-dev at lists.freedesktop.org
https://urldefense.proofpoint.com/v2/url?u=http-3A__lists.freedesktop.org_mailman_listinfo_mesa-2Ddev&d=AwIGaQ&c=Sqcl0Ez6M0X8aeM67LKIiDJAXVeAw-YihVMNtXt-uEs&r=zfmBZnnVGHeYde45pMKNnVyzeaZbdIqVLprmZCM2zzE&m=wdMATjjfK8jXIMaa_U4Okqmf0L6WCqcI96sykCISLS0&s=WTPNaE_C1hNwj9EJ8u45nyhP-geoZvsndEtO0lybXJk&e=
More information about the mesa-dev
mailing list