[Spice-devel] [spice-common 1/8] canvas_base: Fix variable shadowing warning

Christophe Fergeau cfergeau at redhat.com
Thu Mar 28 17:35:03 UTC 2019


canvas_base.c is #included by spice-common users. They currently don't
enable this warning, but if/when they do, we don't want code from
spice-common to trigger it.

Signed-off-by: Christophe Fergeau <cfergeau at redhat.com>
---
 common/canvas_base.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/common/canvas_base.c b/common/canvas_base.c
index 9ffca3e..00a8801 100644
--- a/common/canvas_base.c
+++ b/common/canvas_base.c
@@ -1880,11 +1880,11 @@ static void canvas_clip_pixman(CanvasBase *canvas,
         uint32_t n = clip->rects->num_rects;
         SpiceRect *now = clip->rects->rects;
 
-        pixman_region32_t clip;
+        pixman_region32_t pixman_clip;
 
-        if (spice_pixman_region32_init_rects(&clip, now, n)) {
-            pixman_region32_intersect(dest_region, dest_region, &clip);
-            pixman_region32_fini(&clip);
+        if (spice_pixman_region32_init_rects(&pixman_clip, now, n)) {
+            pixman_region32_intersect(dest_region, dest_region, &pixman_clip);
+            pixman_region32_fini(&pixman_clip);
         }
 
         break;
-- 
2.21.0



More information about the Spice-devel mailing list