Skip to content

Commit

Permalink
mi: fix shadow warnings
Browse files Browse the repository at this point in the history
mibitblt.c: In function 'miGetImage':
mibitblt.c:617:20: warning: declaration of 'pt' shadows a previous local
mibitblt.c:609:17: warning: shadowed declaration is here
mispans.c: In function 'miFillUniqueSpanGroup':
mispans.c:456:33: warning: declaration of 'i' shadows a previous local
mispans.c:382:9: warning: shadowed declaration is here
mispans.c:488:17: warning: declaration of 'i' shadows a previous local
mispans.c:382:9: warning: shadowed declaration is here

Signed-off-by: Yaakov Selkowitz <[email protected]>
Reviewed-by: Peter Hutterer <[email protected]>
  • Loading branch information
yselkowitz committed Nov 5, 2012
1 parent 1fe30c0 commit f02e27e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
6 changes: 3 additions & 3 deletions mi/mibitblt.c
Original file line number Diff line number Diff line change
Expand Up @@ -614,7 +614,7 @@ miGetImage(DrawablePtr pDraw, int sx, int sy, int w, int h,
if (format == ZPixmap) {
if ((((1LL << depth) - 1) & planeMask) != (1LL << depth) - 1) {
ChangeGCVal gcv;
xPoint pt;
xPoint xpt;

pGC = GetScratchGC(depth, pDraw->pScreen);
if (!pGC)
Expand All @@ -629,9 +629,9 @@ miGetImage(DrawablePtr pDraw, int sx, int sy, int w, int h,
* Clear the pixmap before doing anything else
*/
ValidateGC((DrawablePtr) pPixmap, pGC);
pt.x = pt.y = 0;
xpt.x = xpt.y = 0;
width = w;
(*pGC->ops->FillSpans) ((DrawablePtr) pPixmap, pGC, 1, &pt, &width,
(*pGC->ops->FillSpans) ((DrawablePtr) pPixmap, pGC, 1, &xpt, &width,
TRUE);

/* alu is already GXCopy */
Expand Down
4 changes: 0 additions & 4 deletions mi/mispans.c
Original file line number Diff line number Diff line change
Expand Up @@ -453,8 +453,6 @@ miFillUniqueSpanGroup(DrawablePtr pDraw, GCPtr pGC, SpanGroup * spanGroup)
(int *) realloc(newspans->widths,
ysizes[index] * sizeof(int));
if (!newpoints || !newwidths) {
int i;

for (i = 0; i < ylength; i++) {
free(yspans[i].points);
free(yspans[i].widths);
Expand Down Expand Up @@ -485,8 +483,6 @@ miFillUniqueSpanGroup(DrawablePtr pDraw, GCPtr pGC, SpanGroup * spanGroup)
points = malloc(count * sizeof(DDXPointRec));
widths = malloc(count * sizeof(int));
if (!points || !widths) {
int i;

for (i = 0; i < ylength; i++) {
free(yspans[i].points);
free(yspans[i].widths);
Expand Down

0 comments on commit f02e27e

Please sign in to comment.