sna: Fix a smattering of static analysis warnings
Reported-by: Zdenek Kabelac <zkabelac@redhat.com> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
This commit is contained in:
parent
8eed569fb3
commit
dc0fe44beb
|
|
@ -2477,7 +2477,6 @@ gen3_composite_set_target(struct sna *sna,
|
|||
op->dst.format = dst->format;
|
||||
op->dst.width = op->dst.pixmap->drawable.width;
|
||||
op->dst.height = op->dst.pixmap->drawable.height;
|
||||
priv = sna_pixmap(op->dst.pixmap);
|
||||
|
||||
op->dst.bo = NULL;
|
||||
priv = sna_pixmap(op->dst.pixmap);
|
||||
|
|
|
|||
|
|
@ -3277,10 +3277,10 @@ sna_put_image(DrawablePtr drawable, GCPtr gc, int depth,
|
|||
if (priv == NULL) {
|
||||
DBG(("%s: fbPutImage, unattached(%d, %d, %d, %d)\n",
|
||||
__FUNCTION__, x, y, w, h));
|
||||
if (!sna_gc_move_to_cpu(gc, drawable))
|
||||
goto out;
|
||||
|
||||
fbPutImage(drawable, gc, depth, x, y, w, h, left, format, bits);
|
||||
if (sna_gc_move_to_cpu(gc, drawable))
|
||||
fbPutImage(drawable, gc, depth,
|
||||
x, y, w, h, left,
|
||||
format, bits);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -174,7 +174,7 @@ sna_video_clip_helper(ScrnInfoPtr scrn,
|
|||
ret = xf86XVClipVideoHelper(dst, &x1, &x2, &y1, &y2,
|
||||
crtc_region, frame->width, frame->height);
|
||||
if (crtc_region != reg)
|
||||
RegionUninit(&crtc_region_local);
|
||||
RegionUninit(crtc_region);
|
||||
|
||||
frame->top = y1 >> 16;
|
||||
frame->left = (x1 >> 16) & ~1;
|
||||
|
|
@ -539,13 +539,12 @@ void sna_video_init(struct sna *sna, ScreenPtr screen)
|
|||
return;
|
||||
|
||||
num_adaptors = xf86XVListGenericAdaptors(sna->scrn, &adaptors);
|
||||
newAdaptors =
|
||||
malloc((num_adaptors + 2) * sizeof(XF86VideoAdaptorPtr *));
|
||||
if (newAdaptors == NULL)
|
||||
newAdaptors = realloc(adaptors,
|
||||
(num_adaptors + 2) * sizeof(XF86VideoAdaptorPtr));
|
||||
if (newAdaptors == NULL) {
|
||||
free(adaptors);
|
||||
return;
|
||||
|
||||
memcpy(newAdaptors, adaptors,
|
||||
num_adaptors * sizeof(XF86VideoAdaptorPtr));
|
||||
}
|
||||
adaptors = newAdaptors;
|
||||
|
||||
/* Set up textured video if we can do it at this depth and we are on
|
||||
|
|
|
|||
Loading…
Reference in New Issue