Fix build with gcc 9.3.0's -Werror=alloc-size-larger-than=

This commit is contained in:
Alexander Volkov 2020-04-21 12:38:03 +03:00 committed by Adam Jackson
parent 89f42b8821
commit 9937183e4b
3 changed files with 3 additions and 3 deletions

View File

@ -738,7 +738,7 @@ exaPolySegment(DrawablePtr pDrawable, GCPtr pGC, int nseg, xSegment * pSeg)
}
}
prect = xallocarray(nseg, sizeof(xRectangle));
prect = xallocarray((unsigned int)nseg, sizeof(xRectangle));
for (i = 0; i < nseg; i++) {
if (pSeg[i].x1 < pSeg[i].x2) {
prect[i].x = pSeg[i].x1;

View File

@ -41,7 +41,7 @@ XVisualInfo *xnestVisuals;
int xnestNumVisuals;
int xnestDefaultVisualIndex;
Colormap *xnestDefaultColormaps;
static int xnestNumDefaultColormaps;
static unsigned int xnestNumDefaultColormaps;
int *xnestDepths;
int xnestNumDepths;
XPixmapFormatValues *xnestPixmapFormats;

View File

@ -1239,7 +1239,7 @@ ProcRRSetCrtcConfig(ClientPtr client)
rrScrPrivPtr pScrPriv;
RRCrtcPtr crtc;
RRModePtr mode;
int numOutputs;
unsigned int numOutputs;
RROutputPtr *outputs = NULL;
RROutput *outputIds;
TimeStamp time;