summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin-Éric Racine <martin-eric.racine@iki.fi>2011-12-25 21:43:40 +0200
committerMartin-Éric Racine <martin-eric.racine@iki.fi>2011-12-25 21:43:40 +0200
commit7e7fe26882dada5878d5450e64c043ba7b0737fd (patch)
treee8e88a790618286429b351f2408306631eb056cd
parent515d232162c8ea2c5ecabf12b88b0bf4eb5102e7 (diff)
Fix lx_display.c:360:9: warning: ISO C90 forbids mixed declarations and code
-rw-r--r--src/lx_display.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/lx_display.c b/src/lx_display.c
index 1f240f5..b46fa17 100644
--- a/src/lx_display.c
+++ b/src/lx_display.c
@@ -354,10 +354,11 @@ lx_crtc_gamma_set(xf86CrtcPtr crtc, CARD16 * red, CARD16 * green,
*/
for (i = 0; i < 256; i++) {
+ unsigned int val;
(*red) &= 0xff00;
(*green) &= 0xff00;
(*blue) &= 0xff00;
- unsigned int val = (*(red++) << 8) | *(green++) | (*(blue++) >> 8);
+ val = (*(red++) << 8) | *(green++) | (*(blue++) >> 8);
df_set_video_palette_entry(i, val);
}