[Spice-devel] [spice-common 6/8] mi: Fix shadow warnings

Christophe Fergeau cfergeau at redhat.com
Mon Jan 6 03:22:12 PST 2014


Based off a xserver commit from Yaakov Selkowitz:
http://cgit.freedesktop.org/xorg/xserver/commit/mi/mispans.c?id=f02e27e4fcc34413b2051e5a01edc92172fa8612
---
 common/lines.c | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/common/lines.c b/common/lines.c
index 5b26662..4f404f1 100644
--- a/common/lines.c
+++ b/common/lines.c
@@ -806,8 +806,6 @@ miFillUniqueSpanGroup (GCPtr pGC, SpanGroup * spanGroup, Boolean foreground)
                         newwidths = xrealloc (newspans->widths,
                                               ysizes[index] * sizeof (int));
                         if (!newpoints || !newwidths) {
-                            int i;
-
                             for (i = 0; i < ylength; i++) {
                                 xfree (yspans[i].points);
                                 xfree (yspans[i].widths);
@@ -838,8 +836,6 @@ miFillUniqueSpanGroup (GCPtr pGC, SpanGroup * spanGroup, Boolean foreground)
         points = (DDXPointRec*)xalloc (count * sizeof (DDXPointRec));
         widths = (int *)xalloc (count * sizeof (int));
         if (!points || !widths) {
-            int i;
-
             for (i = 0; i < ylength; i++) {
                 xfree (yspans[i].points);
                 xfree (yspans[i].widths);
-- 
1.8.4.2



More information about the Spice-devel mailing list