Blame SOURCES/jdk8197546-pr3542-rh1402819-fix_for_8171000_breaks_solaris_linux_builds.patch

95d809
# HG changeset patch
95d809
# User prr
95d809
# Date 1518454604 28800
95d809
#      Mon Feb 12 08:56:44 2018 -0800
95d809
# Node ID 556adf3a76aa81bf3918d7d46554dae7cc1d5c5c
95d809
# Parent  b77308735540644d4710244e3c88865067f2905a
95d809
8197546: Fix for 8171000 breaks Solaris + Linux builds
95d809
Reviewed-by: serb, jdv
95d809
95d809
diff --git openjdk.orig/jdk/src/solaris/native/sun/awt/multiVis.c openjdk/jdk/src/solaris/native/sun/awt/multiVis.c
95d809
--- openjdk.orig/jdk/src/solaris/native/sun/awt/multiVis.c
95d809
+++ openjdk/jdk/src/solaris/native/sun/awt/multiVis.c
95d809
@@ -395,6 +395,8 @@
95d809
 list_ptr regions;/* list of regions to read from */
95d809
 {
95d809
     XImage              *ximage ;
95d809
+    image_region_type* reg;
95d809
+    int32_t rect;
95d809
 
95d809
     ximage = XCreateImage(disp,fakeVis,(uint32_t) depth,format,0,NULL,
95d809
                           (uint32_t)width,(uint32_t)height,8,0);
95d809
@@ -402,11 +404,11 @@
95d809
     ximage->data = calloc(ximage->bytes_per_line*height*((format==ZPixmap)? 1 : depth), sizeof(char));
95d809
     ximage->bits_per_pixel = depth; /** Valid only if format is ZPixmap ***/
95d809
 
95d809
-    for (image_region_type* reg = (image_region_type *) first_in_list( regions); reg;
95d809
+    for (reg = (image_region_type *) first_in_list( regions); reg;
95d809
          reg = (image_region_type *) next_in_list( regions))
95d809
     {
95d809
                 struct my_XRegion *vis_reg = (struct my_XRegion *)(reg->visible_region);
95d809
-                for (int32_t rect = 0; rect < vis_reg->numRects; rect++)
95d809
+                for (rect = 0; rect < vis_reg->numRects; rect++)
95d809
                 {
95d809
                     /** ------------------------------------------------------------------------
95d809
                             Intersect bbox with visible part of region giving src rect & output