From 3b8475878f3b122ae7aab5f56bf3b235071ec423 Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Sat, 15 Feb 2014 21:33:12 +0100 Subject: c90 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- src/blueshift_randr.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/blueshift_randr.c b/src/blueshift_randr.c index 64e5211..0338300 100644 --- a/src/blueshift_randr.c +++ b/src/blueshift_randr.c @@ -48,6 +48,8 @@ int main(int argc __attribute__((unused)), char** argv __attribute__((unused))) uint16_t* r_gamma; uint16_t* g_gamma; uint16_t* b_gamma; + unsigned int i; + xcb_void_cookie_t gamma_set_cookie; connection = xcb_connect(NULL, NULL /* preferred screen */); @@ -125,7 +127,7 @@ int main(int argc __attribute__((unused)), char** argv __attribute__((unused))) b_gamma = xcb_randr_get_crtc_gamma_blue(gamma_get_reply); - for (unsigned int i = 0; i < curve_size; i++) + for (i = 0; i < curve_size; i++) { *(r_gamma + i) = (1 << 16) - 1 - *(r_gamma + i); *(g_gamma + i) = (1 << 16) - 1 - *(g_gamma + i); @@ -133,8 +135,7 @@ int main(int argc __attribute__((unused)), char** argv __attribute__((unused))) } - xcb_void_cookie_t gamma_set_cookie = - xcb_randr_set_crtc_gamma_checked(connection, *crtcs, curve_size, r_gamma, g_gamma, b_gamma); + gamma_set_cookie = xcb_randr_set_crtc_gamma_checked(connection, *crtcs, curve_size, r_gamma, g_gamma, b_gamma); error = xcb_request_check(connection, gamma_set_cookie); if (error) -- cgit v1.2.3-70-g09d2