aboutsummaryrefslogtreecommitdiff
path: root/tests/glx
diff options
context:
space:
mode:
authorJosé Fonseca <jfonseca@vmware.com>2012-01-20 08:28:10 +0000
committerJosé Fonseca <jfonseca@vmware.com>2012-01-20 08:28:10 +0000
commit17f35429a20542783586b821057afd799461fa2d (patch)
tree4fd89613f46fb3099d46b140352838a81f5b8cf6 /tests/glx
parenteca2e3cc6ca84ef39be7e6d29e1509646c664156 (diff)
glx-swap-event: Silence declaration-after-statement warning.
This seems to be the only outstanding use of this feature in the source. Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Diffstat (limited to 'tests/glx')
-rw-r--r--tests/glx/glx-swap-event.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/glx/glx-swap-event.c b/tests/glx/glx-swap-event.c
index 313c565b..3304d2c4 100644
--- a/tests/glx/glx-swap-event.c
+++ b/tests/glx/glx-swap-event.c
@@ -129,6 +129,7 @@ draw_frame(Display *dpy, Window win)
if (tRate0 < 0.0)
tRate0 = t;
if (t - tRate0 >= 3.0) {
+ GLfloat seconds;
if (interval_diff) {
if (message_count & 0x1) {
ret = (*pglXSwapIntervalMESA)(1);
@@ -145,7 +146,7 @@ draw_frame(Display *dpy, Window win)
}
}
message_count++;
- GLfloat seconds = t - tRate0;
+ seconds = t - tRate0;
if ( (time_val / frames) < 0.0016 ) {
// 0.0016 <=> 60Hz * 10 or 100Hz * 6
async_swap=1;