freebsd-ports/devel/ruby-rudl/files/patch-flxplay.c
Cheng-Lung Sung 60d55604b2 - fixes the lvalue error when using gcc4
PR:		ports/114903
Submitted by:	maintainer (Erik Greenwald)
2007-09-05 01:06:38 +00:00

13 lines
592 B
C

--- flxplay.c.orig Wed Jul 25 11:40:05 2007
+++ flxplay.c Wed Jul 25 11:40:27 2007
@@ -42,8 +42,8 @@
int lastFrameTicks;
} FLC;
-#define ReadU16(tmp1, tmp2) (Uint16)*(tmp1) = ((Uint8)*(tmp2+1)<<8)+(Uint8)*(tmp2);
-#define ReadU32(tmp1, tmp2) (Uint32)*(tmp1) = (((((((Uint8)*(tmp2+3)<<8)+((Uint8)*(tmp2+2)))<<8)+((Uint8)*(tmp2+1)))<<8)+(Uint8)*(tmp2));
+#define ReadU16(tmp1, tmp2) *(Uint16 *)(tmp1) = ((Uint8)*(tmp2+1)<<8)+(Uint8)*(tmp2);
+#define ReadU32(tmp1, tmp2) *(Uint32 *)(tmp1) = (((((((Uint8)*(tmp2+3)<<8)+((Uint8)*(tmp2+2)))<<8)+((Uint8)*(tmp2+1)))<<8)+(Uint8)*(tmp2));