summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2019-09-27 20:36:43 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2019-09-27 20:37:33 +0100
commitc6cb1b199598c572484fb4e30e1026be9d4ccc31 (patch)
tree2e2cb1e24f0ae7358d6bd2dc660ce967b8d49bf7
parent581ddc5d2f55efa2cf5ec76a802fb781ee142b01 (diff)
sna: Squelch compiler warning for unused var
sna_display.c: In function ‘crtc_init_gamma’: sna_display.c:7462:28: warning: unused variable ‘lut’ [-Wunused-variable] sna_display.c:7444:14: warning: unused variable ‘sna’ [-Wunused-variable] Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
-rw-r--r--src/sna/sna_display.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/sna/sna_display.c b/src/sna/sna_display.c
index 5c377cf2..874292bc 100644
--- a/src/sna/sna_display.c
+++ b/src/sna/sna_display.c
@@ -7441,7 +7441,6 @@ static bool crtc_get_gamma_legacy(xf86CrtcPtr crtc,
static void crtc_init_gamma(xf86CrtcPtr crtc)
{
- struct sna *sna = to_sna(crtc->scrn);
struct sna_crtc *sna_crtc = to_sna_crtc(crtc);
uint16_t *gamma;
int size;
@@ -7459,11 +7458,10 @@ static void crtc_init_gamma(xf86CrtcPtr crtc)
if (gamma == NULL)
gamma = malloc(3 * size * sizeof(uint16_t));
if (gamma) {
- struct drm_mode_crtc_lut lut;
- bool gamma_set;
uint16_t *red = gamma;
uint16_t *green = gamma + size;
uint16_t *blue = gamma + 2 * size;
+ bool gamma_set;
if (sna_crtc->gamma_lut_size)
gamma_set = crtc_get_gamma_lut(crtc, red,