diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2012-06-06 17:10:35 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2012-06-06 17:10:35 +0100 |
commit | 08010b23a3e2bc37d202251923fac814b18fa501 (patch) | |
tree | 6b48d48f6741c750cc1bfbb252bd351ac12b5659 /src/intel_dri.c | |
parent | 06b1b875ba13227ddaf7f28dbdcdaa3eb49f0857 (diff) |
uxa/dri: Silence static analyser for potential NULL intel_pixmap
If the intel_pixmap was NULL we should have failed to create the DRI2
buffer, so we can safely assert here to keep the analyser quiet.
Reported-by: Zdenek Kabelac <zkabelac@redhat.com>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'src/intel_dri.c')
-rw-r--r-- | src/intel_dri.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/intel_dri.c b/src/intel_dri.c index 2ed55597..6bf76d09 100644 --- a/src/intel_dri.c +++ b/src/intel_dri.c @@ -919,6 +919,13 @@ intel_glamor_create_back_pixmap(ScreenPtr screen, return back_pixmap; } +static drm_intel_bo *get_pixmap_bo(I830DRI2BufferPrivatePtr priv) +{ + drm_intel_bo *bo = intel_get_pixmap_bo(priv->pixmap); + assert(bo != NULL); /* guaranteed by construction of the DRI2 buffer */ + return bo; +} + /* * Our internal swap routine takes care of actually exchanging, blitting, or * flipping buffers as necessary. @@ -935,7 +942,7 @@ I830DRI2ScheduleFlip(struct intel_screen_private *intel, if (!intel->use_triple_buffer) { info->type = DRI2_SWAP; if (!intel_do_pageflip(intel, - intel_get_pixmap_bo(priv->pixmap), + get_pixmap_bo(priv), info, info->pipe)) return FALSE; @@ -990,7 +997,7 @@ I830DRI2ScheduleFlip(struct intel_screen_private *intel, intel->back_buffer = NULL; } - old_back = intel_get_pixmap_bo(priv->pixmap); + old_back = get_pixmap_bo(priv); if (!intel_do_pageflip(intel, old_back, info, info->pipe)) { intel->back_buffer = new_back; return FALSE; |