changeset 49262:673be6f60323

8197546: Fix for 8171000 breaks Solaris + Linux builds Reviewed-by: serb, jdv
author prr
date Mon, 12 Feb 2018 08:56:44 -0800
parents c569dfd90325
children c372651def0e
files src/java.desktop/unix/native/libawt_xawt/awt/multiVis.c
diffstat 1 files changed, 4 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/java.desktop/unix/native/libawt_xawt/awt/multiVis.c	Thu Feb 08 22:34:20 2018 -0800
+++ b/src/java.desktop/unix/native/libawt_xawt/awt/multiVis.c	Mon Feb 12 08:56:44 2018 -0800
@@ -395,6 +395,8 @@
 list_ptr regions;/* list of regions to read from */
 {
     XImage              *ximage ;
+    image_region_type* reg;
+    int32_t rect;
 
     ximage = XCreateImage(disp,fakeVis,(uint32_t) depth,format,0,NULL,
                           (uint32_t)width,(uint32_t)height,8,0);
@@ -402,11 +404,11 @@
     ximage->data = calloc(ximage->bytes_per_line*height*((format==ZPixmap)? 1 : depth), sizeof(char));
     ximage->bits_per_pixel = depth; /** Valid only if format is ZPixmap ***/
 
-    for (image_region_type* reg = (image_region_type *) first_in_list( regions); reg;
+    for (reg = (image_region_type *) first_in_list( regions); reg;
          reg = (image_region_type *) next_in_list( regions))
     {
                 struct my_XRegion *vis_reg = (struct my_XRegion *)(reg->visible_region);
-                for (int32_t rect = 0; rect < vis_reg->numRects; rect++)
+                for (rect = 0; rect < vis_reg->numRects; rect++)
                 {
                     /** ------------------------------------------------------------------------
                             Intersect bbox with visible part of region giving src rect & output