diff options
author | Kevin Brace <kevinbrace@gmx.com> | 2018-12-17 15:08:45 -0600 |
---|---|---|
committer | Kevin Brace <kevinbrace@gmx.com> | 2018-12-17 15:08:45 -0600 |
commit | 0b2cce041e445cee8a8308b9ae4ea70794ae8c13 (patch) | |
tree | 0712de751052be929ae4ac4124977b79507f6f7b | |
parent | 301cefae671cb2a4f25b068b0ef2ea9331ae17f3 (diff) |
Eliminate swap macro related unused variable compilation warnings
Unfortunately, commit c530ebb5d4ad0663838a0132e3610d713eaaa640 did not
the check for ABI_VIDEODRV_VERSION where the swap macros are actually
used in the code. Checking for ABI_VIDEODRV_VERSION suppresses unused
variable compilation warnings for newer versions of the X Server.
Signed-off-by: Kevin Brace <kevinbrace@gmx.com>
-rw-r--r-- | src/sis_driver.c | 26 | ||||
-rw-r--r-- | src/sis_utility.c | 8 |
2 files changed, 34 insertions, 0 deletions
diff --git a/src/sis_driver.c b/src/sis_driver.c index d5ba1bd..8e86c06 100644 --- a/src/sis_driver.c +++ b/src/sis_driver.c @@ -2148,7 +2148,9 @@ int SiSProcXineramaQueryVersion(ClientPtr client) { xPanoramiXQueryVersionReply rep; +#if GET_ABI_MAJOR(ABI_VIDEODRV_VERSION) < 12 register int n; +#endif REQUEST_SIZE_MATCH(xPanoramiXQueryVersionReq); rep.type = X_Reply; @@ -2172,7 +2174,9 @@ SiSProcXineramaGetState(ClientPtr client) REQUEST(xPanoramiXGetStateReq); WindowPtr pWin; xPanoramiXGetStateReply rep; +#if GET_ABI_MAJOR(ABI_VIDEODRV_VERSION) < 12 register int n; +#endif int rc; REQUEST_SIZE_MATCH(xPanoramiXGetStateReq); @@ -2198,7 +2202,9 @@ SiSProcXineramaGetScreenCount(ClientPtr client) REQUEST(xPanoramiXGetScreenCountReq); WindowPtr pWin; xPanoramiXGetScreenCountReply rep; +#if GET_ABI_MAJOR(ABI_VIDEODRV_VERSION) < 12 register int n; +#endif int rc; REQUEST_SIZE_MATCH(xPanoramiXGetScreenCountReq); @@ -2224,7 +2230,9 @@ SiSProcXineramaGetScreenSize(ClientPtr client) REQUEST(xPanoramiXGetScreenSizeReq); WindowPtr pWin; xPanoramiXGetScreenSizeReply rep; +#if GET_ABI_MAJOR(ABI_VIDEODRV_VERSION) < 12 register int n; +#endif int rc; REQUEST_SIZE_MATCH(xPanoramiXGetScreenSizeReq); @@ -2259,7 +2267,9 @@ SiSProcXineramaIsActive(ClientPtr client) rep.sequenceNumber = client->sequence; rep.state = !SiSnoPanoramiXExtension; if(client->swapped) { +#if GET_ABI_MAJOR(ABI_VIDEODRV_VERSION) < 12 register int n; +#endif _swaps(&rep.sequenceNumber, n); _swapl(&rep.length, n); _swapl(&rep.state, n); @@ -2280,7 +2290,9 @@ SiSProcXineramaQueryScreens(ClientPtr client) rep.number = (SiSnoPanoramiXExtension) ? 0 : SiSXineramaNumScreens; rep.length = rep.number * sz_XineramaScreenInfo >> 2; if(client->swapped) { +#if GET_ABI_MAJOR(ABI_VIDEODRV_VERSION) < 12 register int n; +#endif _swaps(&rep.sequenceNumber, n); _swapl(&rep.length, n); _swapl(&rep.number, n); @@ -2297,7 +2309,9 @@ SiSProcXineramaQueryScreens(ClientPtr client) scratch.width = SiSXineramadataPtr[i].width; scratch.height = SiSXineramadataPtr[i].height; if(client->swapped) { +#if GET_ABI_MAJOR(ABI_VIDEODRV_VERSION) < 12 register int n; +#endif _swaps(&scratch.x_org, n); _swaps(&scratch.y_org, n); _swaps(&scratch.width, n); @@ -2337,7 +2351,9 @@ static int SiSSProcXineramaQueryVersion (ClientPtr client) { REQUEST(xPanoramiXQueryVersionReq); +#if GET_ABI_MAJOR(ABI_VIDEODRV_VERSION) < 12 register int n; +#endif _swaps(&stuff->length,n); REQUEST_SIZE_MATCH (xPanoramiXQueryVersionReq); return SiSProcXineramaQueryVersion(client); @@ -2347,7 +2363,9 @@ static int SiSSProcXineramaGetState(ClientPtr client) { REQUEST(xPanoramiXGetStateReq); +#if GET_ABI_MAJOR(ABI_VIDEODRV_VERSION) < 12 register int n; +#endif _swaps (&stuff->length, n); REQUEST_SIZE_MATCH(xPanoramiXGetStateReq); return SiSProcXineramaGetState(client); @@ -2357,7 +2375,9 @@ static int SiSSProcXineramaGetScreenCount(ClientPtr client) { REQUEST(xPanoramiXGetScreenCountReq); +#if GET_ABI_MAJOR(ABI_VIDEODRV_VERSION) < 12 register int n; +#endif _swaps (&stuff->length, n); REQUEST_SIZE_MATCH(xPanoramiXGetScreenCountReq); return SiSProcXineramaGetScreenCount(client); @@ -2367,7 +2387,9 @@ static int SiSSProcXineramaGetScreenSize(ClientPtr client) { REQUEST(xPanoramiXGetScreenSizeReq); +#if GET_ABI_MAJOR(ABI_VIDEODRV_VERSION) < 12 register int n; +#endif _swaps (&stuff->length, n); REQUEST_SIZE_MATCH(xPanoramiXGetScreenSizeReq); return SiSProcXineramaGetScreenSize(client); @@ -2377,7 +2399,9 @@ static int SiSSProcXineramaIsActive(ClientPtr client) { REQUEST(xXineramaIsActiveReq); +#if GET_ABI_MAJOR(ABI_VIDEODRV_VERSION) < 12 register int n; +#endif _swaps (&stuff->length, n); REQUEST_SIZE_MATCH(xXineramaIsActiveReq); return SiSProcXineramaIsActive(client); @@ -2387,7 +2411,9 @@ static int SiSSProcXineramaQueryScreens(ClientPtr client) { REQUEST(xXineramaQueryScreensReq); +#if GET_ABI_MAJOR(ABI_VIDEODRV_VERSION) < 12 register int n; +#endif _swaps (&stuff->length, n); REQUEST_SIZE_MATCH(xXineramaQueryScreensReq); return SiSProcXineramaQueryScreens(client); diff --git a/src/sis_utility.c b/src/sis_utility.c index c86bdbe..1617922 100644 --- a/src/sis_utility.c +++ b/src/sis_utility.c @@ -1871,7 +1871,9 @@ static int SiSProcSiSCtrlQueryVersion(ClientPtr client) { xSiSCtrlQueryVersionReply rep; +#if GET_ABI_MAJOR(ABI_VIDEODRV_VERSION) < 12 register int n; +#endif REQUEST_SIZE_MATCH(xSiSCtrlQueryVersionReq); rep.type = X_Reply; @@ -1896,7 +1898,9 @@ SiSProcSiSCtrlCommand(ClientPtr client) xSiSCtrlCommandReply rep; ExtensionEntry *myext; xSiSCtrlScreenTable *myctrl; +#if GET_ABI_MAJOR(ABI_VIDEODRV_VERSION) < 12 register int n; +#endif int i, ret; REQUEST_SIZE_MATCH(xSiSCtrlCommandReq); @@ -1958,7 +1962,9 @@ static int SiSSProcSiSCtrlQueryVersion(ClientPtr client) { REQUEST(xSiSCtrlQueryVersionReq); +#if GET_ABI_MAJOR(ABI_VIDEODRV_VERSION) < 12 register int n; +#endif _swaps(&stuff->length, n); REQUEST_SIZE_MATCH(xSiSCtrlQueryVersionReq); return SiSProcSiSCtrlQueryVersion(client); @@ -1968,7 +1974,9 @@ static int SiSSProcSiSCtrlCommand(ClientPtr client) { REQUEST(xSiSCtrlCommandReq); +#if GET_ABI_MAJOR(ABI_VIDEODRV_VERSION) < 12 register int n; +#endif int i; _swaps(&stuff->length, n); _swapl(&stuff->screen, n); |