]> git.pld-linux.org Git - packages/libmng.git/blob - libmng-gcc4.patch
- link with -lz
[packages/libmng.git] / libmng-gcc4.patch
1 GCC-4 fix:
2
3 mng.c: In function 'copyline':
4 mng.c:233: error: invalid lvalue in increment
5 mng.c:270: error: invalid lvalue in increment
6
7 --- libmng-1.0.10/contrib/gcc/fbmngplay/mng.c.orig      2003-12-07 10:45:15.000000000 +0100
8 +++ libmng-1.0.10/contrib/gcc/fbmngplay/mng.c   2007-07-16 19:47:18.272161096 +0200
9 @@ -230,7 +230,8 @@
10                 a = a * mymng->alpha / 100;
11                 switch (mymng->fbbpp) {
12                 case 16:
13 -                       input = *((unsigned short *) background)++;
14 +                       input = *(unsigned short *)background;
15 +                       background += 2;
16                         br = (input >> 8) & 0xf8;
17                         bg = (input >> 3) & 0xfc;
18                         bb = input << 3 & 0xff;
19 @@ -267,7 +268,8 @@
20                         b >>= 3;
21  
22                         output = (r << 11) | (g << 5) | b;
23 -                       *((unsigned short *) dest)++ = output;
24 +                       *(unsigned short *)dest = output;
25 +                       dest += 2;
26                         break;
27                 case 24:
28                         *dest++ = b;
This page took 0.02918 seconds and 3 git commands to generate.