treewide: mark pGC->ops->CopyArea() calls not using result as void
We alread have several of these calls, that aren't interested in result value, explicitly casting to void. Fixing this up for the remaining ones. This is helpful for the human reader as well as quality analysis tools. Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net> Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1648>
This commit is contained in:
parent
9929f64ec8
commit
f26f17c66a
|
@ -482,7 +482,7 @@ doShmPutImage(DrawablePtr dst, GCPtr pGC,
|
||||||
PixmapBytePad(w, depth), data);
|
PixmapBytePad(w, depth), data);
|
||||||
if (!pPixmap)
|
if (!pPixmap)
|
||||||
return;
|
return;
|
||||||
pGC->ops->CopyArea((DrawablePtr) pPixmap, dst, pGC, sx, sy, sw, sh, dx,
|
(void) pGC->ops->CopyArea((DrawablePtr) pPixmap, dst, pGC, sx, sy, sw, sh, dx,
|
||||||
dy);
|
dy);
|
||||||
FreeScratchPixmapHeader(pPixmap);
|
FreeScratchPixmapHeader(pPixmap);
|
||||||
}
|
}
|
||||||
|
|
|
@ -247,7 +247,7 @@ compRestoreWindow(WindowPtr pWin, PixmapPtr pPixmap)
|
||||||
val.val = IncludeInferiors;
|
val.val = IncludeInferiors;
|
||||||
ChangeGC(NullClient, pGC, GCSubwindowMode, &val);
|
ChangeGC(NullClient, pGC, GCSubwindowMode, &val);
|
||||||
ValidateGC(&pWin->drawable, pGC);
|
ValidateGC(&pWin->drawable, pGC);
|
||||||
(*pGC->ops->CopyArea) (&pPixmap->drawable,
|
(void) (*pGC->ops->CopyArea) (&pPixmap->drawable,
|
||||||
&pWin->drawable, pGC, x, y, w, h, 0, 0);
|
&pWin->drawable, pGC, x, y, w, h, 0, 0);
|
||||||
FreeScratchGC(pGC);
|
FreeScratchGC(pGC);
|
||||||
}
|
}
|
||||||
|
@ -552,7 +552,7 @@ compNewPixmap(WindowPtr pWin, int x, int y, int w, int h)
|
||||||
val.val = IncludeInferiors;
|
val.val = IncludeInferiors;
|
||||||
ChangeGC(NullClient, pGC, GCSubwindowMode, &val);
|
ChangeGC(NullClient, pGC, GCSubwindowMode, &val);
|
||||||
ValidateGC(&pPixmap->drawable, pGC);
|
ValidateGC(&pPixmap->drawable, pGC);
|
||||||
(*pGC->ops->CopyArea) (&pParent->drawable,
|
(void) (*pGC->ops->CopyArea) (&pParent->drawable,
|
||||||
&pPixmap->drawable,
|
&pPixmap->drawable,
|
||||||
pGC,
|
pGC,
|
||||||
x - pParent->drawable.x,
|
x - pParent->drawable.x,
|
||||||
|
|
|
@ -275,7 +275,7 @@ miDbeSwapBuffers(ClientPtr client, int *pNumWindows, DbeSwapInfoPtr swapInfo)
|
||||||
|
|
||||||
case XdbeUntouched:
|
case XdbeUntouched:
|
||||||
ValidateGC((DrawablePtr) pDbeWindowPriv->pFrontBuffer, pGC);
|
ValidateGC((DrawablePtr) pDbeWindowPriv->pFrontBuffer, pGC);
|
||||||
(*pGC->ops->CopyArea) ((DrawablePtr) pWin,
|
(void) (*pGC->ops->CopyArea) ((DrawablePtr) pWin,
|
||||||
(DrawablePtr) pDbeWindowPriv->pFrontBuffer,
|
(DrawablePtr) pDbeWindowPriv->pFrontBuffer,
|
||||||
pGC, 0, 0, pWin->drawable.width,
|
pGC, 0, 0, pWin->drawable.width,
|
||||||
pWin->drawable.height, 0, 0);
|
pWin->drawable.height, 0, 0);
|
||||||
|
@ -293,7 +293,7 @@ miDbeSwapBuffers(ClientPtr client, int *pNumWindows, DbeSwapInfoPtr swapInfo)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
ValidateGC((DrawablePtr) pWin, pGC);
|
ValidateGC((DrawablePtr) pWin, pGC);
|
||||||
(*pGC->ops->CopyArea) ((DrawablePtr) pDbeWindowPriv->pBackBuffer,
|
(void) (*pGC->ops->CopyArea) ((DrawablePtr) pDbeWindowPriv->pBackBuffer,
|
||||||
(DrawablePtr) pWin, pGC, 0, 0,
|
(DrawablePtr) pWin, pGC, 0, 0,
|
||||||
pWin->drawable.width, pWin->drawable.height, 0, 0);
|
pWin->drawable.width, pWin->drawable.height, 0, 0);
|
||||||
|
|
||||||
|
@ -620,7 +620,7 @@ miDbePositionWindow(WindowPtr pWin, int x, int y)
|
||||||
}
|
}
|
||||||
/* Copy the contents of the old front pixmap to the new one. */
|
/* Copy the contents of the old front pixmap to the new one. */
|
||||||
if (pWin->bitGravity != ForgetGravity) {
|
if (pWin->bitGravity != ForgetGravity) {
|
||||||
(*pGC->ops->CopyArea) ((DrawablePtr) pDbeWindowPriv->pFrontBuffer,
|
(void) (*pGC->ops->CopyArea) ((DrawablePtr) pDbeWindowPriv->pFrontBuffer,
|
||||||
(DrawablePtr) pFrontBuffer, pGC,
|
(DrawablePtr) pFrontBuffer, pGC,
|
||||||
sourcex, sourcey, savewidth, saveheight,
|
sourcex, sourcey, savewidth, saveheight,
|
||||||
destx, desty);
|
destx, desty);
|
||||||
|
@ -633,7 +633,7 @@ miDbePositionWindow(WindowPtr pWin, int x, int y)
|
||||||
}
|
}
|
||||||
/* Copy the contents of the old back pixmap to the new one. */
|
/* Copy the contents of the old back pixmap to the new one. */
|
||||||
if (pWin->bitGravity != ForgetGravity) {
|
if (pWin->bitGravity != ForgetGravity) {
|
||||||
(*pGC->ops->CopyArea) ((DrawablePtr) pDbeWindowPriv->pBackBuffer,
|
(void) (*pGC->ops->CopyArea) ((DrawablePtr) pDbeWindowPriv->pBackBuffer,
|
||||||
(DrawablePtr) pBackBuffer, pGC,
|
(DrawablePtr) pBackBuffer, pGC,
|
||||||
sourcex, sourcey, savewidth, saveheight,
|
sourcex, sourcey, savewidth, saveheight,
|
||||||
destx, desty);
|
destx, desty);
|
||||||
|
|
|
@ -278,7 +278,7 @@ PixmapDirtyCopyArea(PixmapPtr dst, DrawablePtr src,
|
||||||
w = dst_box.x2 - dst_box.x1;
|
w = dst_box.x2 - dst_box.x1;
|
||||||
h = dst_box.y2 - dst_box.y1;
|
h = dst_box.y2 - dst_box.y1;
|
||||||
|
|
||||||
pGC->ops->CopyArea(src, &dst->drawable, pGC,
|
(void) pGC->ops->CopyArea(src, &dst->drawable, pGC,
|
||||||
x + dst_box.x1, y + dst_box.y1, w, h,
|
x + dst_box.x1, y + dst_box.y1, w, h,
|
||||||
dst_x + dst_box.x1, dst_y + dst_box.y1);
|
dst_x + dst_box.x1, dst_y + dst_box.y1);
|
||||||
b++;
|
b++;
|
||||||
|
|
|
@ -354,7 +354,7 @@ glamor_make_pixmap_exportable(PixmapPtr pixmap, Bool modifiers_ok)
|
||||||
|
|
||||||
scratch_gc = GetScratchGC(pixmap->drawable.depth, screen);
|
scratch_gc = GetScratchGC(pixmap->drawable.depth, screen);
|
||||||
ValidateGC(&pixmap->drawable, scratch_gc);
|
ValidateGC(&pixmap->drawable, scratch_gc);
|
||||||
scratch_gc->ops->CopyArea(&pixmap->drawable, &exported->drawable,
|
(void) scratch_gc->ops->CopyArea(&pixmap->drawable, &exported->drawable,
|
||||||
scratch_gc,
|
scratch_gc,
|
||||||
0, 0, width, height, 0, 0);
|
0, 0, width, height, 0, 0);
|
||||||
FreeScratchGC(scratch_gc);
|
FreeScratchGC(scratch_gc);
|
||||||
|
|
|
@ -320,7 +320,7 @@ ms_dri2_copy_region2(ScreenPtr screen, DrawablePtr drawable, RegionPtr pRegion,
|
||||||
* callback chain so we know that will happen before the client
|
* callback chain so we know that will happen before the client
|
||||||
* tries to render again.
|
* tries to render again.
|
||||||
*/
|
*/
|
||||||
gc->ops->CopyArea(src, dst, gc,
|
(void) gc->ops->CopyArea(src, dst, gc,
|
||||||
0, 0,
|
0, 0,
|
||||||
drawable->width, drawable->height,
|
drawable->width, drawable->height,
|
||||||
off_x, off_y);
|
off_x, off_y);
|
||||||
|
|
|
@ -1565,7 +1565,7 @@ drmmode_copy_fb(ScrnInfoPtr pScrn, drmmode_ptr drmmode)
|
||||||
gc = GetScratchGC(pScrn->depth, pScreen);
|
gc = GetScratchGC(pScrn->depth, pScreen);
|
||||||
ValidateGC(&dst->drawable, gc);
|
ValidateGC(&dst->drawable, gc);
|
||||||
|
|
||||||
(*gc->ops->CopyArea)(&src->drawable, &dst->drawable, gc, 0, 0,
|
(void) (*gc->ops->CopyArea)(&src->drawable, &dst->drawable, gc, 0, 0,
|
||||||
pScrn->virtualX, pScrn->virtualY, 0, 0);
|
pScrn->virtualX, pScrn->virtualY, 0, 0);
|
||||||
|
|
||||||
FreeScratchGC(gc);
|
FreeScratchGC(gc);
|
||||||
|
|
|
@ -465,7 +465,7 @@ miOpqStipDrawable(DrawablePtr pDraw, GCPtr pGC, RegionPtr prgnSrc,
|
||||||
gcv[0].val = GXinvert;
|
gcv[0].val = GXinvert;
|
||||||
ChangeGC(NullClient, pGCT, GCFunction, gcv);
|
ChangeGC(NullClient, pGCT, GCFunction, gcv);
|
||||||
ValidateGC((DrawablePtr) pPixmap, pGCT);
|
ValidateGC((DrawablePtr) pPixmap, pGCT);
|
||||||
(*pGCT->ops->CopyArea) ((DrawablePtr) pPixmap, (DrawablePtr) pPixmap,
|
(void) (*pGCT->ops->CopyArea) ((DrawablePtr) pPixmap, (DrawablePtr) pPixmap,
|
||||||
pGCT, 0, 0, w + srcx, h, 0, 0);
|
pGCT, 0, 0, w + srcx, h, 0, 0);
|
||||||
|
|
||||||
/* Swap foreground and background colors on the GC for the drawable.
|
/* Swap foreground and background colors on the GC for the drawable.
|
||||||
|
|
|
@ -408,7 +408,7 @@ miDCSaveUnderCursor(DeviceIntPtr pDev, ScreenPtr pScreen,
|
||||||
pGC = pBuffer->pSaveGC;
|
pGC = pBuffer->pSaveGC;
|
||||||
if (pSave->drawable.serialNumber != pGC->serialNumber)
|
if (pSave->drawable.serialNumber != pGC->serialNumber)
|
||||||
ValidateGC((DrawablePtr) pSave, pGC);
|
ValidateGC((DrawablePtr) pSave, pGC);
|
||||||
(*pGC->ops->CopyArea) ((DrawablePtr) pWin, (DrawablePtr) pSave, pGC,
|
(void) (*pGC->ops->CopyArea) ((DrawablePtr) pWin, (DrawablePtr) pSave, pGC,
|
||||||
x, y, w, h, 0, 0);
|
x, y, w, h, 0, 0);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
@ -432,7 +432,7 @@ miDCRestoreUnderCursor(DeviceIntPtr pDev, ScreenPtr pScreen,
|
||||||
pGC = pBuffer->pRestoreGC;
|
pGC = pBuffer->pRestoreGC;
|
||||||
if (pWin->drawable.serialNumber != pGC->serialNumber)
|
if (pWin->drawable.serialNumber != pGC->serialNumber)
|
||||||
ValidateGC((DrawablePtr) pWin, pGC);
|
ValidateGC((DrawablePtr) pWin, pGC);
|
||||||
(*pGC->ops->CopyArea) ((DrawablePtr) pSave, (DrawablePtr) pWin, pGC,
|
(void) (*pGC->ops->CopyArea) ((DrawablePtr) pSave, (DrawablePtr) pWin, pGC,
|
||||||
0, 0, w, h, x, y);
|
0, 0, w, h, x, y);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
|
@ -84,7 +84,7 @@ present_copy_region(DrawablePtr drawable,
|
||||||
(*gc->funcs->ChangeClip)(gc, CT_REGION, update, 0);
|
(*gc->funcs->ChangeClip)(gc, CT_REGION, update, 0);
|
||||||
}
|
}
|
||||||
ValidateGC(drawable, gc);
|
ValidateGC(drawable, gc);
|
||||||
(*gc->ops->CopyArea)(&pixmap->drawable,
|
(void) (*gc->ops->CopyArea)(&pixmap->drawable,
|
||||||
drawable,
|
drawable,
|
||||||
gc,
|
gc,
|
||||||
0, 0,
|
0, 0,
|
||||||
|
|
Loading…
Reference in New Issue