[PATCH] savage: Drop unused variables and functions
Tormod Volden
lists.tormod at gmail.com
Sun Jan 23 06:49:57 PST 2011
From: Tormod Volden <debian.tormod at gmail.com>
Silence -Wall warnings.
The functions are just #if'ed out, to be left for inspiration.
---
src/savage_accel.c | 3 ++-
src/savage_cursor.c | 2 ++
src/savage_exa.c | 1 -
src/savage_video.c | 5 +----
4 files changed, 5 insertions(+), 6 deletions(-)
diff --git a/src/savage_accel.c b/src/savage_accel.c
index 73c2d90..24e0a22 100644
--- a/src/savage_accel.c
+++ b/src/savage_accel.c
@@ -1257,6 +1257,7 @@ void SavageSetGBD_2000(ScrnInfoPtr pScrn)
OUTREG8(SEQ_DATA_REG,byte);
}
+#if 0
static
void SavageRestoreAccelState(ScrnInfoPtr pScrn)
{
@@ -1266,6 +1267,7 @@ void SavageRestoreAccelState(ScrnInfoPtr pScrn)
return;
}
+#endif
/* Acceleration init function, sets up pointers to our accelerated functions */
@@ -1278,7 +1280,6 @@ SavageInitAccel(ScreenPtr pScreen)
#ifdef XF86DRI
if (psav->directRenderingEnabled) {
SAVAGEDRIServerPrivatePtr pSAVAGEDRIServer = psav->DRIServerInfo;
- BoxRec MemBox;
int cpp = pScrn->bitsPerPixel / 8;
int widthBytes = psav->lDelta;
int bufferSize = ((pScrn->virtualY * widthBytes + SAVAGE_BUFFER_ALIGN)
diff --git a/src/savage_cursor.c b/src/savage_cursor.c
index 1af2449..4d193eb 100644
--- a/src/savage_cursor.c
+++ b/src/savage_cursor.c
@@ -79,6 +79,7 @@ static void SavageSetCursorColors(ScrnInfoPtr pScrn, int bg, int fg);
* the HW cursor position.
*/
+#if 0
static Bool
SavageUseHWCursor(ScreenPtr pScr, CursorPtr pCurs)
{
@@ -94,6 +95,7 @@ SavageUseHWCursor(ScreenPtr pScr, CursorPtr pCurs)
}
return TRUE;
}
+#endif
Bool
SavageHWCursorInit(ScreenPtr pScreen)
diff --git a/src/savage_exa.c b/src/savage_exa.c
index 5515f2c..4fe43e5 100644
--- a/src/savage_exa.c
+++ b/src/savage_exa.c
@@ -567,7 +567,6 @@ SavageUploadToScreen(PixmapPtr pDst, int x, int y, int w, int h, char *src, int
Bool
SavageDownloadFromScreen(PixmapPtr pSrc, int x, int y, int w, int h, char *dst, int dst_pitch)
{
- ScrnInfoPtr pScrn = xf86Screens[pSrc->drawable.pScreen->myNum];
unsigned char *src = pSrc->devPrivate.ptr;
int src_pitch = exaGetPixmapPitch(pSrc);
int bpp = pSrc->drawable.bitsPerPixel;
diff --git a/src/savage_video.c b/src/savage_video.c
index 86ae0cd..9f860c7 100644
--- a/src/savage_video.c
+++ b/src/savage_video.c
@@ -1038,7 +1038,6 @@ SavageStopVideo(ScrnInfoPtr pScrn, pointer data, Bool shutdown)
{
SavagePortPrivPtr pPriv = (SavagePortPrivPtr)data;
SavagePtr psav = SAVPTR(pScrn);
- ScreenPtr pScreen = screenInfo.screens[pScrn->scrnIndex];
xf86ErrorFVerb(XVTRACE,"SavageStopVideo\n");
@@ -1214,7 +1213,6 @@ SavageCopyPlanarDataBCI(
unsigned long offsetV = offsetY + srcPitch * h;
unsigned long offsetU = offsetV + srcPitch2 * (h>>1);
unsigned long dstOffset = (unsigned long)dst - (unsigned long)psav->FBBase;
- int i;
unsigned char memType;
BCI_GET_PTR;
@@ -1975,7 +1973,6 @@ SavagePutImage(
upload to framebuffer (slower) */
#ifdef XF86DRI
if (!pPriv->tried_agp && !psav->IsPCI && psav->drmFD > 0 && psav->DRIServerInfo != NULL) {
- int ret;
SAVAGEDRIServerPrivatePtr pSAVAGEDRIServer = psav->DRIServerInfo;
pPriv->tried_agp = TRUE;
@@ -2335,7 +2332,7 @@ SavageDisplaySurface(
surface->width, surface->height, surface->pitches[0],
x1, y1, x2, y2, &dstBox, src_w, src_h, drw_w, drw_h);
- xf86XVFillKeyHelper(pScrn->pScreen, portPriv->colorKey, clipBoxes);
+ xf86XVFillKeyHelper(pScreen, portPriv->colorKey, clipBoxes);
pPriv->isOn = TRUE;
#if 0
--
1.7.0.4
More information about the xorg-devel
mailing list