clean some "unused" warnings
This commit is contained in:
parent
e7a6f79754
commit
3d64290547
|
@ -1093,7 +1093,6 @@ xf86SetRootClip (ScreenPtr pScreen, Bool enable)
|
||||||
WindowPtr pChild;
|
WindowPtr pChild;
|
||||||
Bool WasViewable = (Bool)(pWin->viewable);
|
Bool WasViewable = (Bool)(pWin->viewable);
|
||||||
Bool anyMarked = FALSE;
|
Bool anyMarked = FALSE;
|
||||||
RegionPtr pOldClip = NULL;
|
|
||||||
#ifdef DO_SAVE_UNDERS
|
#ifdef DO_SAVE_UNDERS
|
||||||
Bool dosave = FALSE;
|
Bool dosave = FALSE;
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -13,8 +13,6 @@
|
||||||
#include "ddcPriv.h"
|
#include "ddcPriv.h"
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
static const OptionInfoRec *DDCAvailableOptions(void *unused);
|
|
||||||
|
|
||||||
#define RETRIES 4
|
#define RETRIES 4
|
||||||
|
|
||||||
static unsigned char *EDIDRead_DDC1(
|
static unsigned char *EDIDRead_DDC1(
|
||||||
|
@ -58,13 +56,6 @@ static const OptionInfoRec DDCOptions[] = {
|
||||||
{ -1, NULL, OPTV_NONE, {0}, FALSE },
|
{ -1, NULL, OPTV_NONE, {0}, FALSE },
|
||||||
};
|
};
|
||||||
|
|
||||||
/*ARGSUSED*/
|
|
||||||
static const OptionInfoRec *
|
|
||||||
DDCAvailableOptions(void *unused)
|
|
||||||
{
|
|
||||||
return (DDCOptions);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Attempts to probe the monitor for EDID information, if NoDDC and NoDDC1 are
|
* Attempts to probe the monitor for EDID information, if NoDDC and NoDDC1 are
|
||||||
* unset. EDID information blocks are interpreted and the results returned in
|
* unset. EDID information blocks are interpreted and the results returned in
|
||||||
|
|
|
@ -46,8 +46,6 @@ static void SetResetBIOSVars(xf86Int10InfoPtr pInt, Bool set);
|
||||||
|
|
||||||
#define REG pInt
|
#define REG pInt
|
||||||
|
|
||||||
static int pci_config_cycle = 0;
|
|
||||||
|
|
||||||
int
|
int
|
||||||
setup_int(xf86Int10InfoPtr pInt)
|
setup_int(xf86Int10InfoPtr pInt)
|
||||||
{
|
{
|
||||||
|
|
|
@ -508,7 +508,6 @@ xf86validateScreen (XF86ConfigPtr p)
|
||||||
{
|
{
|
||||||
XF86ConfScreenPtr screen = p->conf_screen_lst;
|
XF86ConfScreenPtr screen = p->conf_screen_lst;
|
||||||
XF86ConfMonitorPtr monitor;
|
XF86ConfMonitorPtr monitor;
|
||||||
XF86ConfDevicePtr device;
|
|
||||||
XF86ConfAdaptorLinkPtr adaptor;
|
XF86ConfAdaptorLinkPtr adaptor;
|
||||||
|
|
||||||
while (screen)
|
while (screen)
|
||||||
|
|
|
@ -612,7 +612,7 @@ DoSubstitution(const char *template, const char *cmdline, const char *projroot,
|
||||||
{
|
{
|
||||||
char *result;
|
char *result;
|
||||||
int i, l;
|
int i, l;
|
||||||
static const char *env = NULL, *home = NULL;
|
static const char *env = NULL;
|
||||||
static char *hostname = NULL;
|
static char *hostname = NULL;
|
||||||
static char majorvers[3] = "";
|
static char majorvers[3] = "";
|
||||||
|
|
||||||
|
|
|
@ -127,10 +127,9 @@ CheckMode(ScrnInfoPtr pScrn, vbeInfoPtr pVbe, VbeInfoBlock *vbe, int id,
|
||||||
{
|
{
|
||||||
CARD16 major;
|
CARD16 major;
|
||||||
VbeModeInfoBlock *mode;
|
VbeModeInfoBlock *mode;
|
||||||
DisplayModePtr pMode, p;
|
DisplayModePtr pMode;
|
||||||
VbeModeInfoData *data;
|
VbeModeInfoData *data;
|
||||||
Bool modeOK = FALSE;
|
Bool modeOK = FALSE;
|
||||||
ModeStatus status = MODE_OK;
|
|
||||||
|
|
||||||
major = (unsigned)(vbe->VESAVersion >> 8);
|
major = (unsigned)(vbe->VESAVersion >> 8);
|
||||||
|
|
||||||
|
|
32
mi/midash.c
32
mi/midash.c
|
@ -52,38 +52,6 @@ SOFTWARE.
|
||||||
#include "mistruct.h"
|
#include "mistruct.h"
|
||||||
#include "mifpoly.h"
|
#include "mifpoly.h"
|
||||||
|
|
||||||
static miDashPtr CheckDashStorage(miDashPtr *ppseg, int nseg, int *pnsegMax);
|
|
||||||
|
|
||||||
#define NSEGDELTA 16
|
|
||||||
|
|
||||||
/* returns a pointer to the pseg[nseg-1], growing the storage as
|
|
||||||
necessary. this interface seems unnecessarily cumbersome.
|
|
||||||
|
|
||||||
*/
|
|
||||||
|
|
||||||
static miDashPtr
|
|
||||||
CheckDashStorage(
|
|
||||||
miDashPtr *ppseg, /* base pointer */
|
|
||||||
int nseg, /* number of segment we want to write to */
|
|
||||||
int *pnsegMax) /* size (in segments) of list so far */
|
|
||||||
{
|
|
||||||
if (nseg > *pnsegMax)
|
|
||||||
{
|
|
||||||
miDashPtr newppseg;
|
|
||||||
|
|
||||||
*pnsegMax += NSEGDELTA;
|
|
||||||
newppseg = (miDashPtr)xrealloc(*ppseg,
|
|
||||||
(*pnsegMax)*sizeof(miDashRec));
|
|
||||||
if (!newppseg)
|
|
||||||
{
|
|
||||||
xfree(*ppseg);
|
|
||||||
return (miDashPtr)NULL;
|
|
||||||
}
|
|
||||||
*ppseg = newppseg;
|
|
||||||
}
|
|
||||||
return(*ppseg+(nseg-1));
|
|
||||||
}
|
|
||||||
|
|
||||||
_X_EXPORT void
|
_X_EXPORT void
|
||||||
miStepDash (dist, pDashIndex, pDash, numInDashList, pDashOffset)
|
miStepDash (dist, pDashIndex, pDash, numInDashList, pDashOffset)
|
||||||
int dist; /* distance to step */
|
int dist; /* distance to step */
|
||||||
|
|
|
@ -288,8 +288,6 @@ miHandleExposures(pSrcDrawable, pDstDrawable,
|
||||||
#endif
|
#endif
|
||||||
if (extents)
|
if (extents)
|
||||||
{
|
{
|
||||||
WindowPtr pWin = (WindowPtr)pDstDrawable;
|
|
||||||
|
|
||||||
expBox = *REGION_EXTENTS(pscr, &rgnExposed);
|
expBox = *REGION_EXTENTS(pscr, &rgnExposed);
|
||||||
REGION_RESET(pscr, &rgnExposed, &expBox);
|
REGION_RESET(pscr, &rgnExposed, &expBox);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1528,7 +1528,6 @@ miOverlaySetShape(WindowPtr pWin)
|
||||||
{
|
{
|
||||||
Bool WasViewable = (Bool)(pWin->viewable);
|
Bool WasViewable = (Bool)(pWin->viewable);
|
||||||
ScreenPtr pScreen = pWin->drawable.pScreen;
|
ScreenPtr pScreen = pWin->drawable.pScreen;
|
||||||
RegionPtr pOldClip = NULL;
|
|
||||||
#ifdef DO_SAVE_UNDERS
|
#ifdef DO_SAVE_UNDERS
|
||||||
Bool dosave = FALSE;
|
Bool dosave = FALSE;
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -938,7 +938,6 @@ miSetShape(pWin)
|
||||||
Bool WasViewable = (Bool)(pWin->viewable);
|
Bool WasViewable = (Bool)(pWin->viewable);
|
||||||
ScreenPtr pScreen = pWin->drawable.pScreen;
|
ScreenPtr pScreen = pWin->drawable.pScreen;
|
||||||
Bool anyMarked = FALSE;
|
Bool anyMarked = FALSE;
|
||||||
RegionPtr pOldClip = NULL;
|
|
||||||
#ifdef DO_SAVE_UNDERS
|
#ifdef DO_SAVE_UNDERS
|
||||||
Bool dosave = FALSE;
|
Bool dosave = FALSE;
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -546,7 +546,6 @@ AuthAudit (ClientPtr client, Bool letin,
|
||||||
{
|
{
|
||||||
char addr[128];
|
char addr[128];
|
||||||
char *out = addr;
|
char *out = addr;
|
||||||
int client_uid;
|
|
||||||
char client_uid_string[64];
|
char client_uid_string[64];
|
||||||
LocalClientCredRec *lcc;
|
LocalClientCredRec *lcc;
|
||||||
#ifdef XSERVER_DTRACE
|
#ifdef XSERVER_DTRACE
|
||||||
|
|
129
os/io.c
129
os/io.c
|
@ -91,8 +91,6 @@ _X_EXPORT CallbackListPtr FlushCallback;
|
||||||
|
|
||||||
static ConnectionInputPtr AllocateInputBuffer(void);
|
static ConnectionInputPtr AllocateInputBuffer(void);
|
||||||
static ConnectionOutputPtr AllocateOutputBuffer(void);
|
static ConnectionOutputPtr AllocateOutputBuffer(void);
|
||||||
static xReqPtr PeekNextRequest(xReqPtr req, ClientPtr client, Bool readmore);
|
|
||||||
static void SkipRequests(xReqPtr req, ClientPtr client, int numskipped);
|
|
||||||
|
|
||||||
/* check for both EAGAIN and EWOULDBLOCK, because some supposedly POSIX
|
/* check for both EAGAIN and EWOULDBLOCK, because some supposedly POSIX
|
||||||
* systems are broken and return EWOULDBLOCK when they should return EAGAIN
|
* systems are broken and return EWOULDBLOCK when they should return EAGAIN
|
||||||
|
@ -618,135 +616,8 @@ ResetCurrentRequest(ClientPtr client)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*****************************************************************
|
|
||||||
* PeekNextRequest and SkipRequests were implemented to support DBE
|
|
||||||
* idioms, but can certainly be used outside of DBE. There are two
|
|
||||||
* related macros in os.h, ReqLen and CastxReq. See the porting
|
|
||||||
* layer document for more details.
|
|
||||||
*
|
|
||||||
**********************/
|
|
||||||
|
|
||||||
|
|
||||||
/*****************************************************************
|
|
||||||
* PeekNextRequest
|
|
||||||
* lets you look ahead at the unexecuted requests in a
|
|
||||||
* client's request buffer.
|
|
||||||
*
|
|
||||||
* Note: this implementation of PeekNextRequest ignores the
|
|
||||||
* readmore parameter.
|
|
||||||
*
|
|
||||||
**********************/
|
|
||||||
|
|
||||||
static xReqPtr
|
|
||||||
PeekNextRequest(
|
|
||||||
xReqPtr req, /* request we're starting from */
|
|
||||||
ClientPtr client, /* client whose requests we're skipping */
|
|
||||||
Bool readmore) /* attempt to read more if next request isn't there? */
|
|
||||||
{
|
|
||||||
register ConnectionInputPtr oci = ((OsCommPtr)client->osPrivate)->input;
|
|
||||||
xReqPtr pnextreq;
|
|
||||||
int needed, gotnow, reqlen;
|
|
||||||
|
|
||||||
if (!oci) return NULL;
|
|
||||||
|
|
||||||
if (!req)
|
|
||||||
{
|
|
||||||
/* caller wants the request after the one currently being executed */
|
|
||||||
pnextreq = (xReqPtr)
|
|
||||||
(((CARD32 *)client->requestBuffer) + client->req_len);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
/* caller wants the request after the one specified by req */
|
|
||||||
reqlen = get_req_len(req, client);
|
|
||||||
#ifdef BIGREQS
|
|
||||||
if (!reqlen) reqlen = get_big_req_len(req, client);
|
|
||||||
#endif
|
|
||||||
pnextreq = (xReqPtr)(((char *)req) + (reqlen << 2));
|
|
||||||
}
|
|
||||||
|
|
||||||
/* see how much of the next request we have available */
|
|
||||||
|
|
||||||
gotnow = oci->bufcnt - (((char *)pnextreq) - oci->buffer);
|
|
||||||
|
|
||||||
if (gotnow < sizeof(xReq))
|
|
||||||
return NULL;
|
|
||||||
|
|
||||||
needed = get_req_len(pnextreq, client) << 2;
|
|
||||||
#ifdef BIGREQS
|
|
||||||
if (!needed)
|
|
||||||
{
|
|
||||||
/* it's a big request */
|
|
||||||
if (gotnow < sizeof(xBigReq))
|
|
||||||
return NULL;
|
|
||||||
needed = get_big_req_len(pnextreq, client) << 2;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* if we have less than we need, return NULL */
|
|
||||||
|
|
||||||
return (gotnow < needed) ? NULL : pnextreq;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*****************************************************************
|
|
||||||
* SkipRequests
|
|
||||||
* lets you skip over some of the requests in a client's
|
|
||||||
* request buffer. Presumably the caller has used PeekNextRequest
|
|
||||||
* to examine the requests being skipped and has performed whatever
|
|
||||||
* actions they dictate.
|
|
||||||
*
|
|
||||||
**********************/
|
|
||||||
|
|
||||||
_X_EXPORT CallbackListPtr SkippedRequestsCallback = NULL;
|
_X_EXPORT CallbackListPtr SkippedRequestsCallback = NULL;
|
||||||
|
|
||||||
static void
|
|
||||||
SkipRequests(
|
|
||||||
xReqPtr req, /* last request being skipped */
|
|
||||||
ClientPtr client, /* client whose requests we're skipping */
|
|
||||||
int numskipped) /* how many requests we're skipping */
|
|
||||||
{
|
|
||||||
OsCommPtr oc = (OsCommPtr)client->osPrivate;
|
|
||||||
register ConnectionInputPtr oci = oc->input;
|
|
||||||
int reqlen;
|
|
||||||
|
|
||||||
/* see if anyone wants to snoop the skipped requests */
|
|
||||||
|
|
||||||
if (SkippedRequestsCallback)
|
|
||||||
{
|
|
||||||
SkippedRequestInfoRec skipinfo;
|
|
||||||
skipinfo.req = req;
|
|
||||||
skipinfo.client = client;
|
|
||||||
skipinfo.numskipped = numskipped;
|
|
||||||
CallCallbacks(&SkippedRequestsCallback, &skipinfo);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* adjust the sequence number */
|
|
||||||
client->sequence += numskipped;
|
|
||||||
|
|
||||||
/* twiddle the oci to skip over the requests */
|
|
||||||
|
|
||||||
reqlen = get_req_len(req, client);
|
|
||||||
#ifdef BIGREQS
|
|
||||||
if (!reqlen) reqlen = get_big_req_len(req, client);
|
|
||||||
#endif
|
|
||||||
reqlen <<= 2;
|
|
||||||
oci->bufptr = (char *)req;
|
|
||||||
oci->lenLastReq = reqlen;
|
|
||||||
|
|
||||||
/* see if any requests left in the buffer */
|
|
||||||
|
|
||||||
if ( ((char *)req + reqlen) == (oci->buffer + oci->bufcnt) )
|
|
||||||
{
|
|
||||||
/* no requests; mark input buffer as available and client
|
|
||||||
* as having no input
|
|
||||||
*/
|
|
||||||
int fd = oc->fd;
|
|
||||||
AvailableInput = oc;
|
|
||||||
YieldControlNoInput();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/* lookup table for adding padding bytes to data that is read from
|
/* lookup table for adding padding bytes to data that is read from
|
||||||
or written to the X socket. */
|
or written to the X socket. */
|
||||||
static int padlength[4] = {0, 3, 2, 1};
|
static int padlength[4] = {0, 3, 2, 1};
|
||||||
|
|
|
@ -731,7 +731,6 @@ ProcRRSetScreenConfig (ClientPtr client)
|
||||||
int n, rc;
|
int n, rc;
|
||||||
ScreenPtr pScreen;
|
ScreenPtr pScreen;
|
||||||
rrScrPrivPtr pScrPriv;
|
rrScrPrivPtr pScrPriv;
|
||||||
TimeStamp configTime;
|
|
||||||
TimeStamp time;
|
TimeStamp time;
|
||||||
int i;
|
int i;
|
||||||
Rotation rotation;
|
Rotation rotation;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user