diff options
author | Thomas E. Dickey <dickey@invisible-island.net> | 2022-09-09 16:51:01 -0400 |
---|---|---|
committer | Thomas E. Dickey <dickey@invisible-island.net> | 2022-09-09 20:34:19 -0400 |
commit | ea28ca1a2cce8e0d8e5a1f620a809384ed276c37 (patch) | |
tree | 9b0743cd1727eb5e6dbfc84f33dd08db49c5f9a9 /src/Poly.c | |
parent | afc7f259668bbb25d5b06929d529add93fb39ebf (diff) | |
download | xorg-lib-libXrender-ea28ca1a2cce8e0d8e5a1f620a809384ed276c37.tar.gz |
use casts to reduce compiler warnings (no object change)
Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net>
Diffstat (limited to 'src/Poly.c')
-rw-r--r-- | src/Poly.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -99,7 +99,7 @@ XRenderComputeTrapezoids (Edge *edges, Edge *e, *en, *next; XFixed y, next_y, intersect; - qsort (edges, nedges, sizeof (Edge), CompareEdge); + qsort (edges, (size_t) nedges, sizeof (Edge), CompareEdge); *ntraps = 0; y = edges[0].edge.p1.y; @@ -249,8 +249,8 @@ XRenderCompositeDoublePoly (Display *dpy, XFixed prevx = 0, prevy = 0, firstx = 0, firsty = 0; XFixed top = 0, bottom = 0; /* GCCism */ - edges = Xmalloc ((npoints * sizeof (Edge)) + - (npoints * npoints * sizeof (XTrapezoid))); + edges = Xmalloc (((size_t) npoints * sizeof (Edge)) + + ((size_t) (npoints * npoints) * sizeof (XTrapezoid))); if (!edges) return; traps = (XTrapezoid *) (edges + npoints); |