Commit fe0410b0 authored by Bryce Harrington's avatar Bryce Harrington Committed by Daniel Stone

gl: Don't declare variables in for loop

Fixes compilation error introduced by 43cea54c:

  libweston/gl-renderer.c:2862:2: error: ‘for’ loop initial declarations
  are only allowed in C99 mode
    for (unsigned i = 0; i < ARRAY_LENGTH(swap_damage_ext_to_entrypoint);
    i++) {
    ^
Signed-off-by: default avatarBryce Harrington <bryce@osg.samsung.com>
Reviewed-by: Daniel Stone's avatarDaniel Stone <daniels@collabora.com>
parent 3447619a
......@@ -2847,6 +2847,7 @@ gl_renderer_setup_egl_extensions(struct weston_compositor *ec)
struct gl_renderer *gr = get_renderer(ec);
const char *extensions;
EGLBoolean ret;
unsigned i;
gr->create_image = (void *) eglGetProcAddress("eglCreateImageKHR");
gr->destroy_image = (void *) eglGetProcAddress("eglDestroyImageKHR");
......@@ -2878,7 +2879,7 @@ gl_renderer_setup_egl_extensions(struct weston_compositor *ec)
weston_log("warning: EGL_EXT_buffer_age not supported. "
"Performance could be affected.\n");
for (unsigned i = 0; i < ARRAY_LENGTH(swap_damage_ext_to_entrypoint); i++) {
for (i = 0; i < ARRAY_LENGTH(swap_damage_ext_to_entrypoint); i++) {
if (weston_check_egl_extension(extensions,
swap_damage_ext_to_entrypoint[i].extension)) {
gr->swap_buffers_with_damage =
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment