summaryrefslogtreecommitdiff
path: root/src/smi_video.c
diff options
context:
space:
mode:
authorPaulo Cesar Pereira de Andrade <pcpa@mandriva.com.br>2008-09-02 17:55:16 -0300
committerPaulo Cesar Pereira de Andrade <pcpa@mandriva.com.br>2008-09-02 17:55:16 -0300
commita2a090e10f031aed6dbf6d143d6ce8abdf7a2392 (patch)
treee957e58dfebeacf505b98c9966d7ac1319a17b4e /src/smi_video.c
parent2d5ba5f7310fa8e11f7349d116aa871a239ac35f (diff)
Correct all compiler warning messages.
Code compiled with: gcc -Wall -Wbad-function-cast -Wdeclaration-after-statement \ -Wmissing-prototypes -Wmissing-declarations -Wnested-externs \ -fno-strict-aliasing -Wold-style-definition -Wpointer-arith \ -Wstrict-prototypes This patch also makes most smi_501.c functions static, as they are not called from anywhere else. Also removed prototypes for non existent functions in smi_501.h.
Diffstat (limited to 'src/smi_video.c')
-rw-r--r--src/smi_video.c22
1 files changed, 10 insertions, 12 deletions
diff --git a/src/smi_video.c b/src/smi_video.c
index c669d6f..9ed36d9 100644
--- a/src/smi_video.c
+++ b/src/smi_video.c
@@ -1818,25 +1818,23 @@ SMI_ClipVideo(
INT32 height
)
{
- ScreenPtr pScreen = pScrn->pScreen;
SMIPtr pSmi = SMIPTR(pScrn);
INT32 vscale, hscale;
int diff;
+ RegionRec VPReg;
+ BoxRec VPBox = { pScrn->frameX0 , pScrn->frameY0,
+ pScrn->frameX1 + 1 , pScrn->frameY1 + 1};
+ BoxPtr extents = REGION_EXTENTS(pScrn->pScreen, reg);
ENTER_PROC("SMI_ClipVideo");
-
DEBUG((VERBLEV, "ClipVideo(%d): x1=%d y1=%d x2=%d y2=%d\n", __LINE__, *x1 >> 16, *y1 >> 16, *x2 >> 16, *y2 >> 16));
/* Rotate the viewport before clipping */
- RegionRec VPReg;
- BoxRec VPBox = { pScrn->frameX0 , pScrn->frameY0,
- pScrn->frameX1 + 1 , pScrn->frameY1 + 1};
if(pSmi->rotate)
ROTATE_BOX(VPBox);
- REGION_INIT(pScreen, &VPReg, &VPBox, 1);
- REGION_INTERSECT(pScreen, reg, reg, &VPReg);
- REGION_UNINIT(pScreen, &VPReg);
- BoxPtr extents = REGION_EXTENTS(pScreen, reg);
+ REGION_INIT(pScrn->pScreen, &VPReg, &VPBox, 1);
+ REGION_INTERSECT(pScrn->pScreen, reg, reg, &VPReg);
+ REGION_UNINIT(pScrn->pScreen, &VPReg);
/* PDR#941 */
extents->x1 = max(extents->x1, VPBox.x1);
@@ -1918,9 +1916,9 @@ SMI_ClipVideo(
if ((dst->x1 != extents->x1) || (dst->y1 != extents->y1) ||
(dst->x2 != extents->x2) || (dst->y2 != extents->y2)) {
RegionRec clipReg;
- REGION_INIT(pScreen, &clipReg, dst, 1);
- REGION_INTERSECT(pScreen, reg, reg, &clipReg);
- REGION_UNINIT(pScreen, &clipReg);
+ REGION_INIT(pScrn->pScreen, &clipReg, dst, 1);
+ REGION_INTERSECT(pScrn->pScreen, reg, reg, &clipReg);
+ REGION_UNINIT(pScrn->pScreen, &clipReg);
}
DEBUG((VERBLEV, "ClipVideo(%d): x1=%d y1=%d x2=%d y2=%d\n", __LINE__, *x1 >> 16, *y1 >> 16, *x2 >> 16, *y2 >> 16));