aboutsummaryrefslogtreecommitdiffstats
path: root/graphics
diff options
context:
space:
mode:
authordinoex <dinoex@FreeBSD.org>2006-12-15 15:01:35 +0800
committerdinoex <dinoex@FreeBSD.org>2006-12-15 15:01:35 +0800
commit90aff6e5908d9d0a243090b83d7401aa12615898 (patch)
tree9a303532bd9aff137e19ccdb2d53b77d00d0e0e0 /graphics
parent0443dffdfdc628a86dfc51ca1862b1f6b3bc8407 (diff)
downloadfreebsd-ports-gnome-90aff6e5908d9d0a243090b83d7401aa12615898.tar.gz
freebsd-ports-gnome-90aff6e5908d9d0a243090b83d7401aa12615898.tar.zst
freebsd-ports-gnome-90aff6e5908d9d0a243090b83d7401aa12615898.zip
- fix build with gcc42
Diffstat (limited to 'graphics')
-rw-r--r--graphics/xv/files/patch-xvimage.c55
1 files changed, 49 insertions, 6 deletions
diff --git a/graphics/xv/files/patch-xvimage.c b/graphics/xv/files/patch-xvimage.c
index 32bb035156f3..a233568a4955 100644
--- a/graphics/xv/files/patch-xvimage.c
+++ b/graphics/xv/files/patch-xvimage.c
@@ -1,13 +1,26 @@
---- xvimage.c.orig Sat Oct 7 21:38:26 2006
-+++ xvimage.c Sat Oct 7 21:44:00 2006
+--- xvimage.c.orig Fri Dec 15 07:32:23 2006
++++ xvimage.c Fri Dec 15 07:45:46 2006
+@@ -1977,10 +1977,10 @@
+ case 12:
+ case 15:
+ case 16: {
+- unsigned short *imagedata, *ip;
++ byte *imagedata, *ip;
+ byte *pp;
+
+- imagedata = (unsigned short *) malloc((size_t) (2*wide*high));
++ imagedata = (byte *) malloc((size_t) (2*wide*high));
+ if (!imagedata) FatalError("couldn't malloc imagedata");
+
+ xim = XCreateImage(theDisp,theVisual,dispDEEP,ZPixmap,0,
@@ -2003,8 +2003,8 @@
if (dithpic) xcol = ((*pp) ? white : black) & 0xffff;
else xcol = xcolors[*pp] & 0xffff;
- *((unsigned char *)ip)++ = (xcol>>8) & 0xff;
- *((unsigned char *)ip)++ = (xcol) & 0xff;
-+ *(((unsigned char *)ip)++) = (xcol>>8) & 0xff;
-+ *(((unsigned char *)ip)++) = (xcol) & 0xff;
++ *(ip++) = (xcol>>8) & 0xff;
++ *(ip++) = (xcol) & 0xff;
}
}
else { /* LSBFirst */
@@ -17,8 +30,38 @@
- *((unsigned char *)ip)++ = (xcol) & 0xff;
- *((unsigned char *)ip)++ = (xcol>>8) & 0xff;
-+ *(((unsigned char *)ip)++) = (xcol) & 0xff;
-+ *(((unsigned char *)ip)++) = (xcol>>8) & 0xff;
++ *(ip++) = (xcol) & 0xff;
++ *(ip++) = (xcol>>8) & 0xff;
}
}
}
+@@ -2214,7 +2214,8 @@
+ *ip++ = xcol & 0xff;
+ break;
+ case 16:
+- *((CARD16 *)ip)++ = (CARD16)xcol;
++ *((CARD16 *)ip) = (CARD16)xcol;
++ ip += 2;
+ break;
+ }
+ }
+@@ -2243,7 +2244,8 @@
+ *ip++ = xcol & 0xff;
+ break;
+ case 16:
+- *((CARD16 *)ip)++ = (CARD16)xcol;
++ *((CARD16 *)ip) = (CARD16)xcol;
++ ip += 2;
+ break;
+ case 24:
+ *ip++ = (xcol >> 16) & 0xff;
+@@ -2251,7 +2253,8 @@
+ *ip++ = xcol & 0xff;
+ break;
+ case 32:
+- *((CARD32 *)ip)++ = (CARD32)xcol;
++ *((CARD32 *)ip) = (CARD32)xcol;
++ ip += 4;
+ break;
+ }
+ }