aboutsummaryrefslogtreecommitdiffstats
path: root/main/xcb-util-image/fix-c90-warnings-2.patch
blob: dfce49668593970ba74ff672a5091a6a10cc2bcf (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
--- xcb-util-image-0.3.9.orig/image/xcb_image.c
+++ xcb-util-image-0.3.9/image/xcb_image.c
@@ -324,6 +324,11 @@
   case XCB_IMAGE_FORMAT_XY_PIXMAP:
       plane_mask &= xcb_mask(imrep->depth);
       if (plane_mask != xcb_mask(imrep->depth)) {
+	  int            i;
+	  uint32_t       rpm = plane_mask;
+	  uint8_t *      src_plane = image->data;
+	  uint8_t *      dst_plane;
+	  uint32_t       size = image->height * image->stride;
 	  xcb_image_t *  tmp_image =
 	    xcb_image_create_native(conn, width, height, format,
 				    imrep->depth, 0, 0, 0);
@@ -333,12 +338,7 @@
 	      return 0;
 	  }
 
-	  int            i;
-	  uint32_t       rpm = plane_mask;
-	  uint8_t *      src_plane = image->data;
-	  uint8_t *      dst_plane = tmp_image->data;
-	  uint32_t       size = image->height * image->stride;
-
+	  dst_plane = tmp_image->data;
 	  if (tmp_image->bit_order == XCB_IMAGE_ORDER_MSB_FIRST)
 	      rpm = xcb_bit_reverse(plane_mask, imrep->depth);
 	  for (i = 0; i < imrep->depth; i++) {