diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2013-02-27 22:19:06 +0000 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2013-02-27 22:19:06 +0000 |
commit | bfc1fda87f442890919100473b819240f9c30c44 (patch) | |
tree | 870cf8bdc9de14ab04690b0fd12c939039a991b2 /src/sna | |
parent | f08ad3f8ef1ac3a38a92f793fa1cbc1d2d443095 (diff) |
sna/dri: Fix use of uninitialised pipe along error path
> sna_dri.c:2018:6: warning: variable 'pipe' is used uninitialized
> whenever 'if' condition is true [-Wsometimes-uninitialized]
> if (get_private(front)->pixmap != get_drawable_pixmap(draw))
> ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> sna_dri.c:2150:42: note: uninitialized use occurs here
> DRI2SwapComplete(client, draw, 0, 0, 0, pipe, func, data);
Reported-by: Sedat Dilek <sedat.dilek@gmail.com>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'src/sna')
-rw-r--r-- | src/sna/sna_dri.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/sna/sna_dri.c b/src/sna/sna_dri.c index 649624e1..d30c3a4b 100644 --- a/src/sna/sna_dri.c +++ b/src/sna/sna_dri.c @@ -2136,7 +2136,6 @@ sna_dri_schedule_swap(ClientPtr client, DrawablePtr draw, DRI2BufferPtr front, return TRUE; blit: - pipe = DRI2_BLIT_COMPLETE; if (can_blit(sna, draw, front, back)) { DBG(("%s -- blit\n", __FUNCTION__)); sna_dri_copy_to_front(sna, draw, NULL, @@ -2147,7 +2146,7 @@ blit: if (info) sna_dri_frame_event_info_free(sna, draw, info); skip: - DRI2SwapComplete(client, draw, 0, 0, 0, pipe, func, data); + DRI2SwapComplete(client, draw, 0, 0, 0, DRI2_BLIT_COMPLETE, func, data); *target_msc = 0; /* offscreen, so zero out target vblank count */ return TRUE; } |